Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/js/ada/create-wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const coin = 'tada';

// Create the wallet
async function main() {
bitgo.authenticateWithAccessToken({ accessToken });
await bitgo.authenticateWithAccessToken({ accessToken });
const passcodeEncryptionCode = bitgo.generateRandomPassword();

const walletOptions = {
Expand Down
2 changes: 1 addition & 1 deletion examples/js/ada/get-pledge-vkeys.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const accessToken = '';
const walletId = '';

Promise.coroutine(function *() {
bitgo.authenticateWithAccessToken({ accessToken: accessToken });
yield bitgo.authenticateWithAccessToken({ accessToken: accessToken });
yield bitgo.unlock({ otp: '000000', duration: 3600 });
const walletInstance = yield basecoin.wallets().get({ id: walletId });

Expand Down
2 changes: 1 addition & 1 deletion examples/js/ada/send-pledge-transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const pledgingNodeWitnessCborHex = '';

Promise.coroutine(function* () {
// generating address w/ same staking key and same payment key
bitgo.authenticateWithAccessToken({ accessToken: accessToken });
yield bitgo.authenticateWithAccessToken({ accessToken: accessToken });
yield bitgo.unlock({ otp: '000000', duration: 3600 });
const walletInstance = yield basecoin.wallets().get({ id: walletId });

Expand Down
2 changes: 1 addition & 1 deletion examples/js/ada/send-staking-transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const walletPassphrase = null;

Promise.coroutine(function* () {
// generating address w/ same staking key and same payment key
bitgo.authenticateWithAccessToken({ accessToken: accessToken });
yield bitgo.authenticateWithAccessToken({ accessToken: accessToken });
yield bitgo.unlock({ otp: '000000', duration: 3600 });
const walletInstance = yield basecoin.wallets().get({ id: walletId });

Expand Down
2 changes: 1 addition & 1 deletion examples/js/ada/send-unstaking-transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const walletPassphrase = null;

Promise.coroutine(function* () {
// generating address w/ same staking key and same payment key
bitgo.authenticateWithAccessToken({ accessToken: accessToken });
yield bitgo.authenticateWithAccessToken({ accessToken: accessToken });
yield bitgo.unlock({ otp: '000000', duration: 3600 });
const walletInstance = yield basecoin.wallets().get({ id: walletId });

Expand Down
2 changes: 1 addition & 1 deletion examples/js/algo/account-consolidation-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const otp = '000000';
const accessToken = 'insert access token string here';

Promise.coroutine(function* () {
bitgo.authenticateWithAccessToken({ accessToken });
yield bitgo.authenticateWithAccessToken({ accessToken });

const wallet = yield bitgo.coin(coin).wallets().get({ id: walletId });

Expand Down
2 changes: 1 addition & 1 deletion examples/js/algo/account-consolidation-send.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const otp = '000000';
const accessToken = 'insert access token string here';

Promise.coroutine(function* () {
bitgo.authenticateWithAccessToken({ accessToken });
yield bitgo.authenticateWithAccessToken({ accessToken });

const wallet = yield bitgo.coin(coin).wallets().get({ id: walletId });

Expand Down
2 changes: 1 addition & 1 deletion examples/js/algo/disable-token.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const address = 'your root address or address of same wallet';
const closeRemainderTo = 'your address where send token balance once you disable it';

Promise.coroutine(function* () {
bitgo.authenticateWithAccessToken({ accessToken });
yield bitgo.authenticateWithAccessToken({ accessToken });

const wallet = yield bitgo.coin(coin).wallets().get({ id: walletId });

Expand Down
2 changes: 1 addition & 1 deletion examples/js/algo/enable-token.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const accessToken = 'insert access token string here';
const address = 'your root address or address of same wallet';

Promise.coroutine(function* () {
bitgo.authenticateWithAccessToken({ accessToken });
yield bitgo.authenticateWithAccessToken({ accessToken });

const wallet = yield bitgo.coin(coin).wallets().get({ id: walletId });

Expand Down
2 changes: 1 addition & 1 deletion examples/js/atom/create-wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const coin = 'tatom';

// Create the wallet
async function main() {
bitgo.authenticateWithAccessToken({ accessToken });
await bitgo.authenticateWithAccessToken({ accessToken });
const passcodeEncryptionCode = bitgo.generateRandomPassword();

const walletOptions = {
Expand Down
2 changes: 1 addition & 1 deletion examples/js/atom/send-wallet-transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const otp = '';

// Create the wallet
async function main() {
bitgo.authenticateWithAccessToken({ accessToken });
await bitgo.authenticateWithAccessToken({ accessToken });

await bitgo.unlock({ otp: otp, duration: 3600 });
const wallet = await bitgo.coin(coin).wallets().get({ id });
Expand Down
2 changes: 1 addition & 1 deletion examples/js/build-transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const amount = '';
const toAddress = '';

Promise.coroutine(function* () {
bitgo.authenticateWithAccessToken({ accessToken });
yield bitgo.authenticateWithAccessToken({ accessToken });

const wallet = yield bitgo.coin(coin).wallets().get({ id });

Expand Down
2 changes: 1 addition & 1 deletion examples/js/create-policy.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const id = null;
const coin = 'tltc';

Promise.coroutine(function* () {
bitgo.authenticateWithAccessToken({ accessToken });
yield bitgo.authenticateWithAccessToken({ accessToken });

const wallet = yield bitgo.coin(coin).wallets().get({ id });

Expand Down
2 changes: 1 addition & 1 deletion examples/js/create-tss-wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const coin = 'tsol';

// Create the wallet
async function main() {
bitgo.authenticateWithAccessToken({ accessToken });
await bitgo.authenticateWithAccessToken({ accessToken });

const walletOptions = {
label,
Expand Down
2 changes: 1 addition & 1 deletion examples/js/create-wallet-address.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const accessToken = '';
const walletId = '';

Promise.coroutine(function* () {
bitgo.authenticateWithAccessToken({ accessToken: accessToken });
yield bitgo.authenticateWithAccessToken({ accessToken: accessToken });

const wallet = yield bitgo.coin(coin).wallets().get({ id: walletId });

Expand Down
2 changes: 1 addition & 1 deletion examples/js/create-wallet-addresses.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const accessToken = null;
const walletPassphrase = null;

Promise.coroutine(function* () {
bitgo.authenticateWithAccessToken({ accessToken: accessToken });
yield bitgo.authenticateWithAccessToken({ accessToken: accessToken });

const wallet = yield basecoin.wallets().generateWallet({
label: `Test Wallet Example`,
Expand Down
2 changes: 1 addition & 1 deletion examples/js/create-wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const coin = 'tltc';

// Create the wallet
Promise.coroutine(function* () {
bitgo.authenticateWithAccessToken({ accessToken });
yield bitgo.authenticateWithAccessToken({ accessToken });

const walletOptions = {
label,
Expand Down
2 changes: 1 addition & 1 deletion examples/js/cross-chain-recovery.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const walletPassphrase = null;
const xprv = null;

async function main() {
bitgo.authenticateWithAccessToken({ accessToken });
await bitgo.authenticateWithAccessToken({ accessToken });

const recoveryTx = await sourceCoin.recoverFromWrongChain({
txid,
Expand Down
2 changes: 1 addition & 1 deletion examples/js/eth/create-wallet-address.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const walletId = '';
const forwarderVersion = 1;

async function createAddress() {
bitgo.authenticateWithAccessToken({ accessToken });
await bitgo.authenticateWithAccessToken({ accessToken });

const wallet = await bitgo.coin(coin).wallets().get({ id: walletId });

Expand Down
2 changes: 1 addition & 1 deletion examples/js/eth/create-wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const coin = 'teth';

// Create the wallet
async function createWallet() {
bitgo.authenticateWithAccessToken({ accessToken });
await bitgo.authenticateWithAccessToken({ accessToken });

const walletOptions = {
label,
Expand Down
2 changes: 1 addition & 1 deletion examples/js/eth/list-wallet-addresses.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const accessToken = '';
const walletId = '';

async function main() {
bitgo.authenticateWithAccessToken({ accessToken });
await bitgo.authenticateWithAccessToken({ accessToken });

const walletInstance = await basecoin.wallets().get({ id: walletId });
const addresses = await walletInstance.addresses({
Expand Down
2 changes: 1 addition & 1 deletion examples/js/eth/set-flush-threshold.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const walletId = '';
const threshold = 10;

async function setTokenFlushThreshold() {
bitgo.authenticateWithAccessToken({ accessToken });
await bitgo.authenticateWithAccessToken({ accessToken });
const wallet = await bitgo.coin(coin).wallets().get({ id: walletId });
console.log('Initial Token Flush Threshold:', wallet.tokenFlushThresholds());
await wallet.updateTokenFlushThresholds({ terc: threshold });
Expand Down
2 changes: 1 addition & 1 deletion examples/js/get-maximum-spendable.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const coin = 'tbtc';
const basecoin = bitgo.coin(coin);

Promise.coroutine(function* () {
bitgo.authenticateWithAccessToken({ accessToken });
yield bitgo.authenticateWithAccessToken({ accessToken });

const walletInstance = yield basecoin.wallets().get({ id: id });

Expand Down
2 changes: 1 addition & 1 deletion examples/js/get-wallet-balance.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const accessToken = null;
const walletId = '5941ce2db42fcbc70717e5a898fd1595';

Promise.coroutine(function* () {
bitgo.authenticateWithAccessToken({ accessToken: accessToken });
yield bitgo.authenticateWithAccessToken({ accessToken: accessToken });

const walletInstance = yield basecoin.wallets().get({ id: walletId });

Expand Down
2 changes: 1 addition & 1 deletion examples/js/get-wallet-token-balance.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const accessToken = '';
const walletId = '624ef521e876e800073b865e31b6d7e9';

Promise.coroutine(function* () {
bitgo.authenticateWithAccessToken({ accessToken: accessToken });
yield bitgo.authenticateWithAccessToken({ accessToken: accessToken });

const walletInstance = yield basecoin.wallets().get({ id: walletId, allTokens: true });

Expand Down
2 changes: 1 addition & 1 deletion examples/js/get-wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const coin = 'tltc';

// Create the wallet with Bluebird coroutines
Promise.coroutine(function* () {
bitgo.authenticateWithAccessToken({ accessToken });
yield bitgo.authenticateWithAccessToken({ accessToken });

const wallet = yield bitgo.coin(coin).wallets().get({ id });

Expand Down
2 changes: 1 addition & 1 deletion examples/js/list-wallet-addresses.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const accessToken = '';
const walletId = '';

async function main() {
bitgo.authenticateWithAccessToken({ accessToken });
await bitgo.authenticateWithAccessToken({ accessToken });

const walletInstance = await basecoin.wallets().get({ id: walletId });
const addresses = await walletInstance.addresses();
Expand Down
2 changes: 1 addition & 1 deletion examples/js/list-wallet-shares.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const accessToken = null;
const coin = 'tltc';

Promise.coroutine(function* () {
bitgo.authenticateWithAccessToken({ accessToken });
yield bitgo.authenticateWithAccessToken({ accessToken });

const shares = yield bitgo.coin(coin).wallets().listShares({});

Expand Down
2 changes: 1 addition & 1 deletion examples/js/list-wallet-transfers.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const accessToken = null;
const walletId = '5941ce2db42fcbc70717e5a898fd1595';

Promise.coroutine(function* () {
bitgo.authenticateWithAccessToken({ accessToken: accessToken });
yield bitgo.authenticateWithAccessToken({ accessToken: accessToken });

const walletInstance = yield basecoin.wallets().get({ id: walletId });
const transfers = yield walletInstance.transfers();
Expand Down
2 changes: 1 addition & 1 deletion examples/js/list-wallets.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const accessToken = null;
const coin = 'tltc';

Promise.coroutine(function* () {
bitgo.authenticateWithAccessToken({ accessToken });
yield bitgo.authenticateWithAccessToken({ accessToken });

const wallets = yield bitgo.coin(coin).wallets().list({});

Expand Down
2 changes: 1 addition & 1 deletion examples/js/resend-wallet-share-invite.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const walletShareId = null;
const coin = 'tltc';

Promise.coroutine(function* () {
bitgo.authenticateWithAccessToken({ accessToken });
yield bitgo.authenticateWithAccessToken({ accessToken });

const shareResult = yield bitgo.coin(coin).wallets().resendShareInvite({ walletShareId });

Expand Down
2 changes: 1 addition & 1 deletion examples/js/send-message.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const walletId = null;
const walletPassphrase = '';

Promise.coroutine(function* () {
bitgo.authenticateWithAccessToken({ accessToken: accessToken });
yield bitgo.authenticateWithAccessToken({ accessToken: accessToken });

const walletInstance = yield basecoin.wallets().get({ id: walletId });

Expand Down
2 changes: 1 addition & 1 deletion examples/js/send-wallet-transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const walletId = '5941ce2db42fcbc70717e5a898fd1595';
const walletPassphrase = null;

Promise.coroutine(function* () {
bitgo.authenticateWithAccessToken({ accessToken: accessToken });
yield bitgo.authenticateWithAccessToken({ accessToken: accessToken });

const walletInstance = yield basecoin.wallets().get({ id: walletId });

Expand Down
2 changes: 1 addition & 1 deletion examples/js/share-wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const passphrase = null;
const coin = 'tltc';

Promise.coroutine(function* () {
bitgo.authenticateWithAccessToken({ accessToken });
yield bitgo.authenticateWithAccessToken({ accessToken });

const wallet = yield bitgo.coin(coin).wallets().get({ id: walletId });

Expand Down
2 changes: 1 addition & 1 deletion examples/js/sol/enableTokens.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const coin = 'tsol';

// Enable tokens for your root wallet
async function main() {
bitgo.authenticateWithAccessToken({ accessToken });
await bitgo.authenticateWithAccessToken({ accessToken });
const wallet = await bitgo.coin(coin).wallets().get({ id: walletId });

const enableTokens = await wallet.sendTokenEnablements({
Expand Down
2 changes: 1 addition & 1 deletion examples/js/sol/enableTokensForAddress.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const coin = 'tsol';

// Enable tokens for a receive address
async function main() {
bitgo.authenticateWithAccessToken({ accessToken });
await bitgo.authenticateWithAccessToken({ accessToken });
const wallet = await bitgo.coin(coin).wallets().get({ id: walletId });

const enableTokens = await wallet.sendTokenEnablements({
Expand Down
2 changes: 1 addition & 1 deletion examples/js/sui/custom-tx/custom-tx.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const base64TxHex = '<base64-tx-hex>';

async function submitCustomTx() {
// (Optional) unlock if needed
bitgo.authenticateWithAccessToken({ accessToken: accessToken });
await bitgo.authenticateWithAccessToken({ accessToken: accessToken });
await bitgo.unlock({ otp: '000000', duration: 3600 });
const walletInstance = await basecoin.wallets().get({ id: walletId });

Expand Down
2 changes: 1 addition & 1 deletion examples/js/trx/consolidate-account-balances.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const otp = '000000';
const accessToken = '';

async function main() {
bitgo.authenticateWithAccessToken({ accessToken });
await bitgo.authenticateWithAccessToken({ accessToken });

const wallet = await bitgo.coin(coin).wallets().get({ id: walletId });
// Wallet's base address - only address in the wallet that can send funds to other accounts
Expand Down
2 changes: 1 addition & 1 deletion examples/js/trx/create-address.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const walletId = '';
const accessToken = '';

async function main() {
bitgo.authenticateWithAccessToken({ accessToken });
await bitgo.authenticateWithAccessToken({ accessToken });

const wallet = await bitgo.coin(coin).wallets().getWallet({ id: walletId });
const address = await wallet.createAddress({ label: 'My address' });
Expand Down
2 changes: 1 addition & 1 deletion examples/js/update-wallet-forwarders.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const walletId = '';
// toggles boolean flags for deployForwardersManually and flushForwardersManually

async function setForwarderFlags() {
bitgo.authenticateWithAccessToken({ accessToken });
await bitgo.authenticateWithAccessToken({ accessToken });
const wallet = await bitgo.coin(coin).wallets().get({ id: walletId });

const deployForwardersManually = wallet._wallet.coinSpecific.deployForwardersManually;
Expand Down
2 changes: 1 addition & 1 deletion examples/js/webhooks-add.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const label = '';
const numConfirmations = 0;

async function main() {
bitgo.authenticateWithAccessToken({ accessToken });
await bitgo.authenticateWithAccessToken({ accessToken });

const coin = bitgo.coin(network);

Expand Down
2 changes: 1 addition & 1 deletion examples/js/webhooks-list-notifications.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const accessToken = '';
const network = '';

async function main() {
bitgo.authenticateWithAccessToken({ accessToken });
await bitgo.authenticateWithAccessToken({ accessToken });

const coin = bitgo.coin(network);

Expand Down
2 changes: 1 addition & 1 deletion examples/js/webhooks-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const accessToken = '';
const network = '';

async function main() {
bitgo.authenticateWithAccessToken({ accessToken });
await bitgo.authenticateWithAccessToken({ accessToken });

const coin = bitgo.coin(network);

Expand Down
2 changes: 1 addition & 1 deletion examples/js/webhooks-remove.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const callbackUrl = '';
const type = '';

async function main() {
bitgo.authenticateWithAccessToken({ accessToken });
await bitgo.authenticateWithAccessToken({ accessToken });

const coin = bitgo.coin(network);

Expand Down
Loading
Loading