diff --git a/.eslintrc.json b/.eslintrc.json index 38795cf9..bb6e50b5 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -18,6 +18,7 @@ "rules": { "multiline-comment-style": ["error", "starred-block"], "prettier/prettier": "error", + "@typescript-eslint/member-ordering": "error", "jsdoc/tag-lines": ["error", "any", { "startLines": 1 }], "jsdoc/check-alignment": "error", "jsdoc/no-undefined-types": "off", diff --git a/.github/workflows/e2e_test.yml b/.github/workflows/e2e_test.yml index 1fd2affb..7e46bb99 100644 --- a/.github/workflows/e2e_test.yml +++ b/.github/workflows/e2e_test.yml @@ -19,4 +19,9 @@ jobs: NAME: ${{ secrets.NAME }} PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} WALLET_DATA: ${{ secrets.WALLET_DATA }} + STAKE_API_KEY_NAME: ${{ secrets.NAME }} + STAKE_API_PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} + STAKE_ADDRESS_ID_1: ${{ secrets.STAKE_ADDRESS_ID_1 }} + STAKE_ADDRESS_ID_2: ${{ secrets.STAKE_ADDRESS_ID_2 }} + STAKE_VALIDATOR_ADDRESS_1: ${{ secrets.STAKE_VALIDATOR_ADDRESS_1 }} run: npm run test:dry-run && npm run test:e2e diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e09110d5..2496e79c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,10 +1,10 @@ name: Publish Package to NPM on: - release: - types: [published] + workflow_dispatch: jobs: build: runs-on: ubuntu-latest + environment: npm permissions: contents: read id-token: write diff --git a/.gitignore b/.gitignore index 8b1eb54f..bea3c097 100644 --- a/.gitignore +++ b/.gitignore @@ -122,6 +122,7 @@ dist .tern-port # Stores VSCode versions used for testing VSCode extensions +.vscode .vscode-test # yarn v2 @@ -132,3 +133,8 @@ dist .pnp.* .DS_Store **/*_local* + +.idea + +quickstart-template/node_modules +quickstart-template/wallet-array.csv diff --git a/CHANGELOG.md b/CHANGELOG.md index f319d7e7..ac1562e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,299 @@ # Coinbase Node.js SDK Changelog +## Unreleased + +## [0.25.0] - 2025-06-04 + +### Removed + +- Removed support for network Holesky. It has been replaced by Hoodi. + +## [0.24.0] - 2025-05-06 + +- Add support for execution layer consolidations post Pectra. + +## [0.23.0] - 2025-04-16 + +- Add support for both consensus and execution based withdrawals post-pectra. + +## [0.22.0] - 2025-04-02 + +- Add `ExecutionLayerWithdrawalOptionsBuilder` to allow for native ETH execution layer withdrawals as defined in https://eips.ethereum.org/EIPS/eip-7002. +- Add `Hoodi` network support. + +## [0.21.0] - 2025-02-28 + +- Add `getWithdrawalCredentials` getter for `Validator` object to expose withdrawal credentials of an Ethereum validator. + +## [0.20.0] - 2025-02-25 + +### Added +- Add support for Ed25519 API keys. + +## [0.19.0] - 2025-02-21 +### Added +- Ability to create a SmartWallet and send a user operation. +- Add `EURC` and `cbBTC` asset support. + +## [0.18.1] - 2025-02-13 + +### Fixed +- Fixed a bug where import_wallet would fail if the address list was not being sorted by index. + +## [0.18.0] - 2025-02-13 + +### Added +- Add `TransactionReceipt` and `TransactionLog` to contract invocation response. + +## [0.17.0] - 2025-02-01 + +### Added +- Add `broadcastExternalTransaction` method to `ExternalAddress` to broadcast an external transaction. + +## [0.16.0] - 2025-01-28 + +### Added +- Add E2E test for gasless transfers `Wallet.createTransfer({..., gasless: true})` + +### Fixed +- Fixed a bug where non-checksummed asset IDs were throwing an error. + +## [0.15.0] - 2025-01-17 + +### Added + +- Add `deployContract` method to `WalletAddress` and `Wallet` to deploy an arbitrary contract. + +## [0.14.1] - 2025-01-17 + +### Fixed + +- Allow wallet mnemonic seed import to optionally accept `networkId` input argument. + +## [0.14.0] - 2025-01-14 + +### Added +- Add `skipBatching` option to `Wallet.createTransfer` to allow for lower latency gasless transfers. + +## [0.13.0] - 2024-12-19 + +### Added +- Add support for registering, updating, and listing smart contracts that are + deployed external to CDP. +- Add support for fetching address reputation + - Add `reputation` method to `Address` to fetch the reputation of the address +- Add `networkId` to `WalletData` so that it is saved with the seed data and surfaced via the export function +- Add ability to import external wallets into CDP via a BIP-39 mnemonic phrase, as a 1-of-1 wallet +- Add ability to import WalletData files exported by the Python CDP SDK +- Add getters for `Validator` object to expose more data to users. +- Add test file for `Validator` object. + +### Deprecated +- Deprecate `Wallet.loadSeed()` method in favor of `Wallet.loadSeedFromFile()` +- Deprecate `Wallet.saveSeed()` method in favor of `Wallet.saveSeedToFile()` + +## [0.12.0] - Skipped + +### [0.11.3] - 2024-12-10 + +### Added + +- Wallet address contract invocation input validation for payable contracts. + +### [0.11.2] - 2024-12-04 + +### Added + +- Add `listFundOperations` method to `Wallet` and `WalletAddress` to list the fund operations associated with the wallet or address. +- Updated `fund` and `quoteFund` methods to take `CreateFundOptions` object instead of individual parameters. + +## [0.11.1] - 2024-11-29 + +### Fixed +- Support setting `source` and `sourceVersion` correlation data via `Coinbase.configure()` + +## [0.11.0] - 2024-11-27 + +### Added +- Add support for funding wallets (Alpha feature release) + - Must reach out to CDP SDK Discord channel to be considered for this feature. +- Add `rlp_encoded_tx` field to `EthereumTransaction` interface +- Added create and update feature for `SmartContractEventActivity` webhook and its related event type filter. + +### Fixed +- Fixed a bug where the asset ID was not being set correctly for Gwei and Wei + +## [0.10.0] - 2024-10-31 + +### Added +- Add support for async faucet transactions i.e. using `faucetTx.wait()` to wait for the transaction to be confirmed. + +## [0.9.1] - 2024-10-18 + +### Fixed +- Fixed a bug where readContract was not working for nested types + +## [0.9.0] - 2024-10-17 + +### Added +- Support for readContract to read from smart contracts + +## [0.8.1] - 2024-10-09 + +### Fixed +- Fixed a bug that overwrites existing webhook notification URI when only updating a webhook's addresses + +## [0.8.0] - 2024-10-04 + +### Added +- Explicit paginated list methods for listing `Wallet`, `Transfer`, `Transaction`, `Webhook`, `PayloadSignature`, and `HistoricalBalance`. + +### Breaking +- `Webhook#update` now takes an Object of `{notificationUri, eventTypeFilter}` instead of `notificationUri` string +- list methods for listing `Wallet`, `Transfer`, `Transaction`, `Webhook`, `PayloadSignature`, and `HistoricalBalance` now take `PaginationOptions` and return `PaginationResponse` + +## [0.7.0] - 2024-09-26 + +### Added +- Add `deployNFT` method to `WalletAddress` and `Wallet` to deploy an ERC721, updated `SmartContract` class to support deployment and fetching contract details +- Add `deployMultiToken` method to `WalletAddress` and `Wallet` to deploy an ERC1155, updated `SmartContract` class to support deployment and fetching contract details +- Add `createWebhook` method to `Wallet` to deploy a wallet activity webhook, updated `Webhook` class to disallow users from specifying webhook signature. Webhook signature is now generated by the API. + +## [0.6.1] - 2024-09-23 + +### Added +- Export all missing types in `src/index` + +## [0.6.0] - 2024-09-18 + +### Added +- Add `deployToken` method to `WalletAddress` and `Wallet` to deploy an ERC20, updated `SmartContract` class to support deployment and fetching contract details +- Add SOL asset support +- Fix a bug where large numbers were being returned in scientific notation + +### Breaking +- `Asset#toAtomicAmount` now returns a BigInt instead of a Decimal + +## [0.5.1] - 2024-09-12 + +### Fixed +- Fixed a bug that blocked arbitrum mainnet wallets from being created + +## [0.5.0] - 2024-09-11 + +- Add Arbitrum-Mainnet support for Native transfers. +- Add `Coinbase.configure` method to allow for configuration of the SDK and marked constructor as deprecated. +- Return correlation ID from APIError response +- Add optional fields to `CreateContractInvocationOptions` to set amount for payable contract method invocations +- Add a `StakingRewardFormat` enum to allow for specifying the format in which staking rewards should be returned. + +## [0.4.0] - 2024-09-06 + +### Changed +- `getDefaultAddress` wallet method updated to return a promise, and `getAddress` wallet methods now return a promise and `WalletAddress` instead of `Address`. Both functions will now fetch addresses for the wallet if they haven't been loaded. + +## [0.3.0] - 2024-09-05 + +### Added + +- Add support for list address transactions. +- Add support for exporting the private key of a `WalletAddress` +- Add support for creating arbitrary payload signatures. +- Add support for invoking Smart Contracts using MPC and Developer-managed Wallets. + +## [0.2.0] + +### Added + +- USDC Faucet support on Base Sepolia +- Improved error messages for `InternalError` + +## [0.1.1] - 2024-08-27 + +- Fixed a bug where `listHistoricalBalances` method was parsing conventional ETH balances instead of atomic units + +## [0.1.0] - 2024-08-22 + +### Added + +- Add `listHistoricalBalances` wallet method, that lists the historical balances for the wallet's default address. +- Add toAddressId() method to Transaction class + +### Removed + +- Remove user concept from the SDK +- Remove "pending" status from StakingOperationStatusEnum +- Add staking operation class helper methods like `isTerminalState`, `isFailedState` and `isCompleteState`. +- Add validator status enum + +### Changed + +- The `createTransfer` and `createTrade` functions no longer wait for the transactions to confirm or + fail on-chain. + - Now they return a `Transfer` and `Trade` object respectively, which support the `wait` + function, e.g. `await transfer.wait()`. + - This ensures that the developer has a reference to the object in case there is a timeout while + waiting to land on-chain. +- Update `reload()` method to work with both External and Wallet address. +- Update `createStakingOperation` logic to make sure we only pull in newer unsigned txs from the server. + This is especially important for External Address use-case where tx signing and broadcast status is maintained on client side, and we risk overwriting the existing txs. +- Increase default timeout for `createStakingOperation` to 10 min. + +## [0.0.16] - 2024-08-14 + +### Added + +- Add Function `listHistoricalBalances` for `Address` for fetching historical balances for an asset +- Support for retrieving historical staking balances information +- USD value conversion details to the StakingReward object +- Gasless USDC Sends +- Support for Ethereum-Mainnet and Polygon-Mainnet + +## [0.0.15] - 2024-08-12 + +### Changed + +- Fixed `Wallet` address hydration for `Wallet.import` + +## [0.0.14] - 2024-08-05 + +### Added + +- Support for Shared ETH Staking for Wallet Addresses + +### Changed + +- `unsigned_payload`, `signed_payload`, `status`, and `transaction_hash` in-line fields on `Transfer` are deprecated in favor of those on `Transaction` + +## [0.0.13] - 2024-07-30 + +### Added + +- Support for trade with MPC Server-Signer +- `CreateTradeOptions` type + +## [0.0.12] - 2024-07-24 + +### Changed +- Expose `Validator` class + +## [0.0.11] - 2024-07-24 + +### Changed +- Fixed signer wallets signing flow + +## [0.0.10] - 2024-07-23 + +### Added + +- Add support for Dedicated ETH Staking for external addresses +- Add support for listing validator details and fetch details of a specific validator + +### Changed +- Improved accessibility for `StakingReward` and `StakingOperation` classes +- Fixed a bug with `StakingOperation.sign` method, where we were not properly waiting on a Promise +- Changed `buildStakeOperation`, `buildUnstakeOperation`, and `buildClaimRewardsOperation` to take `mode` as an explicit parameter optional parameter + ## [0.0.9] - 2024-06-26 ### Added diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..772c722c --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,70 @@ +# Contributing Guide + +## Development + +### Node.js Version + +Developing in this repository requires Node.js 18 or higher. + +### Set-up + +Clone the repo by running: + +```bash +git clone git@github.com:coinbase/coinbase-sdk-nodejs.git +``` + +To install all dependencies, run: + +```bash +npm install +``` + +### Linting + +To autocorrect all lint errors, run: + +```bash +npm run lint-fix +``` + +To detect all lint errors, run: + +```bash +npm run lint +``` + +### Testing + +To run all tests, run: + +```bash +npm test +``` + +To run a specific test, run (for example): + +```bash +npx jest ./src/coinbase/tests/wallet_test.ts +``` +To run e2e tests, run: + +In the root directory, create a .env file with the following configuration. Ensure to update the placeholders with your actual data: +```bash +NAME=API_KEY_NAME +PRIVATE_KEY=API_PRIVATE_KEY +WALLET_DATA={ "WALLET_ID": { "seed": "", "encrypted": false, "authTag": "", "iv": "" } } +``` + +Then run the following commands: +```bash +npm run test:dry-run && npm run test:e2e +``` + +### Generating Documentation + +To generate documentation from the TypeDoc comments, run: + +```bash +npm run docs +``` diff --git a/LICENSE.md b/LICENSE.md index 23e4364b..496a6aa6 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ Apache-2.0 License -Copyright 2024 Coinbase +Copyright 2025 Coinbase Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -12,4 +12,4 @@ Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and -limitations under the License. \ No newline at end of file +limitations under the License. diff --git a/NOTICE.md b/NOTICE.md new file mode 100644 index 00000000..939fb190 --- /dev/null +++ b/NOTICE.md @@ -0,0 +1,3 @@ +This project includes software from https://github.com/wevm/viem/ + * Copyright (c) 2023-present weth, LLC + * Licensed under MIT License \ No newline at end of file diff --git a/README.md b/README.md index d85853c6..59f5305f 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,18 @@ # Coinbase Node.js SDK -The Coinbase Node.js SDK enables the simple integration of crypto into your app. By calling Coinbase's Platform APIs, the SDK allows you to provision crypto wallets, send crypto into/out of those wallets, track wallet balances, and trade crypto from one asset into another. +[![npm version](https://img.shields.io/npm/v/@coinbase/coinbase-sdk?style=flat-square&logo=npm)](https://www.npmjs.com/package/@coinbase/coinbase-sdk) +[![npm weekly downloads](https://img.shields.io/npm/dw/@coinbase/coinbase-sdk?style=flat-square)](https://www.npmtrends.com/@coinbase/coinbase-sdk) -The SDK currently supports Customer-custodied Wallets on the Base Sepolia test network. -**NOTE: The Coinbase SDK is currently in Alpha. The SDK:** +The Coinbase Node.js SDK enables the simple integration of crypto into your app. By calling Coinbase's Platform APIs, the SDK allows you to provision crypto wallets, send crypto into/out of those wallets, track wallet balances, and trade crypto from one asset into another. -- **may make backwards-incompatible changes between releases** -- **should not be used on Mainnet (i.e. with real funds)** +The SDK supports various verbs on Developer-custodied Wallets across multiple networks, as documented [here](https://docs.cdp.coinbase.com/cdp-sdk/docs/networks). -Currently, the SDK is intended for use on testnet for quick bootstrapping of crypto wallets at hackathons, code academies, and other development settings. +*Note: As the SDK provides new capabilities and improves the developer experience, updates may occasionally include breaking changes. These will be documented in the [CHANGELOG.md](CHANGELOG.md) file.* ## Documentation -- [Platform API Documentation](https://docs.cdp.coinbase.com/platform-apis/docs/welcome) +- [CDP API Documentation](https://docs.cdp.coinbase.com/cdp-apis/docs/welcome) ## Requirements @@ -37,7 +36,7 @@ nvm use node Optional: Initialize the npm -This command initializes a new npm project with default settings and configures it to use ES modules by setting the type field to "module" in the package.json file. +This command initializes a new npm project with default settings and configures it to use ES modules by setting the type field to "module" in the package.json file. ```bash npm init -y; npm pkg set type="module" @@ -51,7 +50,7 @@ npm install @coinbase/coinbase-sdk or ```bash -yarn install @coinbase/coinbase-sdk +yarn add @coinbase/coinbase-sdk ``` ## Usage @@ -63,13 +62,13 @@ yarn install @coinbase/coinbase-sdk CommonJs: ```javascript -const { Coinbase } = require("@coinbase/coinbase-sdk"); +const { Coinbase, Wallet } = require("@coinbase/coinbase-sdk"); ``` ES modules: ```typescript -import { Coinbase } from "@coinbase/coinbase-sdk"; +import { Coinbase, Wallet } from "@coinbase/coinbase-sdk"; ``` To start, [create a CDP API Key](https://portal.cdp.coinbase.com/access/api). Then, initialize the Platform SDK by passing your API Key name and API Key's private key via the `Coinbase` constructor: @@ -79,48 +78,52 @@ const apiKeyName = "Copy your API Key name here."; const privateKey = "Copy your API Key's private key here."; -const coinbase = new Coinbase({ apiKeyName: apiKeyName, privateKey: privateKey }); +Coinbase.configure({ apiKeyName: apiKeyName, privateKey: privateKey }); ``` If you are using a CDP Server-Signer to manage your private keys, enable it with the constuctor option: ```typescript -const coinbase = new Coinbase({ apiKeyName: apiKeyName, privateKey: apiKeyPrivateKey, useServerSigner: true }) +Coinbase.configure({ apiKeyName: apiKeyName, privateKey: apiKeyPrivateKey, useServerSigner: true }) ``` Another way to initialize the SDK is by sourcing the API key from the json file that contains your API key, downloaded from CDP portal. ```typescript -const coinbase = Coinbase.configureFromJson({ filePath: "path/to/your/api-key.json" }); +Coinbase.configureFromJson({ filePath: "path/to/your/api-key.json" }); ``` -This will allow you to authenticate with the Platform APIs and get access to the default `User`. +This will allow you to authenticate with the Platform APIs. CommonJs: ```javascript -const { Coinbase } = require("@coinbase/coinbase-sdk"); -const coinbase = Coinbase.configureFromJson("path/to/your/api-key.json"); -coinbase.getDefaultUser().then(user => { - console.log(user); +const { Coinbase, Wallet } = require("@coinbase/coinbase-sdk"); +Coinbase.configureFromJson("path/to/your/api-key.json"); + +// List all Wallets for the CDP Project. +Wallet.listWallets().then(resp => { + console.log(resp.data); }); ``` Or using ES modules and async/await: ```typescript -import { Coinbase } from "@coinbase/coinbase-sdk"; -const coinbase = Coinbase.configureFromJson("path/to/your/api-key.json"); -const user = await coinbase.getDefaultUser(); -console.log(user); +import { Coinbase, Wallet } from "@coinbase/coinbase-sdk"; +Coinbase.configureFromJson("path/to/your/api-key.json"); + +// List all Wallets for the CDP Project. +const resp = await Wallet.listWallets(); +console.log(resp.data); ``` ### Wallets, Addresses, and Transfers -Now, create a Wallet from the User. Wallets are created with a single default Address. +Now, create a Wallet which will default to the Base Sepolia testnet network (if not specified). ```typescript // Create a Wallet with one Address by default. -const wallet = await user.createWallet(); +const wallet = await Wallet.create(); ``` Next, view the default Address of your Wallet. You will need this default Address in order to fund the Wallet for your first Transfer. @@ -144,25 +147,47 @@ console.log(`Faucet transaction: ${faucetTransaction}`); ```typescript // Create a new Wallet to transfer funds to. // Then, we can transfer 0.00001 ETH out of the Wallet to another Wallet. -const anotherWallet = await user.createWallet(); -const transfer = await wallet.createTransfer({ amount: 0.00001, assetId: Coinbase.assets.Eth, destination: anotherWallet }); +const anotherWallet = await Wallet.create(); +let transfer = await wallet.createTransfer({ amount: 0.00001, assetId: Coinbase.assets.Eth, destination: anotherWallet }); +transfer = await transfer.wait(); ``` +### Gasless USDC Transfers + +To transfer USDC without needing to hold ETH for gas, you can use the `createTransfer` method with the `gasless` option set to `true`. +```typescript +let transfer = await wallet.createTransfer({ amount: 0.00001, assetId: Coinbase.assets.Usdc, destination: anotherWallet, gasless: true }); +transfer = await transfer.wait(); +``` + +By default, gasless transfers are batched with other transfers, and might take longer to submit. If you want to opt out of batching, you can set the `skipBatching` option to `true`, which will submit the transaction immediately. +```typescript +let transfer = await wallet.createTransfer({ + amount: 0.00001, + assetId: Coinbase.assets.Usdc, + destination: anotherWallet, + gasless: true, + skipBatching: true +}); +transfer = await transfer.wait(); +``` + ### Trading Funds ```typescript // Create a Wallet on `base-mainnet` to trade assets with. -let mainnetWallet = await user.createWallet({ networkId: Coinbase.networks.BaseMainnet }); +let mainnetWallet = await Wallet.create({ networkId: Coinbase.networks.BaseMainnet }); console.log(`Wallet successfully created: ${mainnetWallet}`); // Fund your Wallet's default Address with ETH from an external source. // Trade 0.00001 ETH to USDC -let trade = await wallet.createTrade(0.00001, Coinbase.assets.Eth, Coinbase.assets.Usdc); +let trade = await wallet.createTrade({ amount: 0.00001, fromAssetId: Coinbase.assets.Eth, toAssetId: Coinbase.assets.Usdc }); +trade = await trade.wait(); -console.log(`Second trade successfully completed: ${trade}`); +console.log(`Trade successfully completed: ${trade}`); ``` ### Re-Instantiating Wallets @@ -185,87 +210,29 @@ await store(data); For convenience during testing, we provide a `saveSeed` method that stores the wallet's seed in your local file system. This is an insecure method of storing wallet seeds and should only be used for development purposes. ```typescript -wallet.saveSeed(wallet); +const seedFilePath = ""; +wallet.saveSeedToFile(seedFilePath); ``` To encrypt the saved data, set encrypt to true. Note that your CDP API key also serves as the encryption key for the data persisted locally. To re-instantiate wallets with encrypted data, ensure that your SDK is configured with the same API key when invoking `saveSeed` and `loadSeed`. ```typescript -wallet.saveSeed(wallet, true); +wallet.saveSeedToFile(seedFilePath, true); ``` The below code demonstrates how to re-instantiate a Wallet from the data export. ```typescript // The Wallet can be re-instantiated using the exported data. -const importedWallet = await user.importWallet(data); +const importedWallet = await Wallet.import(data); ``` To import Wallets that were persisted to your local file system using `saveSeed`, use the below code. ```typescript -// The Wallet can be re-instantiated using the exported data. -const w = await user.getWallet(w.getId()); -w.loadSeed(filePath); -``` - -## Development - -### Node.js Version - -Developing in this repository requires Node.js 18 or higher. - -### Set-up - -Clone the repo by running: - -```bash -git clone git@github.com:coinbase/coinbase-sdk-nodejs.git -``` - -To install all dependencies, run: - -```bash -npm install +const userWallet = await Wallet.fetch(wallet.getId()); +await userWallet.loadSeedFromFile(seedFilePath); ``` -### Linting - -To autocorrect all lint errors, run: - -```bash -npm run lint-fix -``` - -To detect all lint errors, run: - -```bash -npm run lint -``` - -### Testing - -To run all tests, run: - -```bash -npm test -``` - -To run a specific test, run (for example): - -```bash -npx jest ./src/coinbase/tests/wallet_test.ts -``` -To run e2e tests, run: - -```bash -npm run test:dry-run && NAME="placeholder" PRIVATE_KEY="placeholder" WALLET_DATA="placeholder" && npm run test:e2e -``` - -### Generating Documentation - -To generate documentation from the TypeDoc comments, run: - -```bash -npm run docs -``` +## Acknowledgments +This project includes code from [viem](https://github.com/wevm/viem) licensed under MIT. \ No newline at end of file diff --git a/docs/assets/highlight.css b/docs/assets/highlight.css index d3473e68..ca42aecb 100644 --- a/docs/assets/highlight.css +++ b/docs/assets/highlight.css @@ -17,6 +17,10 @@ --dark-hl-7: #9CDCFE; --light-hl-8: #098658; --dark-hl-8: #B5CEA8; + --light-hl-9: #000000; + --dark-hl-9: #C8C8C8; + --light-hl-10: #267F99; + --dark-hl-10: #4EC9B0; --light-code-background: #FFFFFF; --dark-code-background: #1E1E1E; } @@ -31,6 +35,8 @@ --hl-6: var(--light-hl-6); --hl-7: var(--light-hl-7); --hl-8: var(--light-hl-8); + --hl-9: var(--light-hl-9); + --hl-10: var(--light-hl-10); --code-background: var(--light-code-background); } } @@ -44,6 +50,8 @@ --hl-6: var(--dark-hl-6); --hl-7: var(--dark-hl-7); --hl-8: var(--dark-hl-8); + --hl-9: var(--dark-hl-9); + --hl-10: var(--dark-hl-10); --code-background: var(--dark-code-background); } } @@ -57,6 +65,8 @@ --hl-6: var(--light-hl-6); --hl-7: var(--light-hl-7); --hl-8: var(--light-hl-8); + --hl-9: var(--light-hl-9); + --hl-10: var(--light-hl-10); --code-background: var(--light-code-background); } @@ -70,6 +80,8 @@ --hl-6: var(--dark-hl-6); --hl-7: var(--dark-hl-7); --hl-8: var(--dark-hl-8); + --hl-9: var(--dark-hl-9); + --hl-10: var(--dark-hl-10); --code-background: var(--dark-code-background); } @@ -82,4 +94,6 @@ .hl-6 { color: var(--hl-6); } .hl-7 { color: var(--hl-7); } .hl-8 { color: var(--hl-8); } +.hl-9 { color: var(--hl-9); } +.hl-10 { color: var(--hl-10); } pre, code { background: var(--code-background); } diff --git a/docs/assets/navigation.js b/docs/assets/navigation.js index fc9d62f1..2a6683f3 100644 --- a/docs/assets/navigation.js +++ b/docs/assets/navigation.js @@ -1 +1 @@ -window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAE62dW2/bRh7Fv4vymnaTNO1u86bYcqOtHRu+oFgUgTCRRjY3EqklR4ndot99Id40l//ljNG3Nj7nd4ajITmcC/n7nxNnH93k3WS5KWzpJi8nO+MeJu8m22q139jmH92/f//gtpvJy8mXolxN3r15OVk+FJtVbcvJu99HxHS1qm3TiIwXR1HHevv657c/vHr718sY895sTLm050Ujl+oFqVfgMBXD2Wa6KyDeoESA08eiaq5MbbYntTWuqvEEyopEnpmlq+onPOhogPC7DPIOhM5LZ+u1WVqc7VvYiKaxWhvpJSICaBqeTEXlNgrJp4ZhzSFV62CtIQRCFYc2AUrPwfvriUw8ilhMXZnV0jTutjYre23/t7fapYezIBFls7Z1dkrkYoP2xWZ148yXory/3NnauKIqsTDZyQWeVOW6uN93cjkhlkLI9nywztbKTYs3sTGHk8z21xyoihiHHHBj66+2vinuS/BXl2xyFN5+Sb0Kx1suZ5EjfjObjXUZAbEhA9/9T3bIaOOiZo/O1qXZ4N0OxpETkHnHQRE5RYDuQ7IxK065O7GenBDwnqVZucgzs1/a7tpulvrlk5KzaGvcvlbKfRTxGLd86O8J1/abqVfNm1evrm2zq8pGpSvejFDokiD68sPOqnpr3Kzcb58bGxC4AvxiXW8+qcrDv0HHKri4oItqZTezutYuDoGOg12Z2hVmM3MPYTFktODigm6sXbUXpKIqZ1+1x98XlBxGX9tmv8kNGE18zPFGrrEDJQKEqiSVw+jn8LND9Cd9zoJE5NEzwPqdnVCj4Mw7OmJHo6E7OW+CY5Q7OKlH4eCdW7KxUcV92d43cy5LnCcvBLpAyU420JkvVm/QR5UGym3Agk2LwhpsIlaxWgP1dRoMbZCEXEKjd178fhsIn8GGI8YxBojuqxVw1wmDqKMUQt4446zeIWQ9XEj7GC4zB4mI0O90vkxE6fc2X6aiMi8Gok8Ngy4HhFoHKxeEUKjiw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K5xkIkifSOPrzisAXzFou9KAiRMt+LT0nCaDKjyYUm3FwCeQzCcENdRyNXaBIEFMtSMXORMHE5QBfcPMCcj7gxsxZEdRYyRGZeRqCGCt5ojBDQ3IpvUJXvi+a4tGvjGqzMnxCauEy0mdfguqJeI70DbGAlf0JMezk4BxIQjxoqOBHOctmnswpbiwVmeSgLEcNxRJX/thNxP17vnWTQtVP3TBfofFI0EdowK5dqhWo0NX1mV80QZlqq+S/OBIDsQ+OYA2cUmtk9MDXwLlIf5XCIwEfpcCONFZyRGZFBkGMlSyReZj1UdhHGLAjTbUKFeg7xUqZyAyTsdxYL9PVO2IgC1mf/vr0fz0rTbYRgwAA" \ No newline at end of file +window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAE6WdW3fcNpaF/4vz2jNju53OpN8UXTqaWJZakuM1q1eWFl0FSZxUFSsslm3NrP7vw2sRwLntU/2WWGd/G0SBAEiAB//4v1dN+Na8+uurYtGU1Wb36k+vFs/lalmHzau//uPw113YLD/uQn29DXXRBbZx26J5bv+0rpb7Vdj9xwh4IKH//tysV2387+Vm+eqvb3mDu1x1vZ3KM/o0L1vVRSJk9q9//OHN92//+SfZ+TY0+3pz39r9C+YzxPJXqvZxvxkcFWejuv/y7p+/RWZfi7K5qGrwp+SioV/ztFpvV6EJS8YkrUrWgsqtSrwoytWxbpnWsvrEMIzGytoqnGOKYLdauBR429WbE22+bBHsVtY34rgZL1Zl2DS04Q7/DjXRk2X7L7udyvhuDhpY7978+O7Pr99FJRkjfipWxWYR3pc7vVTfsfEG/Oc2qqrLRbHy2khKwxDmY7jbsN03QlfDQJNwGH0VmmJZNIXTIpIZVvd1sdkNDRmuH6oxTMLuZFtC6CkSAZ58K6vdTVEX69M6FG2LwB04KWJ50V51Vb/gRrMAwm8d5C0Ivdw0oX4sFgFnxxLRoo21mssYoiKAphGFmShvo9B0phnWHGi0DbYaQhJo4tAmwMVL8LHr1YlzkIEZuvQXsy1w4TDa2TYgPWwOtRVFhRsZbYcX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ZeGY4l+Oof6f8uZy0bY8A1KKoswzbZ5hq86lcBpJkInOYAy0kQlNAceNcl7uF1DC7v0GNkkwY4xL1FPa4bXphPycnfBDKz/SED4qIv3ClhHEo0Ouk2wWwSPrlrGKmAKh2/haaq0kwtVuroc8Outq+GCFLwWCDpyhoH47LJ6HNDZQhwrz9vhSrffKdPyVNMfatPNRF94JA5UVxELPbv1LWQRhuIugUaFEvylUTv02juCHC4lzuPhR1XX3txiWNFscBzPBFL9wYYpM+tnOtx3Kj11wUhhBLmlAvp5V2Jr33VbUL1+uSpGaJWYcgi3ZVvHwOQMuL4zBmXbX9lPrbxnEQE2nNSaBJ3TdWAxxDLNKH6nLzqLe9McQmQW0vCrOIVmNB2sn1Jlw/qpAuwKSoFXRt1s3YAH960TCHIJNWh6YpH3XYGGOxphanF22OMp8XKmmaOpC6v0PzNWSYSgIhKtQJpZEQF0LCNKi5pJEYt1wIz4Qxsg2CaFjTyUIh8n11v9/q3VscZzF/bRuI0QuMIdJkjpvOsW8k+Mf3XuJ4fB9e7pGH+DnTUAxMglN8llqoe/kiFa77G1S27p27kMktIkVR1q+Tliq/xp5GC9dfGc1HJP4u9rvVEfBAQrGXAuZHyUMVyS4Swao+5dLmupRtjcvNWpDxBnGyScKg+tM3V6R1l9I5pVVnwmXQ+kqtlMvK62l8aynVT5+6z/EiT9nEndVNT5ZU5uCdbV7k2NyRgGoOVwPnKJ298c1wSGVyZ//b/wM0hqRnlV4BAA==" \ No newline at end of file diff --git a/docs/assets/search.js b/docs/assets/search.js index 94373cbe..84ddc6a7 100644 --- a/docs/assets/search.js +++ b/docs/assets/search.js @@ -1 +1 @@ -window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAE+y9W5PbOJbv+1VOOF/d2SJAEmS9uV12j/fULWzX7nOiYiKDlWKmtUsp5ZaYvkzHfPcTBAgKWFwLFxJSTnTNU2VZuPyBBSwAP1z4zxeH/Zfji+9+++eLPza79Yvv2MsXu+ahffHdi9vtpt11f20eNy9evng6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XuDlA7d6zg8ZRSb2Is5E1/MwC7ONxub9dXn8fLmf/tp8mef327NEf1v0x1F8BDJeuwlvrTbl+HxphPx5urxuLyTVwnaDmSh7QSNnvfS+DqsSIxKUuTrWiNlqlF23OAb1XS0ZDN9OIKj7WWOLh3sazlGl9D5qbBUo3w/o+K9/xqrIr5fretd//te///3/A1OQTOM4SAwA"; \ No newline at end of file diff --git a/docs/classes/client_api.AddressesApi.html b/docs/classes/client_api.AddressesApi.html index 8969b3d6..8abedb48 100644 --- a/docs/classes/client_api.AddressesApi.html +++ b/docs/classes/client_api.AddressesApi.html @@ -1,51 +1,76 @@ AddressesApi | @coinbase/coinbase-sdk

AddressesApi - object-oriented interface

Export

AddressesApi

-

Hierarchy (view full)

Implements

Constructors

Hierarchy (view full)

Implements

Constructors

Properties

axios: AxiosInstance = globalAxios
basePath: string = BASE_PATH
configuration: undefined | Configuration

Methods

Constructors

Properties

axios: AxiosInstance = globalAxios
basePath: string = BASE_PATH
configuration: undefined | Configuration

Methods

  • Create a new address scoped to the wallet.

    Parameters

    • walletId: string

      The ID of the wallet to create the address in.

    • Optional createAddressRequest: CreateAddressRequest
    • Optional options: RawAxiosRequestConfig

      Override http request option.

    Returns Promise<AxiosResponse<Address, any>>

    Summary

    Create a new address

    Throws

    Memberof

    AddressesApi

    -
  • Create a new payload signature with an address.

    +

    Parameters

    • walletId: string

      The ID of the wallet the address belongs to.

      +
    • addressId: string

      The onchain address of the address to sign the payload with.

      +
    • Optional createPayloadSignatureRequest: CreatePayloadSignatureRequest
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<PayloadSignature, any>>

    Summary

    Create a new payload signature.

    +

    Throws

    Memberof

    AddressesApi

    +
  • Get address

    Parameters

    • walletId: string

      The ID of the wallet the address belongs to.

    • addressId: string

      The onchain address of the address that is being fetched.

    • Optional options: RawAxiosRequestConfig

      Override http request option.

    Returns Promise<AxiosResponse<Address, any>>

    Summary

    Get address by onchain address

    Throws

    Memberof

    AddressesApi

    -
  • Get address balance

    Parameters

    • walletId: string

      The ID of the wallet to fetch the balance for

    • addressId: string

      The onchain address of the address that is being fetched.

    • assetId: string

      The symbol of the asset to fetch the balance for

    • Optional options: RawAxiosRequestConfig

      Override http request option.

    Returns Promise<AxiosResponse<Balance, any>>

    Summary

    Get address balance for asset

    Throws

    Memberof

    AddressesApi

    -
  • Get payload signature.

    +

    Parameters

    • walletId: string

      The ID of the wallet the address belongs to.

      +
    • addressId: string

      The onchain address of the address that signed the payload.

      +
    • payloadSignatureId: string

      The ID of the payload signature to fetch.

      +
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<PayloadSignature, any>>

    Summary

    Get payload signature.

    +

    Throws

    Memberof

    AddressesApi

    +
  • Get address balances

    Parameters

    • walletId: string

      The ID of the wallet to fetch the balances for

    • addressId: string

      The onchain address of the address that is being fetched.

    • Optional page: string

      A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

    • Optional options: RawAxiosRequestConfig

      Override http request option.

    Returns Promise<AxiosResponse<AddressBalanceList, any>>

    Summary

    Get all balances for address

    Throws

    Memberof

    AddressesApi

    -
  • List addresses in the wallet.

    Parameters

    • walletId: string

      The ID of the wallet whose addresses to fetch

    • Optional limit: number

      A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

    • Optional page: string

      A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

    • Optional options: RawAxiosRequestConfig

      Override http request option.

    Returns Promise<AxiosResponse<AddressList, any>>

    Summary

    List addresses in a wallet.

    Throws

    Memberof

    AddressesApi

    -
  • List payload signatures for an address.

    +

    Parameters

    • walletId: string

      The ID of the wallet the address belongs to.

      +
    • addressId: string

      The onchain address of the address whose payload signatures to fetch.

      +
    • Optional limit: number

      A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

      +
    • Optional page: string

      A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

      +
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<PayloadSignatureList, any>>

    Summary

    List payload signatures for an address.

    +

    Throws

    Memberof

    AddressesApi

    +
  • Request faucet funds to be sent to onchain address.

    Parameters

    • walletId: string

      The ID of the wallet the address belongs to.

    • addressId: string

      The onchain address of the address that is being fetched.

      +
    • Optional assetId: string

      The ID of the asset to transfer from the faucet.

    • Optional options: RawAxiosRequestConfig

      Override http request option.

    Returns Promise<AxiosResponse<FaucetTransaction, any>>

    Summary

    Request faucet funds for onchain address.

    -

    Throws

    Memberof

    AddressesApi

    -
\ No newline at end of file +

Deprecated

Throws

Memberof

AddressesApi

+
\ No newline at end of file diff --git a/docs/classes/client_api.AssetsApi.html b/docs/classes/client_api.AssetsApi.html index dd22aed5..a24a5241 100644 --- a/docs/classes/client_api.AssetsApi.html +++ b/docs/classes/client_api.AssetsApi.html @@ -1,14 +1,14 @@ AssetsApi | @coinbase/coinbase-sdk

AssetsApi - object-oriented interface

Export

AssetsApi

-

Hierarchy (view full)

Implements

Constructors

Hierarchy (view full)

Implements

Constructors

Properties

Methods

Constructors

Properties

axios: AxiosInstance = globalAxios
basePath: string = BASE_PATH
configuration: undefined | Configuration

Methods

  • Get the asset for the specified asset ID.

    +

Constructors

Properties

axios: AxiosInstance = globalAxios
basePath: string = BASE_PATH
configuration: undefined | Configuration

Methods

  • Get the asset for the specified asset ID.

    Parameters

    • networkId: string

      The ID of the blockchain network

      -
    • assetId: string

      The ID of the asset to fetch

      +
    • assetId: string

      The ID of the asset to fetch. This could be a symbol or an ERC20 contract address.

    • Optional options: RawAxiosRequestConfig

      Override http request option.

    Returns Promise<AxiosResponse<Asset, any>>

    Summary

    Get the asset for the specified asset ID.

    Throws

    Memberof

    AssetsApi

    -
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/classes/client_api.BalanceHistoryApi.html b/docs/classes/client_api.BalanceHistoryApi.html new file mode 100644 index 00000000..41ce3ea2 --- /dev/null +++ b/docs/classes/client_api.BalanceHistoryApi.html @@ -0,0 +1,17 @@ +BalanceHistoryApi | @coinbase/coinbase-sdk

BalanceHistoryApi - object-oriented interface

+

Export

BalanceHistoryApi

+

Hierarchy (view full)

Implements

Constructors

Properties

axios: AxiosInstance = globalAxios
basePath: string = BASE_PATH
configuration: undefined | Configuration

Methods

  • List the historical balance of an asset in a specific address.

    +

    Parameters

    • networkId: string

      The ID of the blockchain network

      +
    • addressId: string

      The ID of the address to fetch the historical balance for.

      +
    • assetId: string

      The symbol of the asset to fetch the historical balance for.

      +
    • Optional limit: number

      A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

      +
    • Optional page: string

      A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

      +
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<AddressHistoricalBalanceList, any>>

    Summary

    Get address balance history for asset

    +

    Throws

    Memberof

    BalanceHistoryApi

    +
\ No newline at end of file diff --git a/docs/classes/client_api.ContractEventsApi.html b/docs/classes/client_api.ContractEventsApi.html new file mode 100644 index 00000000..d6b37a97 --- /dev/null +++ b/docs/classes/client_api.ContractEventsApi.html @@ -0,0 +1,20 @@ +ContractEventsApi | @coinbase/coinbase-sdk

ContractEventsApi - object-oriented interface

+

Export

ContractEventsApi

+

Hierarchy (view full)

Implements

Constructors

Properties

Methods

Constructors

Properties

axios: AxiosInstance = globalAxios
basePath: string = BASE_PATH
configuration: undefined | Configuration

Methods

  • Retrieve events for a specific contract

    +

    Parameters

    • networkId: string

      Unique identifier for the blockchain network

      +
    • protocolName: string

      Case-sensitive name of the blockchain protocol

      +
    • contractAddress: string

      EVM address of the smart contract (42 characters, including &#39;0x&#39;, in lowercase)

      +
    • contractName: string

      Case-sensitive name of the specific contract within the project

      +
    • eventName: string

      Case-sensitive name of the event to filter for in the contract&#39;s logs

      +
    • fromBlockHeight: number

      Lower bound of the block range to query (inclusive)

      +
    • toBlockHeight: number

      Upper bound of the block range to query (inclusive)

      +
    • Optional nextPage: string

      Pagination token for retrieving the next set of results

      +
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<ContractEventList, any>>

    Summary

    List contract events

    +

    Throws

    Memberof

    ContractEventsApi

    +
\ No newline at end of file diff --git a/docs/classes/client_api.ContractInvocationsApi.html b/docs/classes/client_api.ContractInvocationsApi.html new file mode 100644 index 00000000..1a06ac37 --- /dev/null +++ b/docs/classes/client_api.ContractInvocationsApi.html @@ -0,0 +1,39 @@ +ContractInvocationsApi | @coinbase/coinbase-sdk

ContractInvocationsApi - object-oriented interface

+

Export

ContractInvocationsApi

+

Hierarchy (view full)

Implements

Constructors

Properties

axios: AxiosInstance = globalAxios
basePath: string = BASE_PATH
configuration: undefined | Configuration

Methods

  • Broadcast a contract invocation.

    +

    Parameters

    • walletId: string

      The ID of the wallet the address belongs to.

      +
    • addressId: string

      The ID of the address the contract invocation belongs to.

      +
    • contractInvocationId: string

      The ID of the contract invocation to broadcast.

      +
    • broadcastContractInvocationRequest: BroadcastContractInvocationRequest
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<ContractInvocation, any>>

    Summary

    Broadcast a contract invocation.

    +

    Throws

    Memberof

    ContractInvocationsApi

    +
  • Get a contract invocation by ID.

    +

    Parameters

    • walletId: string

      The ID of the wallet the address belongs to.

      +
    • addressId: string

      The ID of the address the contract invocation belongs to.

      +
    • contractInvocationId: string

      The ID of the contract invocation to fetch.

      +
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<ContractInvocation, any>>

    Summary

    Get a contract invocation by ID.

    +

    Throws

    Memberof

    ContractInvocationsApi

    +
  • List contract invocations for an address.

    +

    Parameters

    • walletId: string

      The ID of the wallet the address belongs to.

      +
    • addressId: string

      The ID of the address to list contract invocations for.

      +
    • Optional limit: number

      A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

      +
    • Optional page: string

      A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

      +
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<ContractInvocationList, any>>

    Summary

    List contract invocations for an address.

    +

    Throws

    Memberof

    ContractInvocationsApi

    +
\ No newline at end of file diff --git a/docs/classes/client_api.ExternalAddressesApi.html b/docs/classes/client_api.ExternalAddressesApi.html index dce04a46..1c4d6065 100644 --- a/docs/classes/client_api.ExternalAddressesApi.html +++ b/docs/classes/client_api.ExternalAddressesApi.html @@ -1,30 +1,70 @@ ExternalAddressesApi | @coinbase/coinbase-sdk

ExternalAddressesApi - object-oriented interface

Export

ExternalAddressesApi

-

Hierarchy (view full)

Implements

Constructors

Hierarchy (view full)

Implements

Constructors

Properties

axios: AxiosInstance = globalAxios
basePath: string = BASE_PATH
configuration: undefined | Configuration

Methods

  • Get the balance of an asset in an external address

    +

Constructors

Properties

axios: AxiosInstance = globalAxios
basePath: string = BASE_PATH
configuration: undefined | Configuration

Methods

  • Broadcast an external address's transfer with a signed payload

    +

    Parameters

    • networkId: string

      The ID of the network the address belongs to

      +
    • addressId: string

      The ID of the address the transfer belongs to

      +
    • transferId: string

      The ID of the transfer to broadcast

      +
    • broadcastExternalTransferRequest: BroadcastExternalTransferRequest
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<Transfer, any>>

    Summary

    Broadcast an external address' transfer

    +

    Throws

    Memberof

    ExternalAddressesApi

    +
  • Create a new transfer between addresses.

    +

    Parameters

    • networkId: string

      The ID of the network the address is on

      +
    • addressId: string

      The ID of the address to transfer from

      +
    • createExternalTransferRequest: CreateExternalTransferRequest
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<Transfer, any>>

    Summary

    Create a new transfer

    +

    Throws

    Memberof

    ExternalAddressesApi

    +
  • Get the balance of an asset in an external address

    Parameters

    • networkId: string

      The ID of the blockchain network

    • addressId: string

      The ID of the address to fetch the balance for

    • assetId: string

      The ID of the asset to fetch the balance for

    • Optional options: RawAxiosRequestConfig

      Override http request option.

    Returns Promise<AxiosResponse<Balance, any>>

    Summary

    Get the balance of an asset in an external address

    Throws

    Memberof

    ExternalAddressesApi

    -
  • Get an external address' transfer by ID

    +

    Parameters

    • networkId: string

      The ID of the network the address is on

      +
    • addressId: string

      The ID of the address the transfer belongs to

      +
    • transferId: string

      The ID of the transfer to fetch

      +
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<Transfer, any>>

    Summary

    Get a external address' transfer

    +

    Throws

    Memberof

    ExternalAddressesApi

    +
  • Get the status of a faucet transaction

    +

    Parameters

    • networkId: string

      The ID of the blockchain network

      +
    • addressId: string

      The ID of the address to fetch the faucet transaction for

      +
    • txHash: string

      The hash of the faucet transaction

      +
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<FaucetTransaction, any>>

    Summary

    Get the status of a faucet transaction

    +

    Throws

    Memberof

    ExternalAddressesApi

    +
  • List all of the balances of an external address

    Parameters

    • networkId: string

      The ID of the blockchain network

    • addressId: string

      The ID of the address to fetch the balance for

    • Optional page: string

      A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

    • Optional options: RawAxiosRequestConfig

      Override http request option.

    Returns Promise<AxiosResponse<AddressBalanceList, any>>

    Summary

    Get the balances of an external address

    Throws

    Memberof

    ExternalAddressesApi

    -
  • Request faucet funds to be sent to external address.

    Parameters

    • networkId: string

      The ID of the wallet the address belongs to.

    • addressId: string

      The onchain address of the address that is being fetched.

      +
    • Optional assetId: string

      The ID of the asset to transfer from the faucet.

      +
    • Optional skipWait: boolean

      Whether to skip waiting for the transaction to be mined. This will become the default behavior in the future.

    • Optional options: RawAxiosRequestConfig

      Override http request option.

    Returns Promise<AxiosResponse<FaucetTransaction, any>>

    Summary

    Request faucet funds for external address.

    Throws

    Memberof

    ExternalAddressesApi

    -
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/classes/client_api.FundApi.html b/docs/classes/client_api.FundApi.html new file mode 100644 index 00000000..8edf0de9 --- /dev/null +++ b/docs/classes/client_api.FundApi.html @@ -0,0 +1,38 @@ +FundApi | @coinbase/coinbase-sdk

FundApi - object-oriented interface

+

Export

FundApi

+

Hierarchy (view full)

Implements

Constructors

Properties

axios: AxiosInstance = globalAxios
basePath: string = BASE_PATH
configuration: undefined | Configuration

Methods

  • Create a new fund operation with an address.

    +

    Parameters

    • walletId: string

      The ID of the wallet the address belongs to.

      +
    • addressId: string

      The onchain address to be funded.

      +
    • createFundOperationRequest: CreateFundOperationRequest
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<FundOperation, any>>

    Summary

    Create a new fund operation.

    +

    Throws

    Memberof

    FundApi

    +
  • Create a new fund operation with an address.

    +

    Parameters

    • walletId: string

      The ID of the wallet the address belongs to.

      +
    • addressId: string

      The onchain address to be funded.

      +
    • createFundQuoteRequest: CreateFundQuoteRequest
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<FundQuote, any>>

    Summary

    Create a Fund Operation quote.

    +

    Throws

    Memberof

    FundApi

    +
  • Get fund operation.

    +

    Parameters

    • walletId: string

      The ID of the wallet the address belongs to.

      +
    • addressId: string

      The onchain address of the address that created the fund operation.

      +
    • fundOperationId: string

      The ID of the fund operation to fetch.

      +
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<FundOperation, any>>

    Summary

    Get fund operation.

    +

    Throws

    Memberof

    FundApi

    +
  • List fund operations for an address.

    +

    Parameters

    • walletId: string

      The ID of the wallet the address belongs to.

      +
    • addressId: string

      The onchain address of the address to list fund operations for.

      +
    • Optional limit: number

      A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

      +
    • Optional page: string

      A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

      +
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<FundOperationList, any>>

    Summary

    List fund operations for an address.

    +

    Throws

    Memberof

    FundApi

    +
\ No newline at end of file diff --git a/docs/classes/client_api.MPCWalletStakeApi.html b/docs/classes/client_api.MPCWalletStakeApi.html new file mode 100644 index 00000000..10515ad0 --- /dev/null +++ b/docs/classes/client_api.MPCWalletStakeApi.html @@ -0,0 +1,30 @@ +MPCWalletStakeApi | @coinbase/coinbase-sdk

MPCWalletStakeApi - object-oriented interface

+

Export

MPCWalletStakeApi

+

Hierarchy (view full)

Implements

Constructors

Properties

axios: AxiosInstance = globalAxios
basePath: string = BASE_PATH
configuration: undefined | Configuration

Methods

  • Broadcast a staking operation.

    +

    Parameters

    • walletId: string

      The ID of the wallet the address belongs to.

      +
    • addressId: string

      The ID of the address the staking operation belongs to.

      +
    • stakingOperationId: string

      The ID of the staking operation to broadcast.

      +
    • broadcastStakingOperationRequest: BroadcastStakingOperationRequest
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<StakingOperation, any>>

    Summary

    Broadcast a staking operation

    +

    Throws

    Memberof

    MPCWalletStakeApi

    +
  • Create a new staking operation.

    +

    Parameters

    • walletId: string

      The ID of the wallet the address belongs to.

      +
    • addressId: string

      The ID of the address to create the staking operation for.

      +
    • createStakingOperationRequest: CreateStakingOperationRequest
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<StakingOperation, any>>

    Summary

    Create a new staking operation for an address

    +

    Throws

    Memberof

    MPCWalletStakeApi

    +
  • Get the latest state of a staking operation.

    +

    Parameters

    • walletId: string

      The ID of the wallet the address belongs to

      +
    • addressId: string

      The ID of the address to fetch the staking operation for.

      +
    • stakingOperationId: string

      The ID of the staking operation.

      +
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<StakingOperation, any>>

    Summary

    Get the latest state of a staking operation

    +

    Throws

    Memberof

    MPCWalletStakeApi

    +
\ No newline at end of file diff --git a/docs/classes/client_api.NetworksApi.html b/docs/classes/client_api.NetworksApi.html new file mode 100644 index 00000000..687b5077 --- /dev/null +++ b/docs/classes/client_api.NetworksApi.html @@ -0,0 +1,13 @@ +NetworksApi | @coinbase/coinbase-sdk

NetworksApi - object-oriented interface

+

Export

NetworksApi

+

Hierarchy (view full)

Implements

Constructors

Properties

Methods

Constructors

Properties

axios: AxiosInstance = globalAxios
basePath: string = BASE_PATH
configuration: undefined | Configuration

Methods

  • Get network

    +

    Parameters

    • networkId: string

      The ID of the network to fetch.

      +
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<Network, any>>

    Summary

    Get network by ID

    +

    Throws

    Memberof

    NetworksApi

    +
\ No newline at end of file diff --git a/docs/classes/client_api.OnchainIdentityApi.html b/docs/classes/client_api.OnchainIdentityApi.html new file mode 100644 index 00000000..d700c389 --- /dev/null +++ b/docs/classes/client_api.OnchainIdentityApi.html @@ -0,0 +1,17 @@ +OnchainIdentityApi | @coinbase/coinbase-sdk

OnchainIdentityApi - object-oriented interface

+

Export

OnchainIdentityApi

+

Hierarchy (view full)

Implements

Constructors

Properties

axios: AxiosInstance = globalAxios
basePath: string = BASE_PATH
configuration: undefined | Configuration

Methods

  • Obtains onchain identity for an address on a specific network

    +

    Parameters

    • networkId: string

      The ID of the blockchain network

      +
    • addressId: string

      The ID of the address to fetch the identity for

      +
    • Optional roles: ResolveIdentityByAddressRolesEnum[]

      A filter by role of the names related to this address (managed or owned)

      +
    • Optional limit: number

      A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

      +
    • Optional page: string

      A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

      +
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<OnchainNameList, any>>

    Summary

    Obtains onchain identity for an address on a specific network

    +

    Throws

    Memberof

    OnchainIdentityApi

    +
\ No newline at end of file diff --git a/docs/classes/client_api.ReputationApi.html b/docs/classes/client_api.ReputationApi.html new file mode 100644 index 00000000..8dbc7184 --- /dev/null +++ b/docs/classes/client_api.ReputationApi.html @@ -0,0 +1,14 @@ +ReputationApi | @coinbase/coinbase-sdk

ReputationApi - object-oriented interface

+

Export

ReputationApi

+

Hierarchy (view full)

Implements

Constructors

Properties

Methods

Constructors

Properties

axios: AxiosInstance = globalAxios
basePath: string = BASE_PATH
configuration: undefined | Configuration

Methods

  • Get the onchain reputation of an external address

    +

    Parameters

    • networkId: string

      The ID of the blockchain network.

      +
    • addressId: string

      The ID of the address to fetch the reputation for.

      +
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<AddressReputation, any>>

    Summary

    Get the onchain reputation of an external address

    +

    Throws

    Memberof

    ReputationApi

    +
\ No newline at end of file diff --git a/docs/classes/client_api.ServerSignersApi.html b/docs/classes/client_api.ServerSignersApi.html index 7f994d59..c81c0e3d 100644 --- a/docs/classes/client_api.ServerSignersApi.html +++ b/docs/classes/client_api.ServerSignersApi.html @@ -1,45 +1,45 @@ ServerSignersApi | @coinbase/coinbase-sdk

ServerSignersApi - object-oriented interface

Export

ServerSignersApi

-

Hierarchy (view full)

Implements

Constructors

Hierarchy (view full)

Implements

Constructors

Properties

axios: AxiosInstance = globalAxios
basePath: string = BASE_PATH
configuration: undefined | Configuration

Methods

  • Create a new Server-Signer

    +

Constructors

Properties

axios: AxiosInstance = globalAxios
basePath: string = BASE_PATH
configuration: undefined | Configuration

Methods

  • Get a server signer by ID

    Parameters

    • serverSignerId: string

      The ID of the server signer to fetch

    • Optional options: RawAxiosRequestConfig

      Override http request option.

    Returns Promise<AxiosResponse<ServerSigner, any>>

    Summary

    Get a server signer by ID

    Throws

    Memberof

    ServerSignersApi

    -
  • List events for a server signer

    Parameters

    • serverSignerId: string

      The ID of the server signer to fetch events for

    • Optional limit: number

      A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

    • Optional page: string

      A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

    • Optional options: RawAxiosRequestConfig

      Override http request option.

    Returns Promise<AxiosResponse<ServerSignerEventList, any>>

    Summary

    List events for a server signer

    -

    Throws

    Memberof

    ServerSignersApi

    -
  • List server signers for the current project

    Parameters

    • Optional limit: number

      A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

    • Optional page: string

      A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

    • Optional options: RawAxiosRequestConfig

      Override http request option.

    Returns Promise<AxiosResponse<ServerSignerList, any>>

    Summary

    List server signers for the current project

    Throws

    Memberof

    ServerSignersApi

    -
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/classes/client_api.SmartContractsApi.html b/docs/classes/client_api.SmartContractsApi.html new file mode 100644 index 00000000..7c776f30 --- /dev/null +++ b/docs/classes/client_api.SmartContractsApi.html @@ -0,0 +1,60 @@ +SmartContractsApi | @coinbase/coinbase-sdk

SmartContractsApi - object-oriented interface

+

Export

SmartContractsApi

+

Hierarchy (view full)

Implements

Constructors

Properties

axios: AxiosInstance = globalAxios
basePath: string = BASE_PATH
configuration: undefined | Configuration

Methods

  • Create a new smart contract

    +

    Parameters

    • walletId: string

      The ID of the wallet the address belongs to.

      +
    • addressId: string

      The ID of the address to deploy the smart contract from.

      +
    • createSmartContractRequest: CreateSmartContractRequest
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<SmartContract, any>>

    Summary

    Create a new smart contract

    +

    Throws

    Memberof

    SmartContractsApi

    +
  • Deploys a smart contract, by broadcasting the transaction to the network.

    +

    Parameters

    • walletId: string

      The ID of the wallet the address belongs to.

      +
    • addressId: string

      The ID of the address to broadcast the transaction from.

      +
    • smartContractId: string

      The UUID of the smart contract to broadcast the transaction to.

      +
    • deploySmartContractRequest: DeploySmartContractRequest
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<SmartContract, any>>

    Summary

    Deploy a smart contract

    +

    Throws

    Memberof

    SmartContractsApi

    +
  • Get a specific smart contract deployed by address.

    +

    Parameters

    • walletId: string

      The ID of the wallet the address belongs to.

      +
    • addressId: string

      The ID of the address to fetch the smart contract for.

      +
    • smartContractId: string

      The UUID of the smart contract to fetch.

      +
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<SmartContract, any>>

    Summary

    Get a specific smart contract deployed by address

    +

    Throws

    Memberof

    SmartContractsApi

    +
  • Perform a read operation on a smart contract without creating a transaction

    +

    Parameters

    • networkId: string
    • contractAddress: string
    • readContractRequest: ReadContractRequest
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<SolidityValue, any>>

    Summary

    Read data from a smart contract

    +

    Throws

    Memberof

    SmartContractsApi

    +
  • Register a smart contract

    +

    Parameters

    • networkId: string

      The ID of the network to fetch.

      +
    • contractAddress: string

      EVM address of the smart contract (42 characters, including &#39;0x&#39;, in lowercase)

      +
    • Optional registerSmartContractRequest: RegisterSmartContractRequest
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<SmartContract, any>>

    Summary

    Register a smart contract

    +

    Throws

    Memberof

    SmartContractsApi

    +
  • Update a smart contract

    +

    Parameters

    • networkId: string

      The ID of the network to fetch.

      +
    • contractAddress: string

      EVM address of the smart contract (42 characters, including &#39;0x&#39;, in lowercase)

      +
    • Optional updateSmartContractRequest: UpdateSmartContractRequest
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<SmartContract, any>>

    Summary

    Update a smart contract

    +

    Throws

    Memberof

    SmartContractsApi

    +
\ No newline at end of file diff --git a/docs/classes/client_api.SmartWalletsApi.html b/docs/classes/client_api.SmartWalletsApi.html new file mode 100644 index 00000000..70bee66e --- /dev/null +++ b/docs/classes/client_api.SmartWalletsApi.html @@ -0,0 +1,46 @@ +SmartWalletsApi | @coinbase/coinbase-sdk

SmartWalletsApi - object-oriented interface

+

Export

SmartWalletsApi

+

Hierarchy (view full)

Implements

Constructors

Properties

axios: AxiosInstance = globalAxios
basePath: string = BASE_PATH
configuration: undefined | Configuration

Methods

  • Broadcast a user operation

    +

    Parameters

    • smartWalletAddress: string

      The address of the smart wallet to broadcast the user operation from.

      +
    • userOpHash: string

      The hash of the user operation to broadcast

      +
    • Optional broadcastUserOperationRequest: BroadcastUserOperationRequest
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<UserOperation, any>>

    Summary

    Broadcast a user operation

    +

    Throws

    Memberof

    SmartWalletsApi

    +
  • Create a new user operation on a smart wallet.

    +

    Parameters

    • smartWalletAddress: string

      The address of the smart wallet to create the user operation on.

      +
    • networkId: string

      The ID of the network to create the user operation on.

      +
    • Optional createUserOperationRequest: CreateUserOperationRequest
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<UserOperation, any>>

    Summary

    Create a new user operation

    +

    Throws

    Memberof

    SmartWalletsApi

    +
  • Get smart wallet

    +

    Parameters

    • smartWalletAddress: string

      The address of that smart wallet to fetch.

      +
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<SmartWallet, any>>

    Summary

    Get smart wallet by address

    +

    Throws

    Memberof

    SmartWalletsApi

    +
  • Get user operation

    +

    Parameters

    • smartWalletAddress: string

      The address of the smart wallet the user operation belongs to.

      +
    • userOpHash: string

      The hash of the user operation to fetch

      +
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<UserOperation, any>>

    Summary

    Get user operation

    +

    Throws

    Memberof

    SmartWalletsApi

    +
  • List smart wallets

    +

    Parameters

    • Optional limit: number

      A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

      +
    • Optional page: string

      A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

      +
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<SmartWalletList, any>>

    Summary

    List smart wallets

    +

    Throws

    Memberof

    SmartWalletsApi

    +
\ No newline at end of file diff --git a/docs/classes/client_api.StakeApi.html b/docs/classes/client_api.StakeApi.html index 0522587a..fbdd1834 100644 --- a/docs/classes/client_api.StakeApi.html +++ b/docs/classes/client_api.StakeApi.html @@ -1,24 +1,62 @@ StakeApi | @coinbase/coinbase-sdk

StakeApi - object-oriented interface

Export

StakeApi

-

Hierarchy (view full)

Implements

Constructors

Hierarchy (view full)

Implements

Constructors

Properties

axios: AxiosInstance = globalAxios
basePath: string = BASE_PATH
configuration: undefined | Configuration

Methods

Constructors

Properties

axios: AxiosInstance = globalAxios
basePath: string = BASE_PATH
configuration: undefined | Configuration

Methods

  • Fetch historical staking balances for given address.

    +

    Parameters

    • networkId: string

      The ID of the blockchain network.

      +
    • assetId: string

      The ID of the asset for which the historical staking balances are being fetched.

      +
    • addressId: string

      The onchain address for which the historical staking balances are being fetched.

      +
    • startTime: string

      The start time of this historical staking balance period.

      +
    • endTime: string

      The end time of this historical staking balance period.

      +
    • Optional limit: number

      A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 50.

      +
    • Optional page: string

      A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

      +
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<FetchHistoricalStakingBalances200Response, any>>

    Summary

    Fetch historical staking balances

    +

    Throws

    Memberof

    StakeApi

    +
  • Fetch staking rewards for a list of addresses

    Parameters

    • fetchStakingRewardsRequest: FetchStakingRewardsRequest
    • Optional limit: number

      A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 50.

    • Optional page: string

      A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

    • Optional options: RawAxiosRequestConfig

      Override http request option.

    Returns Promise<AxiosResponse<FetchStakingRewards200Response, any>>

    Summary

    Fetch staking rewards

    Throws

    Memberof

    StakeApi

    -
  • Get the latest state of a staking operation

    +

    Parameters

    • networkId: string

      The ID of the blockchain network

      +
    • addressId: string

      The ID of the address to fetch the staking operation for

      +
    • stakingOperationId: string

      The ID of the staking operation

      +
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<StakingOperation, any>>

    Summary

    Get the latest state of a staking operation

    +

    Throws

    Memberof

    StakeApi

    +
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/classes/client_api.TradesApi.html b/docs/classes/client_api.TradesApi.html index 83d9e346..8966a48d 100644 --- a/docs/classes/client_api.TradesApi.html +++ b/docs/classes/client_api.TradesApi.html @@ -1,6 +1,6 @@ TradesApi | @coinbase/coinbase-sdk

TradesApi - object-oriented interface

Export

TradesApi

-

Hierarchy (view full)

Implements

Constructors

Hierarchy (view full)

Implements

Constructors

Properties

Constructors

Properties

axios: AxiosInstance = globalAxios
basePath: string = BASE_PATH
configuration: undefined | Configuration

Methods

  • Broadcast a trade

    +

Constructors

Properties

axios: AxiosInstance = globalAxios
basePath: string = BASE_PATH
configuration: undefined | Configuration

Methods

  • Broadcast a trade

    Parameters

    • walletId: string

      The ID of the wallet the address belongs to

    • addressId: string

      The ID of the address the trade belongs to

    • tradeId: string

      The ID of the trade to broadcast

    • broadcastTradeRequest: BroadcastTradeRequest
    • Optional options: RawAxiosRequestConfig

      Override http request option.

    Returns Promise<AxiosResponse<Trade, any>>

    Summary

    Broadcast a trade

    Throws

    Memberof

    TradesApi

    -
  • Create a new trade

    Parameters

    • walletId: string

      The ID of the wallet the source address belongs to

    • addressId: string

      The ID of the address to conduct the trade from

    • createTradeRequest: CreateTradeRequest
    • Optional options: RawAxiosRequestConfig

      Override http request option.

    Returns Promise<AxiosResponse<Trade, any>>

    Summary

    Create a new trade for an address

    Throws

    Memberof

    TradesApi

    -
  • Get a trade by ID

    Parameters

    • walletId: string

      The ID of the wallet the address belongs to

    • addressId: string

      The ID of the address the trade belongs to

    • tradeId: string

      The ID of the trade to fetch

    • Optional options: RawAxiosRequestConfig

      Override http request option.

    Returns Promise<AxiosResponse<Trade, any>>

    Summary

    Get a trade by ID

    Throws

    Memberof

    TradesApi

    -
  • List trades for an address.

    Parameters

    • walletId: string

      The ID of the wallet the address belongs to

    • addressId: string

      The ID of the address to list trades for

    • Optional limit: number

      A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

      @@ -36,4 +36,4 @@

      Throws

      Memberof

      TradesApi

    • Optional options: RawAxiosRequestConfig

      Override http request option.

    Returns Promise<AxiosResponse<TradeList, any>>

    Summary

    List trades for an address.

    Throws

    Memberof

    TradesApi

    -
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/classes/client_api.TransactionHistoryApi.html b/docs/classes/client_api.TransactionHistoryApi.html new file mode 100644 index 00000000..3902cdf5 --- /dev/null +++ b/docs/classes/client_api.TransactionHistoryApi.html @@ -0,0 +1,16 @@ +TransactionHistoryApi | @coinbase/coinbase-sdk

TransactionHistoryApi - object-oriented interface

+

Export

TransactionHistoryApi

+

Hierarchy (view full)

Implements

Constructors

Properties

axios: AxiosInstance = globalAxios
basePath: string = BASE_PATH
configuration: undefined | Configuration

Methods

  • List all transactions that interact with the address.

    +

    Parameters

    • networkId: string

      The ID of the blockchain network

      +
    • addressId: string

      The ID of the address to fetch the transactions for.

      +
    • Optional limit: number

      A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

      +
    • Optional page: string

      A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

      +
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<AddressTransactionList, any>>

    Summary

    List transactions for an address.

    +

    Throws

    Memberof

    TransactionHistoryApi

    +
\ No newline at end of file diff --git a/docs/classes/client_api.TransfersApi.html b/docs/classes/client_api.TransfersApi.html index 2dd6d093..d86ef437 100644 --- a/docs/classes/client_api.TransfersApi.html +++ b/docs/classes/client_api.TransfersApi.html @@ -1,6 +1,6 @@ TransfersApi | @coinbase/coinbase-sdk

TransfersApi - object-oriented interface

Export

TransfersApi

-

Hierarchy (view full)

Implements

Constructors

Hierarchy (view full)

Implements

Constructors

Properties

axios: AxiosInstance = globalAxios
basePath: string = BASE_PATH
configuration: undefined | Configuration

Methods

  • Broadcast a transfer

    +

Constructors

Properties

axios: AxiosInstance = globalAxios
basePath: string = BASE_PATH
configuration: undefined | Configuration

Methods

  • Broadcast a transfer

    Parameters

    • walletId: string

      The ID of the wallet the address belongs to

    • addressId: string

      The ID of the address the transfer belongs to

    • transferId: string

      The ID of the transfer to broadcast

    • broadcastTransferRequest: BroadcastTransferRequest
    • Optional options: RawAxiosRequestConfig

      Override http request option.

    Returns Promise<AxiosResponse<Transfer, any>>

    Summary

    Broadcast a transfer

    Throws

    Memberof

    TransfersApi

    -
  • Create a new transfer

    Parameters

    • walletId: string

      The ID of the wallet the source address belongs to

    • addressId: string

      The ID of the address to transfer from

    • createTransferRequest: CreateTransferRequest
    • Optional options: RawAxiosRequestConfig

      Override http request option.

    Returns Promise<AxiosResponse<Transfer, any>>

    Summary

    Create a new transfer for an address

    Throws

    Memberof

    TransfersApi

    -
  • Get a transfer by ID

    Parameters

    • walletId: string

      The ID of the wallet the address belongs to

    • addressId: string

      The ID of the address the transfer belongs to

    • transferId: string

      The ID of the transfer to fetch

    • Optional options: RawAxiosRequestConfig

      Override http request option.

    Returns Promise<AxiosResponse<Transfer, any>>

    Summary

    Get a transfer by ID

    Throws

    Memberof

    TransfersApi

    -
  • List transfers for an address.

    Parameters

    • walletId: string

      The ID of the wallet the address belongs to

    • addressId: string

      The ID of the address to list transfers for

    • Optional limit: number

      A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

      @@ -36,4 +36,4 @@

      Throws

      Memberof

      TransfersApi

    • Optional options: RawAxiosRequestConfig

      Override http request option.

    Returns Promise<AxiosResponse<TransferList, any>>

    Summary

    List transfers for an address.

    Throws

    Memberof

    TransfersApi

    -
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/classes/client_api.UsersApi.html b/docs/classes/client_api.UsersApi.html index 84058264..db7e82c2 100644 --- a/docs/classes/client_api.UsersApi.html +++ b/docs/classes/client_api.UsersApi.html @@ -1,12 +1,12 @@ UsersApi | @coinbase/coinbase-sdk

UsersApi - object-oriented interface

Export

UsersApi

-

Hierarchy (view full)

Implements

Constructors

Hierarchy (view full)

Implements

Constructors

Properties

Methods

Constructors

Properties

axios: AxiosInstance = globalAxios
basePath: string = BASE_PATH
configuration: undefined | Configuration

Methods

  • Get current user

    +

Constructors

Properties

axios: AxiosInstance = globalAxios
basePath: string = BASE_PATH
configuration: undefined | Configuration

Methods

  • Get current user

    Parameters

    • Optional options: RawAxiosRequestConfig

      Override http request option.

    Returns Promise<AxiosResponse<User, any>>

    Summary

    Get current user

    Throws

    Memberof

    UsersApi

    -
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/classes/client_api.WalletsApi.html b/docs/classes/client_api.WalletsApi.html index 7aa5b382..624e9cd1 100644 --- a/docs/classes/client_api.WalletsApi.html +++ b/docs/classes/client_api.WalletsApi.html @@ -1,6 +1,6 @@ WalletsApi | @coinbase/coinbase-sdk

WalletsApi - object-oriented interface

Export

WalletsApi

-

Hierarchy (view full)

Implements

Constructors

Hierarchy (view full)

Implements

Constructors

Properties

axios: AxiosInstance = globalAxios
basePath: string = BASE_PATH
configuration: undefined | Configuration

Methods

  • Create a new wallet scoped to the user.

    +

Constructors

Properties

axios: AxiosInstance = globalAxios
basePath: string = BASE_PATH
configuration: undefined | Configuration

Methods

  • Create a new wallet scoped to the user.

    Parameters

    • Optional createWalletRequest: CreateWalletRequest
    • Optional options: RawAxiosRequestConfig

      Override http request option.

    Returns Promise<AxiosResponse<Wallet, any>>

    Summary

    Create a new wallet

    Throws

    Memberof

    WalletsApi

    -
  • Get wallet

    Parameters

    • walletId: string

      The ID of the wallet to fetch

    • Optional options: RawAxiosRequestConfig

      Override http request option.

    Returns Promise<AxiosResponse<Wallet, any>>

    Summary

    Get wallet by ID

    Throws

    Memberof

    WalletsApi

    -
  • Get the aggregated balance of an asset across all of the addresses in the wallet.

    Parameters

    • walletId: string

      The ID of the wallet to fetch the balance for

    • assetId: string

      The symbol of the asset to fetch the balance for

    • Optional options: RawAxiosRequestConfig

      Override http request option.

    Returns Promise<AxiosResponse<Balance, any>>

    Summary

    Get the balance of an asset in the wallet

    Throws

    Memberof

    WalletsApi

    -
  • List the balances of all of the addresses in the wallet aggregated by asset.

    Parameters

    • walletId: string

      The ID of the wallet to fetch the balances for

    • Optional options: RawAxiosRequestConfig

      Override http request option.

    Returns Promise<AxiosResponse<AddressBalanceList, any>>

    Summary

    List wallet balances

    Throws

    Memberof

    WalletsApi

    -
  • List wallets belonging to the user.

    Parameters

    • Optional limit: number

      A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

    • Optional page: string

      A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

    • Optional options: RawAxiosRequestConfig

      Override http request option.

    Returns Promise<AxiosResponse<WalletList, any>>

    Summary

    List wallets

    Throws

    Memberof

    WalletsApi

    -
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/classes/client_api.WebhooksApi.html b/docs/classes/client_api.WebhooksApi.html new file mode 100644 index 00000000..0358e06b --- /dev/null +++ b/docs/classes/client_api.WebhooksApi.html @@ -0,0 +1,37 @@ +WebhooksApi | @coinbase/coinbase-sdk

WebhooksApi - object-oriented interface

+

Export

WebhooksApi

+

Hierarchy (view full)

Implements

Constructors

Properties

axios: AxiosInstance = globalAxios
basePath: string = BASE_PATH
configuration: undefined | Configuration

Methods

  • Create a new webhook scoped to a wallet

    +

    Parameters

    • walletId: string

      The ID of the wallet to create the webhook for.

      +
    • Optional createWalletWebhookRequest: CreateWalletWebhookRequest
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<Webhook, any>>

    Summary

    Create a new webhook scoped to a wallet

    +

    Throws

    Memberof

    WebhooksApi

    +
  • Delete a webhook

    +

    Parameters

    • webhookId: string

      The Webhook uuid that needs to be deleted

      +
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<void, any>>

    Summary

    Delete a webhook

    +

    Throws

    Memberof

    WebhooksApi

    +
  • List webhooks, optionally filtered by event type.

    +

    Parameters

    • Optional limit: number

      A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

      +
    • Optional page: string

      A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

      +
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<WebhookList, any>>

    Summary

    List webhooks

    +

    Throws

    Memberof

    WebhooksApi

    +
  • Update a webhook

    +

    Parameters

    • webhookId: string

      The Webhook id that needs to be updated

      +
    • Optional updateWebhookRequest: UpdateWebhookRequest
    • Optional options: RawAxiosRequestConfig

      Override http request option.

      +

    Returns Promise<AxiosResponse<Webhook, any>>

    Summary

    Update a webhook

    +

    Throws

    Memberof

    WebhooksApi

    +
\ No newline at end of file diff --git a/docs/classes/client_base.BaseAPI.html b/docs/classes/client_base.BaseAPI.html index 8e247c2c..1bd20d84 100644 --- a/docs/classes/client_base.BaseAPI.html +++ b/docs/classes/client_base.BaseAPI.html @@ -1,6 +1,6 @@ BaseAPI | @coinbase/coinbase-sdk

Export

BaseAPI

-

Hierarchy (view full)

Constructors

Hierarchy (view full)

Constructors

Properties

Constructors

Properties

axios: AxiosInstance = globalAxios
basePath: string = BASE_PATH
configuration: undefined | Configuration
\ No newline at end of file +

Constructors

Properties

axios: AxiosInstance = globalAxios
basePath: string = BASE_PATH
configuration: undefined | Configuration
\ No newline at end of file diff --git a/docs/classes/client_base.RequiredError.html b/docs/classes/client_base.RequiredError.html index 0e643c55..7fd160fd 100644 --- a/docs/classes/client_base.RequiredError.html +++ b/docs/classes/client_base.RequiredError.html @@ -1,5 +1,5 @@ RequiredError | @coinbase/coinbase-sdk

Export

RequiredError

-

Hierarchy

  • Error
    • RequiredError

Constructors

Hierarchy

  • Error
    • RequiredError

Constructors

Properties

Methods

Constructors

Properties

field: string
message: string
name: string
stack?: string
prepareStackTrace?: ((err, stackTraces) => any)

Optional override for formatting stack traces

+

Constructors

Properties

field: string
message: string
name: string
stack?: string
prepareStackTrace?: ((err, stackTraces) => any)

Optional override for formatting stack traces

Type declaration

    • (err, stackTraces): any
    • Parameters

      • err: Error
      • stackTraces: CallSite[]

      Returns any

stackTraceLimit: number

Methods

  • Create .stack property on a target object

    -

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

\ No newline at end of file +
stackTraceLimit: number

Methods

  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

\ No newline at end of file diff --git a/docs/classes/client_configuration.Configuration.html b/docs/classes/client_configuration.Configuration.html index 60adc11f..7b968b56 100644 --- a/docs/classes/client_configuration.Configuration.html +++ b/docs/classes/client_configuration.Configuration.html @@ -1,4 +1,4 @@ -Configuration | @coinbase/coinbase-sdk

Constructors

constructor +Configuration | @coinbase/coinbase-sdk

Constructors

Properties

Methods

Constructors

Properties

accessToken?: string | Promise<string> | ((name?, scopes?) => string) | ((name?, scopes?) => Promise<string>)

parameter for oauth2 security

+

Constructors

Properties

accessToken?: string | Promise<string> | ((name?, scopes?) => string) | ((name?, scopes?) => Promise<string>)

parameter for oauth2 security

Type declaration

    • (name?, scopes?): string
    • Parameters

      • Optional name: string
      • Optional scopes: string[]

      Returns string

Type declaration

    • (name?, scopes?): Promise<string>
    • Parameters

      • Optional name: string
      • Optional scopes: string[]

      Returns Promise<string>

Param: name

security name

Param: scopes

oauth2 scope

Memberof

Configuration

-
apiKey?: string | Promise<string> | ((name) => string) | ((name) => Promise<string>)

parameter for apiKey security

+
apiKey?: string | Promise<string> | ((name) => string) | ((name) => Promise<string>)

parameter for apiKey security

Type declaration

    • (name): string
    • Parameters

      • name: string

      Returns string

Type declaration

    • (name): Promise<string>
    • Parameters

      • name: string

      Returns Promise<string>

Param: name

security name

Memberof

Configuration

-
baseOptions?: any

base options for axios calls

+
baseOptions?: any

base options for axios calls

Memberof

Configuration

-
basePath?: string

override base path

+
basePath?: string

override base path

Memberof

Configuration

-
formDataCtor?: (new () => any)

The FormData constructor that will be used to create multipart form data +

formDataCtor?: (new () => any)

The FormData constructor that will be used to create multipart form data requests. You can inject this here so that execution environments that do not support the FormData class can still run the generated client.

-

Type declaration

    • new (): any
    • Returns any

password?: string

parameter for basic security

+

Type declaration

    • new (): any
    • Returns any

password?: string

parameter for basic security

Memberof

Configuration

-
serverIndex?: number

override server index

+
serverIndex?: number

override server index

Memberof

Configuration

-
username?: string

parameter for basic security

+
username?: string

parameter for basic security

Memberof

Configuration

-

Methods

Methods

  • Check if the given MIME is a JSON MIME. JSON MIME examples: application/json application/json; charset=UTF8 @@ -36,4 +36,4 @@

    Memberof

    Configuration

    application/vnd.company+json

    Parameters

    • mime: string

      MIME (Multipurpose Internet Mail Extensions)

    Returns boolean

    True if the given MIME is JSON, false otherwise.

    -
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/classes/coinbase_address.Address.html b/docs/classes/coinbase_address.Address.html index e115dd77..1b3d0352 100644 --- a/docs/classes/coinbase_address.Address.html +++ b/docs/classes/coinbase_address.Address.html @@ -1,17 +1,119 @@ Address | @coinbase/coinbase-sdk

A representation of a blockchain address, which is a user-controlled account on a network.

-

Hierarchy (view full)

Constructors

Properties

id +

Hierarchy (view full)

Constructors

  • Initializes a new Address instance.

    Parameters

    • networkId: string

      The network id.

    • id: string

      The onchain address id.

      -

    Returns Address

Properties

id: string
networkId: string

Methods

  • Returns the address ID.

    +

Returns Address

Properties

_reputation?: AddressReputation
id: string
networkId: string
MAX_HISTORICAL_BALANCE: number = 1000

Methods

  • Get the claimable balance for the supplied asset.

    +

    Parameters

    • asset_id: string

      The asset to check claimable balance for.

      +
    • mode: StakeOptionsMode = StakeOptionsMode.DEFAULT

      The staking mode. Defaults to DEFAULT.

      +
    • options: {
          [key: string]: string;
      } = {}

      Additional options for getting the claimable balance.

      +
      • [key: string]: string

    Returns Promise<Decimal>

    The claimable balance.

    +
  • Private

    Create a shallow copy of given options.

    +

    Parameters

    • Optional options: {
          [key: string]: string;
      }

      The supplied options to be copied

      +
      • [key: string]: string

    Returns {
        [key: string]: string;
    }

    A copy of the options.

    +
    • [key: string]: string
  • Requests faucet funds for the address. +Only supported on testnet networks.

    +

    Parameters

    • Optional assetId: string

      The ID of the asset to transfer from the faucet.

      +

    Returns Promise<FaucetTransaction>

    The faucet transaction object.

    +

    Throws

    If the request does not return a transaction hash.

    +

    Throws

    If the request fails.

    +
  • Returns the balance of the provided asset.

    +

    Parameters

    • assetId: string

      The asset ID.

      +

    Returns Promise<Decimal>

    The balance of the asset.

    +
  • Private

    Get the different staking balance types for the supplied asset.

    +

    Parameters

    • assetId: string

      The asset to lookup balances for.

      +
    • Optional mode: StakeOptionsMode

      The staking mode. Defaults to DEFAULT.

      +
    • Optional options: {
          [key: string]: string;
      }

      Additional options for the balance lookup.

      +
      • [key: string]: string

    Returns Promise<{
        [key: string]: Decimal;
    }>

    The different balance types.

    +
  • Lists the historical staking balances for the address.

    +

    Parameters

    • assetId: string

      The asset ID.

      +
    • startTime: string = ...

      The start time.

      +
    • endTime: string = ...

      The end time.

      +

    Returns Promise<StakingBalance[]>

    The staking balances.

    +
  • Get the pending claimable balance for the supplied asset.

    +

    Parameters

    • asset_id: string

      The asset to check pending claimable balance for.

      +
    • mode: StakeOptionsMode = StakeOptionsMode.DEFAULT

      The staking mode. Defaults to DEFAULT.

      +
    • options: {
          [key: string]: string;
      } = {}

      Additional options for getting the pending claimable balance.

      +
      • [key: string]: string

    Returns Promise<Decimal>

    The pending claimable balance.

    +
  • Get the stakeable balance for the supplied asset.

    +

    Parameters

    • asset_id: string

      The asset to check the stakeable balance for.

      +
    • mode: StakeOptionsMode = StakeOptionsMode.DEFAULT

      The staking mode. Defaults to DEFAULT.

      +
    • options: {
          [key: string]: string;
      } = {}

      Additional options for getting the stakeable balance.

      +
      • [key: string]: string

    Returns Promise<Decimal>

    The stakeable balance.

    +
  • Lists the staking rewards for the address.

    +

    Parameters

    • assetId: string

      The asset ID.

      +
    • startTime: string = ...

      The start time.

      +
    • endTime: string = ...

      The end time.

      +
    • format: StakingRewardFormat = StakingRewardFormat.USD

      The format to return the rewards in. (usd, native). Defaults to usd.

      +

    Returns Promise<StakingReward[]>

    The staking rewards.

    +
  • Returns a string representation of the address.

    Returns string

    A string representing the address.

    -
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/classes/coinbase_address_external_address.ExternalAddress.html b/docs/classes/coinbase_address_external_address.ExternalAddress.html index 4aa8a07d..26130e35 100644 --- a/docs/classes/coinbase_address_external_address.ExternalAddress.html +++ b/docs/classes/coinbase_address_external_address.ExternalAddress.html @@ -1,108 +1,172 @@ ExternalAddress | @coinbase/coinbase-sdk

A representation of a blockchain Address, which is a user-controlled account on a Network. Addresses are used to send and receive Assets. An ExternalAddress is an Address that is not controlled by the developer, but is instead controlled by the user.

-

Hierarchy (view full)

Constructors

Properties

id +

Hierarchy (view full)

Constructors

Properties

id: string
networkId: string

Methods

  • Builds a claim stake operation for the supplied asset.

    +

Returns ExternalAddress

Properties

_reputation?: AddressReputation
id: string
networkId: string

Methods

  • Builds a stake operation for the supplied asset. The stake operation +

  • mode: StakeOptionsMode = StakeOptionsMode.DEFAULT

    The staking mode. Defaults to DEFAULT.

    +
  • options: {
        [key: string]: string;
    } = {}

    Additional options for the claim stake operation.

    +

    A. Shared ETH Staking

    +
      +
    • integrator_contract_address (optional): The contract address to which the claim stake operation is directed to. Defaults to the integrator contract address associated with CDP account (if available) or else defaults to a shared integrator contract address for that network.
    • +
    +
    • [key: string]: string

Returns Promise<StakingOperation>

The claim stake operation.

+
  • Private

    Builds the staking operation based on the supplied input.

    +
  • mode: StakeOptionsMode = StakeOptionsMode.DEFAULT

    The staking mode. Defaults to DEFAULT.

    +
  • options: {
        [key: string]: string;
    } = {}

    Additional options for the stake operation:

    +

    A. Shared ETH Staking

    +
      +
    • integrator_contract_address (optional): The contract address to which the stake operation is directed to. Defaults to the integrator contract address associated with CDP account (if available) or else defaults to a shared integrator contract address for that network.
    • +
    +

    B. Dedicated ETH Staking

    +
      +
    • funding_address (optional): Ethereum address for funding the stake operation. Defaults to the address initiating the stake operation.
    • +
    • withdrawal_address (optional): Ethereum address for receiving rewards and withdrawal funds. Defaults to the address initiating the stake operation.
    • +
    • fee_recipient_address (optional): Ethereum address for receiving transaction fees. Defaults to the address initiating the stake operation.
    • +
    +
    • [key: string]: string

Returns Promise<StakingOperation>

The stake operation.

+

Returns Promise<StakingOperation>

The staking operation.

Throws

If the supplied input cannot build a valid staking operation.

-

Returns Promise<StakingOperation>

The unstake operation.

+

Returns Promise<Decimal>

The claimable balance.

+

Returns Promise<Decimal>

The stakeable balance.

+

Returns Promise<Decimal>

The unstakeable balance.

+

Returns Promise<void>

Throws

If the supplied input is not able to create a claim stake operation.

+

Returns Promise<void>

Throws

If the supplied input is not able to create a stake operation.

+
\ No newline at end of file +
  • mode: StakeOptionsMode

    The staking mode. Defaults to DEFAULT.

    +
  • options: {
        [key: string]: string;
    }

    Additional options for the unstake operation.

    +
  • Returns Promise<void>

    Throws

    If the supplied input is not able to create an unstake operation.

    +
    \ No newline at end of file diff --git a/docs/classes/coinbase_address_reputation.AddressReputation.html b/docs/classes/coinbase_address_reputation.AddressReputation.html new file mode 100644 index 00000000..9d02417a --- /dev/null +++ b/docs/classes/coinbase_address_reputation.AddressReputation.html @@ -0,0 +1,20 @@ +AddressReputation | @coinbase/coinbase-sdk

    A representation of the reputation of a blockchain address.

    +

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    Properties

    Accessors

    • get score(): number
    • Returns the score of the address. +The score is a number between -100 and 100.

      +

      Returns number

      The score of the address.

      +

    Methods

    \ No newline at end of file diff --git a/docs/classes/coinbase_address_wallet_address.WalletAddress.html b/docs/classes/coinbase_address_wallet_address.WalletAddress.html index ee7f74a5..9c4475cc 100644 --- a/docs/classes/coinbase_address_wallet_address.WalletAddress.html +++ b/docs/classes/coinbase_address_wallet_address.WalletAddress.html @@ -1,84 +1,332 @@ WalletAddress | @coinbase/coinbase-sdk

    A representation of a blockchain address, which is a wallet-controlled account on a network.

    -

    Hierarchy (view full)

    Constructors

    Properties

    id +

    Hierarchy (view full)

    Constructors

    Properties

    id: string
    key?: Wallet
    model: Address
    networkId: string

    Methods

    • Broadcasts a trade using the provided signed payloads.

      -

      Parameters

      • trade: Trade

        The Trade object representing the trade.

        -
      • signedPayload: string

        The signed payload of the trade.

        -
      • Optional approveTransactionPayload: string

        The signed payload of the approval transaction, if any.

        -

      Returns Promise<Trade>

      A promise that resolves to a Trade object representing the broadcasted trade.

      -

    Properties

    _reputation?: AddressReputation
    id: string
    key?: Wallet
    model: Address
    networkId: string

    Methods

    • Private

      A helper function that broadcasts the signed payload.

      +

      Parameters

      • stakingOperationID: string

        The staking operation id related to the signed payload.

        +
      • signedPayload: string

        The payload that's being broadcasted.

        +
      • transactionIndex: number

        The index of the transaction in the array from the staking operation.

        +

      Returns Promise<StakingOperation>

      An updated staking operation with the broadcasted transaction.

      +
    • Returns whether the Address has a private key backing it to sign transactions.

      Returns boolean

      Whether the Address has a private key backing it to sign transactions.

      -
    • Trades the given amount of the given Asset for another Asset. Only same-network Trades are supported.

      -

      Parameters

    • Get the claimable balance for the supplied asset.

      +

      Parameters

      • asset_id: string

        The asset to check claimable balance for.

        +
      • mode: StakeOptionsMode = StakeOptionsMode.DEFAULT

        The staking mode. Defaults to DEFAULT.

        +
      • options: {
            [key: string]: string;
        } = {}

        Additional options for getting the claimable balance.

        +
        • [key: string]: string

      Returns Promise<Decimal>

      The claimable balance.

      +
    • Private

      Create a shallow copy of given options.

      +

      Parameters

      • Optional options: {
            [key: string]: string;
        }

        The supplied options to be copied

        +
        • [key: string]: string

      Returns {
          [key: string]: string;
      }

      A copy of the options.

      +
      • [key: string]: string
    • Creates a staking operation to claim stake.

      +

      Parameters

      • amount: Amount

        The amount to claim stake.

        +
      • assetId: string

        The asset to claim stake.

        +
      • mode: StakeOptionsMode = StakeOptionsMode.DEFAULT

        The staking mode. Defaults to DEFAULT.

        +
      • options: {
            [key: string]: string;
        } = {}

        Additional options for the claim stake operation.

        +

        A. Shared ETH Staking

        +
          +
        • integrator_contract_address (optional): The contract address to which the claim stake operation is directed to. Defaults to the integrator contract address associated with CDP account (if available) or else defaults to a shared integrator contract address for that network.
        • +
        +
        • [key: string]: string
      • timeoutSeconds: number = 600

        The amount to wait for the transaction to complete when broadcasted.

        +
      • intervalSeconds: number = 0.2

        The amount to check each time for a successful broadcast.

        +

      Returns Promise<StakingOperation>

      The staking operation after it's completed successfully.

      +
    • Creates a contract invocation with the given data.

      +

      Parameters

      • contractAddress: string

        The address of the contract the method will be invoked on.

        +
      • method: string

        The method to invoke on the contract.

        +
      • abi: object

        The ABI of the contract.

        +
      • args: object

        The arguments to pass to the contract method invocation. + The keys should be the argument names and the values should be the argument values.

        +
      • Optional atomicAmount: string

        The atomic amount of the native asset to send to a payable contract method.

        +

      Returns Promise<ContractInvocation>

      The ContractInvocation object.

      +

      Throws

      if the API request to create a contract invocation fails.

      +
    • Creates a Payload Signature.

      +

      Parameters

      • unsignedPayload: string

        The Unsigned Payload to sign.

        +

      Returns Promise<PayloadSignature>

      A promise that resolves to the Payload Signature object.

      +

      Throws

      if the API request to create a Payload Signature fails.

      +

      Throws

      if the address does not have a private key loaded or an associated Server-Signer.

      +
    • Creates a staking operation to stake.

      +

      Parameters

      • amount: Amount

        The amount to stake.

        +
      • assetId: string

        The asset to stake.

        +
      • mode: StakeOptionsMode = StakeOptionsMode.DEFAULT

        The staking mode. Defaults to DEFAULT.

        +
      • options: {
            [key: string]: string;
        } = {}

        Additional options for the stake operation:

        +

        A. Shared ETH Staking

        +
          +
        • integrator_contract_address (optional): The contract address to which the stake operation is directed to. Defaults to the integrator contract address associated with CDP account (if available) or else defaults to a shared integrator contract address for that network.
        • +
        +

        B. Dedicated ETH Staking

        +
          +
        • funding_address (optional): Ethereum address for funding the stake operation. Defaults to the address initiating the stake operation.
        • +
        • withdrawal_address (optional): Ethereum address for receiving rewards and withdrawal funds. Defaults to the address initiating the stake operation.
        • +
        • fee_recipient_address (optional): Ethereum address for receiving transaction fees. Defaults to the address initiating the stake operation.
        • +
        +
        • [key: string]: string
      • timeoutSeconds: number = 600

        The amount to wait for the transaction to complete when broadcasted.

        +
      • intervalSeconds: number = 0.2

        The amount to check each time for a successful broadcast.

        +

      Returns Promise<StakingOperation>

      The staking operation after it's completed successfully.

      +
    • Creates a staking operation to stake, signs it, and broadcasts it on the blockchain.

      +

      Parameters

      • amount: Amount

        The amount for the staking operation.

        +
      • assetId: string

        The asset to the staking operation.

        +
      • action: string

        The type of staking action to perform.

        +
      • mode: StakeOptionsMode

        The staking mode. Defaults to DEFAULT.

        +
      • options: {
            [key: string]: string;
        }

        Additional options such as setting the mode for the staking action.

        +
        • [key: string]: string
      • timeoutSeconds: number

        The amount to wait for the transaction to complete when broadcasted.

        +
      • intervalSeconds: number

        The amount to check each time for a successful broadcast.

        +

      Returns Promise<StakingOperation>

      The staking operation after it's completed fully.

      +

      Throws

      if the API request to create or broadcast staking operation fails.

      +

      Throws

      if the amount is less than zero.

      +
    • Private

      A helper function that creates the staking operation.

      +

      Parameters

      • amount: Amount

        The amount for the staking operation.

        +
      • assetId: string

        The asset for the staking operation.

        +
      • action: string

        The type of staking action to perform.

        +
      • mode: StakeOptionsMode = StakeOptionsMode.DEFAULT

        The staking mode. Defaults to DEFAULT.

        +
      • options: {
            [key: string]: string;
        } = {}

        Additional options such as setting the mode for the staking action.

        +
        • [key: string]: string

      Returns Promise<StakingOperation>

      The created staking operation.

      +

      Throws

      if the API request to create staking operation fails.

      +
    • Trades the given amount of the given Asset for another Asset. Only same-network Trades are supported.

      +

      Parameters

      Returns Promise<Trade>

      The Trade object.

      -

      Throws

      If the private key is not loaded, or if the asset IDs are unsupported, or if there are insufficient funds.

      -
    • Creates a trade model for the specified amount and assets.

      +

      Throws

      if the API request to create or broadcast a Trade fails.

      +

      Throws

      if the Trade times out.

      +
    • Creates a trade model for the specified amount and assets.

      Parameters

      • amount: Amount

        The amount of the Asset to send.

      • fromAsset: Asset

        The Asset to trade from.

      • toAsset: Asset

        The Asset to trade to.

      Returns Promise<Trade>

      A promise that resolves to a Trade object representing the new trade.

      -
    • Transfers the given amount of the given Asset to the given address. +Only same-Network Transfers are supported. +This returns a Transfer object that has been signed and broadcasted, you +can wait for this to land on-chain (or fail) by calling transfer.wait().

      Parameters

      Returns Promise<Transfer>

      The transfer object.

      Throws

      if the API request to create a Transfer fails.

      Throws

      if the API request to broadcast a Transfer fails.

      -

      Throws

      if the Transfer times out.

      -
    • Creates a staking operation to unstake.

      +

      Parameters

      • amount: Amount

        The amount to unstake.

        +
      • assetId: string

        The asset to unstake.

        +
      • mode: StakeOptionsMode = StakeOptionsMode.DEFAULT

        The staking mode. Defaults to DEFAULT.

        +
      • options: {
            [key: string]: string;
        } = {}

        Additional options for the unstake operation:

        +

        A. Shared ETH Staking

        +
          +
        • integrator_contract_address (optional): The contract address to which the unstake operation is directed to. Defaults to the integrator contract address associated with CDP account (if available) or else defaults to a shared integrator contract address for that network.
        • +
        +

        B. Dedicated ETH Staking

        +
          +
        • immediate (optional): Set this to "true" to unstake immediately i.e. leverage "Coinbase managed unstake" process . Defaults to "false" i.e. "User managed unstake" process.
        • +
        • validator_pub_keys (optional): List of comma separated validator public keys to unstake. Defaults to validators being picked up on your behalf corresponding to the unstake amount.
        • +
        +
        • [key: string]: string
      • timeoutSeconds: number = 600

        The amount to wait for the transaction to complete when broadcasted.

        +
      • intervalSeconds: number = 0.2

        The amount to check each time for a successful broadcast.

        +

      Returns Promise<StakingOperation>

      The staking operation after it's completed successfully.

      +
    • Requests faucet funds for the address. Only supported on testnet networks.

      -

      Returns Promise<FaucetTransaction>

      The faucet transaction object.

      +

    Parameters

    • Optional assetId: string

      The ID of the asset to transfer from the faucet.

      +

    Returns Promise<FaucetTransaction>

    The faucet transaction object.

    Throws

    If the request does not return a transaction hash.

    Throws

    If the request fails.

    -
    • Returns the balance of the provided asset.

      Parameters

      • assetId: string

        The asset ID.

      Returns Promise<Decimal>

      The balance of the asset.

      -
    • Returns the address and network ID of the given destination.

      Parameters

      • destination: Destination

        The destination to get the address and network ID of.

        -

      Returns [string, string]

      The address and network ID of the destination.

      -
    • Returns the address ID.

      +

    Returns Promise<[string, string]>

    The address and network ID of the destination.

    +
    • Gets a Payload Signature.

      +

      Parameters

      • payloadSignatureId: string

        The ID of the Payload Signature to fetch.

        +

      Returns Promise<PayloadSignature>

      A promise that resolves to the Payload Signature object.

      +

      Throws

      if the API request to get the Payload Signature fails.

      +
    • Get the pending claimable balance for the supplied asset.

      +

      Parameters

      • asset_id: string

        The asset to check pending claimable balance for.

        +
      • mode: StakeOptionsMode = StakeOptionsMode.DEFAULT

        The staking mode. Defaults to DEFAULT.

        +
      • options: {
            [key: string]: string;
        } = {}

        Additional options for getting the pending claimable balance.

        +
        • [key: string]: string

      Returns Promise<Decimal>

      The pending claimable balance.

      +
    • Sets the private key.

      Parameters

      • key: Wallet

        The ethers.js SigningKey the Address uses to sign data.

      Returns void

      Throws

      If the private key is already set.

      -
    • Get the stakeable balance for the supplied asset.

      +

      Parameters

      • asset_id: string

        The asset to check the stakeable balance for.

        +
      • mode: StakeOptionsMode = StakeOptionsMode.DEFAULT

        The staking mode. Defaults to DEFAULT.

        +
      • options: {
            [key: string]: string;
        } = {}

        Additional options for getting the stakeable balance.

        +
        • [key: string]: string

      Returns Promise<Decimal>

      The stakeable balance.

      +
    • Lists the staking rewards for the address.

      +

      Parameters

      • assetId: string

        The asset ID.

        +
      • startTime: string = ...

        The start time.

        +
      • endTime: string = ...

        The end time.

        +
      • format: StakingRewardFormat = StakingRewardFormat.USD

        The format to return the rewards in. (usd, native). Defaults to usd.

        +

      Returns Promise<StakingReward[]>

      The staking rewards.

      +
    • Get the unstakeable balance for the supplied asset.

      +

      Parameters

      • asset_id: string

        The asset to check the unstakeable balance for.

        +
      • mode: StakeOptionsMode = StakeOptionsMode.DEFAULT

        The staking mode. Defaults to DEFAULT.

        +
      • options: {
            [key: string]: string;
        } = {}

        Additional options for getting the unstakeable balance. +A. Dedicated ETH Staking

        +
          +
        • validator_pub_keys (optional): List of comma separated validator public keys to retrieve unstakeable balance for. Defaults to all validators.
        • +
        +
        • [key: string]: string

      Returns Promise<Decimal>

      The unstakeable balance.

      +
    • Private

      Validate if the operation is able to claim stake with the supplied input.

      +

      Parameters

      • amount: Amount

        The amount of the asset to claim stake.

        +
      • assetId: string

        The asset to claim stake.

        +
      • mode: StakeOptionsMode

        The staking mode. Defaults to DEFAULT.

        +
      • options: {
            [key: string]: string;
        }

        Additional options for the claim stake operation.

        +
        • [key: string]: string

      Returns Promise<void>

      Throws

      If the supplied input is not able to create a claim stake operation.

      +
    • Private

      Validate if the operation is able to stake with the supplied input.

      +

      Parameters

      • amount: Amount

        The amount of the asset to stake.

        +
      • assetId: string

        The asset to stake.

        +
      • mode: StakeOptionsMode

        The staking mode. Defaults to DEFAULT.

        +
      • options: {
            [key: string]: string;
        }

        Additional options for the stake operation.

        +
        • [key: string]: string

      Returns Promise<void>

      Throws

      If the supplied input is not able to create a stake operation.

      +
    • Checks if trading is possible and raises an error if not.

      Parameters

      • amount: Amount

        The amount of the Asset to send.

      • fromAssetId: string

        The ID of the Asset to trade from. For Ether, eth, gwei, and wei are supported.

      Returns Promise<void>

      Throws

      If the private key is not loaded, or if the asset IDs are unsupported, or if there are insufficient funds.

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/classes/coinbase_api_error.APIError.html b/docs/classes/coinbase_api_error.APIError.html index 56f10692..7b7fc78d 100644 --- a/docs/classes/coinbase_api_error.APIError.html +++ b/docs/classes/coinbase_api_error.APIError.html @@ -1,10 +1,11 @@ APIError | @coinbase/coinbase-sdk

    A wrapper for API errors to provide more context.

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    +

    Returns APIError

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    correlationId: null | string
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    Type declaration

      • (err, stackTraces): any
      • Parameters

        • err: Error
        • stackTraces: CallSite[]

        Returns any

    stackTraceLimit: number

    Methods

    • Returns a String representation of the APIError.

      +
    stackTraceLimit: number

    Methods

    • Returns a String representation of the APIError.

      Returns string

      a String representation of the APIError

      -
    • Create .stack property on a target object

      -

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    • Create .stack property on a target object

      +

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    \ No newline at end of file +

    Returns APIError

    A specific APIError instance.

    +
    \ No newline at end of file diff --git a/docs/classes/coinbase_api_error.AlreadyExistsError.html b/docs/classes/coinbase_api_error.AlreadyExistsError.html index 9d2f0c7c..83d21e04 100644 --- a/docs/classes/coinbase_api_error.AlreadyExistsError.html +++ b/docs/classes/coinbase_api_error.AlreadyExistsError.html @@ -1,10 +1,11 @@ AlreadyExistsError | @coinbase/coinbase-sdk

    A wrapper for API errors to provide more context.

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    +

    Returns AlreadyExistsError

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    correlationId: null | string
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    Type declaration

      • (err, stackTraces): any
      • Parameters

        • err: Error
        • stackTraces: CallSite[]

        Returns any

    stackTraceLimit: number

    Methods

    • Returns a String representation of the APIError.

      +
    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      -

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    • Create .stack property on a target object

      +

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    \ No newline at end of file +

    Returns APIError

    A specific APIError instance.

    +
    \ No newline at end of file diff --git a/docs/classes/coinbase_api_error.FaucetLimitReachedError.html b/docs/classes/coinbase_api_error.FaucetLimitReachedError.html index 29799f68..190633b7 100644 --- a/docs/classes/coinbase_api_error.FaucetLimitReachedError.html +++ b/docs/classes/coinbase_api_error.FaucetLimitReachedError.html @@ -1,10 +1,11 @@ FaucetLimitReachedError | @coinbase/coinbase-sdk

    A wrapper for API errors to provide more context.

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    +

    Returns FaucetLimitReachedError

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    correlationId: null | string
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    Type declaration

      • (err, stackTraces): any
      • Parameters

        • err: Error
        • stackTraces: CallSite[]

        Returns any

    stackTraceLimit: number

    Methods

    • Returns a String representation of the APIError.

      +
    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      -

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    • Create .stack property on a target object

      +

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    \ No newline at end of file +

    Returns APIError

    A specific APIError instance.

    +
    \ No newline at end of file diff --git a/docs/classes/coinbase_api_error.InternalError.html b/docs/classes/coinbase_api_error.InternalError.html new file mode 100644 index 00000000..f6a5c929 --- /dev/null +++ b/docs/classes/coinbase_api_error.InternalError.html @@ -0,0 +1,46 @@ +InternalError | @coinbase/coinbase-sdk

    A wrapper for API errors to provide more context.

    +

    Hierarchy (view full)

    Constructors

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    correlationId: null | string
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    +

    Type declaration

      • (err, stackTraces): any
      • Parameters

        • err: Error
        • stackTraces: CallSite[]

        Returns any

    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      +

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    \ No newline at end of file diff --git a/docs/classes/coinbase_api_error.InvalidAddressError.html b/docs/classes/coinbase_api_error.InvalidAddressError.html index f3fefe5e..54dd4ebf 100644 --- a/docs/classes/coinbase_api_error.InvalidAddressError.html +++ b/docs/classes/coinbase_api_error.InvalidAddressError.html @@ -1,10 +1,11 @@ InvalidAddressError | @coinbase/coinbase-sdk

    A wrapper for API errors to provide more context.

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    +

    Returns InvalidAddressError

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    correlationId: null | string
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    Type declaration

      • (err, stackTraces): any
      • Parameters

        • err: Error
        • stackTraces: CallSite[]

        Returns any

    stackTraceLimit: number

    Methods

    • Returns a String representation of the APIError.

      +
    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      -

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    • Create .stack property on a target object

      +

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    \ No newline at end of file +

    Returns APIError

    A specific APIError instance.

    +
    \ No newline at end of file diff --git a/docs/classes/coinbase_api_error.InvalidAddressIDError.html b/docs/classes/coinbase_api_error.InvalidAddressIDError.html index dc737c02..1c5379af 100644 --- a/docs/classes/coinbase_api_error.InvalidAddressIDError.html +++ b/docs/classes/coinbase_api_error.InvalidAddressIDError.html @@ -1,10 +1,11 @@ InvalidAddressIDError | @coinbase/coinbase-sdk

    A wrapper for API errors to provide more context.

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    +

    Returns InvalidAddressIDError

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    correlationId: null | string
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    Type declaration

      • (err, stackTraces): any
      • Parameters

        • err: Error
        • stackTraces: CallSite[]

        Returns any

    stackTraceLimit: number

    Methods

    • Returns a String representation of the APIError.

      +
    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      -

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    • Create .stack property on a target object

      +

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    \ No newline at end of file +

    Returns APIError

    A specific APIError instance.

    +
    \ No newline at end of file diff --git a/docs/classes/coinbase_api_error.InvalidAmountError.html b/docs/classes/coinbase_api_error.InvalidAmountError.html index 086c155f..c2fde73f 100644 --- a/docs/classes/coinbase_api_error.InvalidAmountError.html +++ b/docs/classes/coinbase_api_error.InvalidAmountError.html @@ -1,10 +1,11 @@ InvalidAmountError | @coinbase/coinbase-sdk

    A wrapper for API errors to provide more context.

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    +

    Returns InvalidAmountError

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    correlationId: null | string
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    Type declaration

      • (err, stackTraces): any
      • Parameters

        • err: Error
        • stackTraces: CallSite[]

        Returns any

    stackTraceLimit: number

    Methods

    • Returns a String representation of the APIError.

      +
    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      -

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    • Create .stack property on a target object

      +

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    \ No newline at end of file +

    Returns APIError

    A specific APIError instance.

    +
    \ No newline at end of file diff --git a/docs/classes/coinbase_api_error.InvalidAssetIDError.html b/docs/classes/coinbase_api_error.InvalidAssetIDError.html index 7ed49fad..64965edb 100644 --- a/docs/classes/coinbase_api_error.InvalidAssetIDError.html +++ b/docs/classes/coinbase_api_error.InvalidAssetIDError.html @@ -1,10 +1,11 @@ InvalidAssetIDError | @coinbase/coinbase-sdk

    A wrapper for API errors to provide more context.

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    +

    Returns InvalidAssetIDError

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    correlationId: null | string
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    Type declaration

      • (err, stackTraces): any
      • Parameters

        • err: Error
        • stackTraces: CallSite[]

        Returns any

    stackTraceLimit: number

    Methods

    • Returns a String representation of the APIError.

      +
    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      -

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    • Create .stack property on a target object

      +

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    \ No newline at end of file +

    Returns APIError

    A specific APIError instance.

    +
    \ No newline at end of file diff --git a/docs/classes/coinbase_api_error.InvalidDestinationError.html b/docs/classes/coinbase_api_error.InvalidDestinationError.html index f3297a82..c1612e1d 100644 --- a/docs/classes/coinbase_api_error.InvalidDestinationError.html +++ b/docs/classes/coinbase_api_error.InvalidDestinationError.html @@ -1,10 +1,11 @@ InvalidDestinationError | @coinbase/coinbase-sdk

    A wrapper for API errors to provide more context.

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    +

    Returns InvalidDestinationError

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    correlationId: null | string
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    Type declaration

      • (err, stackTraces): any
      • Parameters

        • err: Error
        • stackTraces: CallSite[]

        Returns any

    stackTraceLimit: number

    Methods

    • Returns a String representation of the APIError.

      +
    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      -

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    • Create .stack property on a target object

      +

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    \ No newline at end of file +

    Returns APIError

    A specific APIError instance.

    +
    \ No newline at end of file diff --git a/docs/classes/coinbase_api_error.InvalidLimitError.html b/docs/classes/coinbase_api_error.InvalidLimitError.html index 50b341a2..fddc179b 100644 --- a/docs/classes/coinbase_api_error.InvalidLimitError.html +++ b/docs/classes/coinbase_api_error.InvalidLimitError.html @@ -1,10 +1,11 @@ InvalidLimitError | @coinbase/coinbase-sdk

    A wrapper for API errors to provide more context.

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    +

    Returns InvalidLimitError

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    correlationId: null | string
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    Type declaration

      • (err, stackTraces): any
      • Parameters

        • err: Error
        • stackTraces: CallSite[]

        Returns any

    stackTraceLimit: number

    Methods

    • Returns a String representation of the APIError.

      +
    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      -

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    • Create .stack property on a target object

      +

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    \ No newline at end of file +

    Returns APIError

    A specific APIError instance.

    +
    \ No newline at end of file diff --git a/docs/classes/coinbase_api_error.InvalidNetworkIDError.html b/docs/classes/coinbase_api_error.InvalidNetworkIDError.html index 50c312d5..07465721 100644 --- a/docs/classes/coinbase_api_error.InvalidNetworkIDError.html +++ b/docs/classes/coinbase_api_error.InvalidNetworkIDError.html @@ -1,10 +1,11 @@ InvalidNetworkIDError | @coinbase/coinbase-sdk

    A wrapper for API errors to provide more context.

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    +

    Returns InvalidNetworkIDError

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    correlationId: null | string
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    Type declaration

      • (err, stackTraces): any
      • Parameters

        • err: Error
        • stackTraces: CallSite[]

        Returns any

    stackTraceLimit: number

    Methods

    • Returns a String representation of the APIError.

      +
    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      -

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    • Create .stack property on a target object

      +

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    \ No newline at end of file +

    Returns APIError

    A specific APIError instance.

    +
    \ No newline at end of file diff --git a/docs/classes/coinbase_api_error.InvalidPageError.html b/docs/classes/coinbase_api_error.InvalidPageError.html index fc7d5a90..779f6f07 100644 --- a/docs/classes/coinbase_api_error.InvalidPageError.html +++ b/docs/classes/coinbase_api_error.InvalidPageError.html @@ -1,10 +1,11 @@ InvalidPageError | @coinbase/coinbase-sdk

    A wrapper for API errors to provide more context.

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    +

    Returns InvalidPageError

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    correlationId: null | string
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    Type declaration

      • (err, stackTraces): any
      • Parameters

        • err: Error
        • stackTraces: CallSite[]

        Returns any

    stackTraceLimit: number

    Methods

    • Returns a String representation of the APIError.

      +
    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      -

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    • Create .stack property on a target object

      +

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    \ No newline at end of file +

    Returns APIError

    A specific APIError instance.

    +
    \ No newline at end of file diff --git a/docs/classes/coinbase_api_error.InvalidSignedPayloadError.html b/docs/classes/coinbase_api_error.InvalidSignedPayloadError.html index 444e9a2f..b2f03a95 100644 --- a/docs/classes/coinbase_api_error.InvalidSignedPayloadError.html +++ b/docs/classes/coinbase_api_error.InvalidSignedPayloadError.html @@ -1,10 +1,11 @@ InvalidSignedPayloadError | @coinbase/coinbase-sdk

    A wrapper for API errors to provide more context.

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    +

    Returns InvalidSignedPayloadError

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    correlationId: null | string
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    Type declaration

      • (err, stackTraces): any
      • Parameters

        • err: Error
        • stackTraces: CallSite[]

        Returns any

    stackTraceLimit: number

    Methods

    • Returns a String representation of the APIError.

      +
    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      -

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    • Create .stack property on a target object

      +

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    \ No newline at end of file +

    Returns APIError

    A specific APIError instance.

    +
    \ No newline at end of file diff --git a/docs/classes/coinbase_api_error.InvalidTransferIDError.html b/docs/classes/coinbase_api_error.InvalidTransferIDError.html index 72ed3c5c..23286610 100644 --- a/docs/classes/coinbase_api_error.InvalidTransferIDError.html +++ b/docs/classes/coinbase_api_error.InvalidTransferIDError.html @@ -1,10 +1,11 @@ InvalidTransferIDError | @coinbase/coinbase-sdk

    A wrapper for API errors to provide more context.

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    +

    Returns InvalidTransferIDError

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    correlationId: null | string
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    Type declaration

      • (err, stackTraces): any
      • Parameters

        • err: Error
        • stackTraces: CallSite[]

        Returns any

    stackTraceLimit: number

    Methods

    • Returns a String representation of the APIError.

      +
    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      -

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    • Create .stack property on a target object

      +

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    \ No newline at end of file +

    Returns APIError

    A specific APIError instance.

    +
    \ No newline at end of file diff --git a/docs/classes/coinbase_api_error.InvalidTransferStatusError.html b/docs/classes/coinbase_api_error.InvalidTransferStatusError.html index eb41ccbb..a4eb44e7 100644 --- a/docs/classes/coinbase_api_error.InvalidTransferStatusError.html +++ b/docs/classes/coinbase_api_error.InvalidTransferStatusError.html @@ -1,10 +1,11 @@ InvalidTransferStatusError | @coinbase/coinbase-sdk

    A wrapper for API errors to provide more context.

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    +

    Returns InvalidTransferStatusError

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    correlationId: null | string
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    Type declaration

      • (err, stackTraces): any
      • Parameters

        • err: Error
        • stackTraces: CallSite[]

        Returns any

    stackTraceLimit: number

    Methods

    • Returns a String representation of the APIError.

      +
    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      -

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    • Create .stack property on a target object

      +

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    \ No newline at end of file +

    Returns APIError

    A specific APIError instance.

    +
    \ No newline at end of file diff --git a/docs/classes/coinbase_api_error.InvalidWalletError.html b/docs/classes/coinbase_api_error.InvalidWalletError.html index accde9bd..bce82ff8 100644 --- a/docs/classes/coinbase_api_error.InvalidWalletError.html +++ b/docs/classes/coinbase_api_error.InvalidWalletError.html @@ -1,10 +1,11 @@ InvalidWalletError | @coinbase/coinbase-sdk

    A wrapper for API errors to provide more context.

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    +

    Returns InvalidWalletError

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    correlationId: null | string
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    Type declaration

      • (err, stackTraces): any
      • Parameters

        • err: Error
        • stackTraces: CallSite[]

        Returns any

    stackTraceLimit: number

    Methods

    • Returns a String representation of the APIError.

      +
    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      -

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    • Create .stack property on a target object

      +

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    \ No newline at end of file +

    Returns APIError

    A specific APIError instance.

    +
    \ No newline at end of file diff --git a/docs/classes/coinbase_api_error.InvalidWalletIDError.html b/docs/classes/coinbase_api_error.InvalidWalletIDError.html index 5eb16c5a..ed79cc86 100644 --- a/docs/classes/coinbase_api_error.InvalidWalletIDError.html +++ b/docs/classes/coinbase_api_error.InvalidWalletIDError.html @@ -1,10 +1,11 @@ InvalidWalletIDError | @coinbase/coinbase-sdk

    A wrapper for API errors to provide more context.

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    +

    Returns InvalidWalletIDError

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    correlationId: null | string
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    Type declaration

      • (err, stackTraces): any
      • Parameters

        • err: Error
        • stackTraces: CallSite[]

        Returns any

    stackTraceLimit: number

    Methods

    • Returns a String representation of the APIError.

      +
    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      -

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    • Create .stack property on a target object

      +

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    \ No newline at end of file +

    Returns APIError

    A specific APIError instance.

    +
    \ No newline at end of file diff --git a/docs/classes/coinbase_api_error.MalformedRequestError.html b/docs/classes/coinbase_api_error.MalformedRequestError.html index 8693f0ca..ab24d4ab 100644 --- a/docs/classes/coinbase_api_error.MalformedRequestError.html +++ b/docs/classes/coinbase_api_error.MalformedRequestError.html @@ -1,10 +1,11 @@ MalformedRequestError | @coinbase/coinbase-sdk

    A wrapper for API errors to provide more context.

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    +

    Returns MalformedRequestError

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    correlationId: null | string
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    Type declaration

      • (err, stackTraces): any
      • Parameters

        • err: Error
        • stackTraces: CallSite[]

        Returns any

    stackTraceLimit: number

    Methods

    • Returns a String representation of the APIError.

      +
    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      -

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    • Create .stack property on a target object

      +

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    \ No newline at end of file +

    Returns APIError

    A specific APIError instance.

    +
    \ No newline at end of file diff --git a/docs/classes/coinbase_api_error.NetworkFeatureUnsupportedError.html b/docs/classes/coinbase_api_error.NetworkFeatureUnsupportedError.html index 5d189e6d..7ab7f002 100644 --- a/docs/classes/coinbase_api_error.NetworkFeatureUnsupportedError.html +++ b/docs/classes/coinbase_api_error.NetworkFeatureUnsupportedError.html @@ -1,10 +1,11 @@ NetworkFeatureUnsupportedError | @coinbase/coinbase-sdk

    A wrapper for API errors to provide more context.

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    +

    Returns NetworkFeatureUnsupportedError

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    correlationId: null | string
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    Type declaration

      • (err, stackTraces): any
      • Parameters

        • err: Error
        • stackTraces: CallSite[]

        Returns any

    stackTraceLimit: number

    Methods

    • Returns a String representation of the APIError.

      +
    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      -

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    • Create .stack property on a target object

      +

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    \ No newline at end of file +

    Returns APIError

    A specific APIError instance.

    +
    \ No newline at end of file diff --git a/docs/classes/coinbase_api_error.NotFoundError.html b/docs/classes/coinbase_api_error.NotFoundError.html index 61626d3a..6f5658e2 100644 --- a/docs/classes/coinbase_api_error.NotFoundError.html +++ b/docs/classes/coinbase_api_error.NotFoundError.html @@ -1,10 +1,11 @@ NotFoundError | @coinbase/coinbase-sdk

    A wrapper for API errors to provide more context.

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    +

    Returns NotFoundError

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    correlationId: null | string
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    Type declaration

      • (err, stackTraces): any
      • Parameters

        • err: Error
        • stackTraces: CallSite[]

        Returns any

    stackTraceLimit: number

    Methods

    • Returns a String representation of the APIError.

      +
    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      -

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    • Create .stack property on a target object

      +

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    \ No newline at end of file +

    Returns APIError

    A specific APIError instance.

    +
    \ No newline at end of file diff --git a/docs/classes/coinbase_api_error.ResourceExhaustedError.html b/docs/classes/coinbase_api_error.ResourceExhaustedError.html index 1ca00896..f6fc3c49 100644 --- a/docs/classes/coinbase_api_error.ResourceExhaustedError.html +++ b/docs/classes/coinbase_api_error.ResourceExhaustedError.html @@ -1,10 +1,11 @@ ResourceExhaustedError | @coinbase/coinbase-sdk

    A wrapper for API errors to provide more context.

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    +

    Returns ResourceExhaustedError

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    correlationId: null | string
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    Type declaration

      • (err, stackTraces): any
      • Parameters

        • err: Error
        • stackTraces: CallSite[]

        Returns any

    stackTraceLimit: number

    Methods

    • Returns a String representation of the APIError.

      +
    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      -

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    • Create .stack property on a target object

      +

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    \ No newline at end of file +

    Returns APIError

    A specific APIError instance.

    +
    \ No newline at end of file diff --git a/docs/classes/coinbase_api_error.UnauthorizedError.html b/docs/classes/coinbase_api_error.UnauthorizedError.html index 22a83c30..31dddb80 100644 --- a/docs/classes/coinbase_api_error.UnauthorizedError.html +++ b/docs/classes/coinbase_api_error.UnauthorizedError.html @@ -1,10 +1,11 @@ UnauthorizedError | @coinbase/coinbase-sdk

    A wrapper for API errors to provide more context.

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    +

    Returns UnauthorizedError

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    correlationId: null | string
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    Type declaration

      • (err, stackTraces): any
      • Parameters

        • err: Error
        • stackTraces: CallSite[]

        Returns any

    stackTraceLimit: number

    Methods

    • Returns a String representation of the APIError.

      +
    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      -

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    • Create .stack property on a target object

      +

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    \ No newline at end of file +

    Returns APIError

    A specific APIError instance.

    +
    \ No newline at end of file diff --git a/docs/classes/coinbase_api_error.UnimplementedError.html b/docs/classes/coinbase_api_error.UnimplementedError.html index eec18554..8e0a6964 100644 --- a/docs/classes/coinbase_api_error.UnimplementedError.html +++ b/docs/classes/coinbase_api_error.UnimplementedError.html @@ -1,10 +1,11 @@ UnimplementedError | @coinbase/coinbase-sdk

    A wrapper for API errors to provide more context.

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    +

    Returns UnimplementedError

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    correlationId: null | string
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    Type declaration

      • (err, stackTraces): any
      • Parameters

        • err: Error
        • stackTraces: CallSite[]

        Returns any

    stackTraceLimit: number

    Methods

    • Returns a String representation of the APIError.

      +
    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      -

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    • Create .stack property on a target object

      +

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    \ No newline at end of file +

    Returns APIError

    A specific APIError instance.

    +
    \ No newline at end of file diff --git a/docs/classes/coinbase_api_error.UnsupportedAssetError.html b/docs/classes/coinbase_api_error.UnsupportedAssetError.html index a584ee2d..a7e86572 100644 --- a/docs/classes/coinbase_api_error.UnsupportedAssetError.html +++ b/docs/classes/coinbase_api_error.UnsupportedAssetError.html @@ -1,10 +1,11 @@ UnsupportedAssetError | @coinbase/coinbase-sdk

    A wrapper for API errors to provide more context.

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    +

    Returns UnsupportedAssetError

    Properties

    apiCode: null | string
    apiMessage: null | string
    cause?: Error
    code?: string
    config?: InternalAxiosRequestConfig<any>
    correlationId: null | string
    httpCode: null | number
    isAxiosError: boolean
    message: string
    name: string
    request?: any
    response?: AxiosResponse<unknown, any>
    stack?: string
    status?: number
    toJSON: (() => object)

    Type declaration

      • (): object
      • Returns object

    ECONNABORTED: "ECONNABORTED" = "ECONNABORTED"
    ERR_BAD_OPTION: "ERR_BAD_OPTION" = "ERR_BAD_OPTION"
    ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE" = "ERR_BAD_OPTION_VALUE"
    ERR_BAD_REQUEST: "ERR_BAD_REQUEST" = "ERR_BAD_REQUEST"
    ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE" = "ERR_BAD_RESPONSE"
    ERR_CANCELED: "ERR_CANCELED" = "ERR_CANCELED"
    ERR_DEPRECATED: "ERR_DEPRECATED" = "ERR_DEPRECATED"
    ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS" = "ERR_FR_TOO_MANY_REDIRECTS"
    ERR_INVALID_URL: "ERR_INVALID_URL" = "ERR_INVALID_URL"
    ERR_NETWORK: "ERR_NETWORK" = "ERR_NETWORK"
    ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT" = "ERR_NOT_SUPPORT"
    ETIMEDOUT: "ETIMEDOUT" = "ETIMEDOUT"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    Type declaration

      • (err, stackTraces): any
      • Parameters

        • err: Error
        • stackTraces: CallSite[]

        Returns any

    stackTraceLimit: number

    Methods

    • Returns a String representation of the APIError.

      +
    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      -

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    • Create .stack property on a target object

      +

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    • Type Parameters

      • T = unknown
      • D = any

      Parameters

      • error: unknown
      • Optional code: string
      • Optional config: InternalAxiosRequestConfig<D>
      • Optional request: any
      • Optional response: AxiosResponse<T, D>
      • Optional customProps: object

      Returns AxiosError<T, D>

    \ No newline at end of file +

    Returns APIError

    A specific APIError instance.

    +
    \ No newline at end of file diff --git a/docs/classes/coinbase_asset.Asset.html b/docs/classes/coinbase_asset.Asset.html index be32c419..a49e888a 100644 --- a/docs/classes/coinbase_asset.Asset.html +++ b/docs/classes/coinbase_asset.Asset.html @@ -1,5 +1,5 @@ Asset | @coinbase/coinbase-sdk

    A representation of an Asset.

    -

    Constructors

    Constructors

    Properties

    assetId contractAddress decimals @@ -17,31 +17,31 @@
  • assetId: string

    The asset ID.

  • contractAddress: string

    The address ID.

  • decimals: number

    The number of decimals.

    -
  • Returns Asset

    Properties

    assetId: string
    contractAddress: string
    decimals: number
    networkId: string

    Methods

    • Converts the amount of the Asset from atomic to whole units.

      -

      Parameters

      • wholeAmount: Decimal

        The atomic amount to convert to whole units.

        +

      Returns Asset

    Properties

    assetId: string
    contractAddress: string
    decimals: number
    networkId: string

    Methods

    • Converts the amount of the Asset from atomic to whole units.

      +

      Parameters

      • atomicAmount: Decimal

        The atomic amount to convert to whole units.

      Returns Decimal

      The amount in atomic units

      -
    • Returns the primary denomination for the Asset.

      Returns string

      The primary denomination for the Asset.

      -
    • Converts the amount of the Asset from whole to atomic units.

      +
    • Converts the amount of the Asset from whole to atomic units.

      Parameters

      • wholeAmount: Decimal

        The whole amount to convert to atomic units.

        -

      Returns Decimal

      The amount in atomic units

      -
    • Returns a string representation of the Asset.

      +

    Returns bigint

    The amount in atomic units

    +
    • Returns a string representation of the Asset.

      Returns string

      a string representation of the Asset

      -
    • Fetches the Asset with the provided Asset ID.

      Parameters

      • networkId: string

        The network ID.

      • assetId: string

        The asset ID.

      Returns Promise<Asset>

      The Asset Class.

      Throws

      If the Asset cannot be fetched.

      -
    • Creates an Asset from an Asset Model.

      Parameters

      • model: Asset

        The Asset Model.

      • Optional assetId: string

        The Asset ID.

      Returns Asset

      The Asset Class.

      Throws

      If the Asset Model is invalid.

      -
    • Returns the primary denomination for the provided Asset ID. +

    • Returns the primary denomination for the provided Asset ID. For gwei and wei the primary denomination is eth. For all other assets, the primary denomination is the same asset ID.

      Parameters

      • assetId: string

        The Asset ID.

      Returns string

      The primary denomination for the Asset ID.

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/classes/coinbase_authenticator.CoinbaseAuthenticator.html b/docs/classes/coinbase_authenticator.CoinbaseAuthenticator.html index 2a71509b..3d61ff03 100644 --- a/docs/classes/coinbase_authenticator.CoinbaseAuthenticator.html +++ b/docs/classes/coinbase_authenticator.CoinbaseAuthenticator.html @@ -1,28 +1,47 @@ CoinbaseAuthenticator | @coinbase/coinbase-sdk

    A class that builds JWTs for authenticating with the Coinbase Platform APIs.

    -

    Constructors

    Constructors

    Constructors

    Properties

    apiKey: string
    privateKey: string

    Methods

    • Middleware to intercept requests and add JWT to Authorization header.

      +
    • source: string

      The source of the request.

      +
    • Optional sourceVersion: string

      The version of the source.

      +

    Returns CoinbaseAuthenticator

    Properties

    apiKey: string
    privateKey: string
    source: string
    sourceVersion?: string

    Methods

    • Middleware to intercept requests and add JWT to the Authorization header.

      Parameters

      • config: InternalAxiosRequestConfig<any>

        The request configuration.

        -
      • debugging: boolean = false

        Flag to enable debugging.

        -

      Returns Promise<InternalAxiosRequestConfig<any>>

      The request configuration with the Authorization header added.

      +
  • Optional debugging: boolean = false

    Flag to enable debugging.

    +
  • Returns Promise<InternalAxiosRequestConfig<any>>

    The modified request configuration with the Authorization header added.

    Throws

    If JWT could not be built.

    -

    Returns Promise<string>

    A JWT token.

    +

    Throws

    If the private key is not in the correct format or signing fails.

    +

    Returns string

    The original PEM key string if valid.

    +

    Throws

    If the private key string is not in the correct PEM format.

    +
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/classes/coinbase_balance.Balance.html b/docs/classes/coinbase_balance.Balance.html index 48cfe6c6..8c0ee28f 100644 --- a/docs/classes/coinbase_balance.Balance.html +++ b/docs/classes/coinbase_balance.Balance.html @@ -1,14 +1,14 @@ Balance | @coinbase/coinbase-sdk

    A representation of a balance.

    -

    Properties

    Properties

    amount: Decimal
    asset?: Asset
    assetId: string

    Methods

    • Converts a BalanceModel into a Balance object.

      +

    Properties

    amount: Decimal
    asset?: Asset
    assetId: string

    Methods

    • Converts a BalanceModel and asset ID into a Balance object.

      Parameters

      • model: Balance

        The balance model object.

      • assetId: string

        The asset ID.

      Returns Balance

      The Balance object.

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/classes/coinbase_balance_map.BalanceMap.html b/docs/classes/coinbase_balance_map.BalanceMap.html index 0e63cf88..d70b5d47 100644 --- a/docs/classes/coinbase_balance_map.BalanceMap.html +++ b/docs/classes/coinbase_balance_map.BalanceMap.html @@ -1,5 +1,5 @@ BalanceMap | @coinbase/coinbase-sdk

    A convenience class for storing and manipulating Asset balances in a human-readable format.

    -

    Hierarchy

    • Map<string, Decimal>
      • BalanceMap

    Constructors

    Hierarchy

    • Map<string, Decimal>
      • BalanceMap

    Constructors

    Properties

    [toStringTag] size [species] @@ -20,7 +20,7 @@
    [species]: MapConstructor

    Methods

    • Returns an iterable of entries in the map.

      Returns IterableIterator<[string, Decimal]>

    • Returns void

    • Parameters

      • key: string

      Returns boolean

      true if an element in the Map existed and has been removed, or false if the element does not exist.

      +

    Returns void

    • Returns void

    • Parameters

      • key: string

      Returns boolean

      true if an element in the Map existed and has been removed, or false if the element does not exist.

    • Returns an iterable of key, value pairs for every entry in the map.

      Returns IterableIterator<[string, Decimal]>

    • Executes a provided function once per each key/value pair in the Map, in insertion order.

      Parameters

      • callbackfn: ((value, key, map) => void)
          • (value, key, map): void
          • Parameters

            • value: Decimal
            • key: string
            • map: Map<string, Decimal>

            Returns void

      • Optional thisArg: any

      Returns void

    • Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map.

      @@ -30,8 +30,8 @@

      Returns IterableIterator<string>

    • Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated.

      Parameters

      • key: string
      • value: Decimal

      Returns this

    • Returns a string representation of the balance map.

      Returns string

      The string representation of the balance map.

      -
    • Returns an iterable of values in the map

      Returns IterableIterator<Decimal>

    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/classes/coinbase_coinbase.Coinbase.html b/docs/classes/coinbase_coinbase.Coinbase.html index ab2f62b6..ded481ff 100644 --- a/docs/classes/coinbase_coinbase.Coinbase.html +++ b/docs/classes/coinbase_coinbase.Coinbase.html @@ -1,35 +1,40 @@ Coinbase | @coinbase/coinbase-sdk

    The Coinbase SDK.

    -

    Constructors

    Constructors

    • Initializes the Coinbase SDK.

      +

    Constructors

    • Initializes the Coinbase SDK.

      Parameters

      Returns Coinbase

      Throws

      If the configuration is invalid.

      +

    Returns Coinbase

    Deprecated

    as of v0.5.0, use configure or configureFromJson instead.

    +

    Throws

    If the configuration is invalid.

    Throws

    If not able to create JWT token.

    -

    Properties

    apiClients: ApiClients = {}
    apiKeyPrivateKey: string

    The CDP API key Private Key.

    -

    Constant

    assets: {
        Eth: string;
        Gwei: string;
        Usdc: string;
        Wei: string;
        Weth: string;
    } = ...

    The list of supported assets.

    -

    Type declaration

    • Eth: string
    • Gwei: string
    • Usdc: string
    • Wei: string
    • Weth: string

    Constant

    networks: {
        BaseMainnet: string;
        BaseSepolia: string;
    } = ...

    The list of supported networks.

    -

    Type declaration

    • BaseMainnet: string
    • BaseSepolia: string

    Constant

    useServerSigner: boolean

    Whether to use a server signer or not.

    -

    Constant

    Methods

    • Returns User object for the default user.

      -

      Returns Promise<User>

      The default user.

      -

      Throws

      If the request fails.

      -

    Properties

    apiClients: ApiClients = ...
    apiKeyPrivateKey: string

    The CDP API key Private Key.

    +

    Constant

    assets: {
        Cbbtc: string;
        Eth: string;
        Eurc: string;
        Gwei: string;
        Lamport: string;
        Sol: string;
        Usdc: string;
        Wei: string;
        Weth: string;
    } = ...

    The list of supported assets.

    +

    Type declaration

    • Cbbtc: string
    • Eth: string
    • Eurc: string
    • Gwei: string
    • Lamport: string
    • Sol: string
    • Usdc: string
    • Wei: string
    • Weth: string

    Constant

    defaultPageLimit: number = 100

    The default page limit for list methods.

    +

    Constant

    networks: {
        ArbitrumMainnet: "arbitrum-mainnet";
        ArbitrumSepolia: "arbitrum-sepolia";
        BaseMainnet: "base-mainnet";
        BaseSepolia: "base-sepolia";
        BitcoinMainnet: "bitcoin-mainnet";
        EthereumHolesky: "ethereum-holesky";
        EthereumMainnet: "ethereum-mainnet";
        EthereumSepolia: "ethereum-sepolia";
        NearMainnet: "near-mainnet";
        NearTestnet: "near-testnet";
        PolygonMainnet: "polygon-mainnet";
        SolanaDevnet: "solana-devnet";
        SolanaMainnet: "solana-mainnet";
    } = NetworkIdentifier

    The map of supported networks to network ID. Generated from the OpenAPI spec.

    +

    Type declaration

    • Readonly ArbitrumMainnet: "arbitrum-mainnet"
    • Readonly ArbitrumSepolia: "arbitrum-sepolia"
    • Readonly BaseMainnet: "base-mainnet"
    • Readonly BaseSepolia: "base-sepolia"
    • Readonly BitcoinMainnet: "bitcoin-mainnet"
    • Readonly EthereumHolesky: "ethereum-holesky"
    • Readonly EthereumMainnet: "ethereum-mainnet"
    • Readonly EthereumSepolia: "ethereum-sepolia"
    • Readonly NearMainnet: "near-mainnet"
    • Readonly NearTestnet: "near-testnet"
    • Readonly PolygonMainnet: "polygon-mainnet"
    • Readonly SolanaDevnet: "solana-devnet"
    • Readonly SolanaMainnet: "solana-mainnet"

    Constant

    Example

    Coinbase.networks.BaseMainnet
    +
    +
    useServerSigner: boolean

    Whether to use a server signer or not.

    +

    Constant

    Methods

    • Reads the API key and private key from a JSON file and initializes the Coinbase SDK.

      Parameters

      Returns Coinbase

      A new instance of the Coinbase SDK.

      Throws

      If the file does not exist or the configuration values are missing/invalid.

      Throws

      If the configuration is invalid.

      Throws

      If not able to create JWT token.

      -
    • Converts a network symbol to a string, replacing underscores with hyphens.

      +
    • Converts a network symbol to a string, replacing underscores with hyphens.

      Parameters

      • network: string

        The network symbol to convert

      Returns string

      the converted string

      -
    • Converts a string to a symbol, replacing hyphens with underscores.

      Parameters

      • asset: string

        The string to convert

      Returns string

      the converted symbol

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/classes/coinbase_contract_event.ContractEvent.html b/docs/classes/coinbase_contract_event.ContractEvent.html new file mode 100644 index 00000000..f377db50 --- /dev/null +++ b/docs/classes/coinbase_contract_event.ContractEvent.html @@ -0,0 +1,48 @@ +ContractEvent | @coinbase/coinbase-sdk

    A representation of a single contract event.

    +

    Constructors

    Properties

    Methods

    • Returns the four bytes of the Keccak hash of the event signature.

      +

      Returns string

      The four bytes of the event signature hash.

      +
    \ No newline at end of file diff --git a/docs/classes/coinbase_contract_invocation.ContractInvocation.html b/docs/classes/coinbase_contract_invocation.ContractInvocation.html new file mode 100644 index 00000000..af66d841 --- /dev/null +++ b/docs/classes/coinbase_contract_invocation.ContractInvocation.html @@ -0,0 +1,76 @@ +ContractInvocation | @coinbase/coinbase-sdk

    A representation of a ContractInvocation, which calls a smart contract method +onchain. The fee is assumed to be paid in the native Asset of the Network.

    +

    Properties

    Methods

    • Returns the ABI of the ContractInvocation, if specified.

      +

      Returns undefined | object

      The ABI as an object, or undefined if not available.

      +
    • Returns the amount of the native asset sent to a payable contract method, if applicable.

      +

      Returns Decimal

      The amount in atomic units of the native asset.

      +
    • Returns the Arguments of the ContractInvocation.

      +

      Returns object

      The arguments object passed to the contract invocation. +The key is the argument name and the value is the argument value.

      +
    • Returns the Transaction of the ContractInvocation.

      +

      Returns Transaction

      The ethers.js Transaction object.

      +

      Throws

      (InvalidUnsignedPayload) If the Unsigned Payload is invalid.

      +
    • Returns the Transaction Hash of the ContractInvocation.

      +

      Returns undefined | string

      The Transaction Hash as a Hex string, or undefined if not yet available.

      +
    • Returns the link to the Transaction on the blockchain explorer.

      +

      Returns string

      The link to the Transaction on the blockchain explorer.

      +
    • Reloads the ContractInvocation model with the latest data from the server.

      +

      Returns Promise<void>

      Throws

      if the API request to get a ContractInvocation fails.

      +
    • Signs the ContractInvocation with the provided key and returns the hex signature +required for broadcasting the ContractInvocation.

      +

      Parameters

      • key: Wallet

        The key to sign the ContractInvocation with

        +

      Returns Promise<string>

      The hex-encoded signed payload

      +
    • Returns a string representation of the ContractInvocation.

      +

      Returns string

      The string representation of the ContractInvocation.

      +
    • Waits for the ContractInvocation to be confirmed on the Network or fail on chain. +Waits until the ContractInvocation is completed or failed on-chain by polling at the given interval. +Raises an error if the ContractInvocation takes longer than the given timeout.

      +

      Parameters

      • options: {
            intervalSeconds: undefined | number;
            timeoutSeconds: undefined | number;
        } = {}

        The options to configure the wait function.

        +
        • intervalSeconds: undefined | number

          The interval to check the status of the ContractInvocation.

          +
        • timeoutSeconds: undefined | number

          The maximum time to wait for the ContractInvocation to be confirmed.

          +

      Returns Promise<ContractInvocation>

      The ContractInvocation object in a terminal state.

      +

      Throws

      if the ContractInvocation times out.

      +
    \ No newline at end of file diff --git a/docs/classes/coinbase_crypto_amount.CryptoAmount.html b/docs/classes/coinbase_crypto_amount.CryptoAmount.html new file mode 100644 index 00000000..57fcaabc --- /dev/null +++ b/docs/classes/coinbase_crypto_amount.CryptoAmount.html @@ -0,0 +1,36 @@ +CryptoAmount | @coinbase/coinbase-sdk

    A representation of a CryptoAmount that includes the amount and asset.

    +

    Constructors

    Properties

    amount: Decimal
    assetId: string
    assetObj: Asset

    Methods

    • Returns a string representation of the CryptoAmount.

      +

      Returns string

      A string representation of the CryptoAmount

      +
    • Converts a CryptoAmount model and asset ID to a CryptoAmount. +This can be used to specify a non-primary denomination that we want the amount +to be converted to.

      +

      Parameters

      • amountModel: CryptoAmount

        The crypto amount from the API

        +
      • assetId: string

        The Asset ID of the denomination we want returned

        +

      Returns CryptoAmount

      The converted CryptoAmount object

      +
    \ No newline at end of file diff --git a/docs/classes/coinbase_errors.InvalidAPIKeyFormat.html b/docs/classes/coinbase_errors.AlreadySignedError.html similarity index 56% rename from docs/classes/coinbase_errors.InvalidAPIKeyFormat.html rename to docs/classes/coinbase_errors.AlreadySignedError.html index df3dd499..6c07c4ae 100644 --- a/docs/classes/coinbase_errors.InvalidAPIKeyFormat.html +++ b/docs/classes/coinbase_errors.AlreadySignedError.html @@ -1,15 +1,15 @@ -InvalidAPIKeyFormat | @coinbase/coinbase-sdk

    InvalidaAPIKeyFormat error is thrown when the API key format is invalid.

    -

    Hierarchy

    • Error
      • InvalidAPIKeyFormat

    Constructors

    Properties

    message: string
    name: string
    stack?: string
    DEFAULT_MESSAGE: string = "Invalid API key format"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    +AlreadySignedError | @coinbase/coinbase-sdk

    AlreadySignedError is thrown when a resource is already signed.

    +

    Hierarchy

    • Error
      • AlreadySignedError

    Constructors

    Properties

    message: string
    name: string
    stack?: string
    DEFAULT_MESSAGE: string = "Resource already signed"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    Type declaration

      • (err, stackTraces): any
      • Parameters

        • err: Error
        • stackTraces: CallSite[]

        Returns any

    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      -

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    \ No newline at end of file +
    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      +

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    \ No newline at end of file diff --git a/docs/classes/coinbase_errors.ArgumentError.html b/docs/classes/coinbase_errors.ArgumentError.html index 7538256b..c505a3cd 100644 --- a/docs/classes/coinbase_errors.ArgumentError.html +++ b/docs/classes/coinbase_errors.ArgumentError.html @@ -1,5 +1,5 @@ ArgumentError | @coinbase/coinbase-sdk

    ArgumentError is thrown when an argument is invalid.

    -

    Hierarchy

    • Error
      • ArgumentError

    Constructors

    Hierarchy

    • Error
      • ArgumentError

    Constructors

    Properties

    message name stack? @@ -9,7 +9,7 @@

    Methods

    Constructors

    Properties

    message: string
    name: string
    stack?: string
    DEFAULT_MESSAGE: string = "Argument Error"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    +

    Returns ArgumentError

    Properties

    message: string
    name: string
    stack?: string
    DEFAULT_MESSAGE: string = "Argument Error"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    Type declaration

      • (err, stackTraces): any
      • Parameters

        • err: Error
        • stackTraces: CallSite[]

        Returns any

    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      -

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    \ No newline at end of file +
    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      +

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    \ No newline at end of file diff --git a/docs/classes/coinbase_errors.InternalError.html b/docs/classes/coinbase_errors.InternalError.html deleted file mode 100644 index 123a0c31..00000000 --- a/docs/classes/coinbase_errors.InternalError.html +++ /dev/null @@ -1,15 +0,0 @@ -InternalError | @coinbase/coinbase-sdk

    InternalError is thrown when there is an internal error in the SDK.

    -

    Hierarchy

    • Error
      • InternalError

    Constructors

    Properties

    message: string
    name: string
    stack?: string
    DEFAULT_MESSAGE: string = "Internal Error"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    -

    Type declaration

      • (err, stackTraces): any
      • Parameters

        • err: Error
        • stackTraces: CallSite[]

        Returns any

    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      -

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    \ No newline at end of file diff --git a/docs/classes/coinbase_errors.InvalidAPIKeyFormatError.html b/docs/classes/coinbase_errors.InvalidAPIKeyFormatError.html new file mode 100644 index 00000000..5219403f --- /dev/null +++ b/docs/classes/coinbase_errors.InvalidAPIKeyFormatError.html @@ -0,0 +1,15 @@ +InvalidAPIKeyFormatError | @coinbase/coinbase-sdk

    InvalidAPIKeyFormatError error is thrown when the API key format is invalid.

    +

    Hierarchy

    • Error
      • InvalidAPIKeyFormatError

    Constructors

    Properties

    message: string
    name: string
    stack?: string
    DEFAULT_MESSAGE: string = "Invalid API key format"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    +

    Type declaration

      • (err, stackTraces): any
      • Parameters

        • err: Error
        • stackTraces: CallSite[]

        Returns any

    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      +

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    \ No newline at end of file diff --git a/docs/classes/coinbase_errors.InvalidConfiguration.html b/docs/classes/coinbase_errors.InvalidConfiguration.html deleted file mode 100644 index 39eb33ec..00000000 --- a/docs/classes/coinbase_errors.InvalidConfiguration.html +++ /dev/null @@ -1,15 +0,0 @@ -InvalidConfiguration | @coinbase/coinbase-sdk

    InvalidConfiguration error is thrown when apikey/privateKey configuration is invalid.

    -

    Hierarchy

    • Error
      • InvalidConfiguration

    Constructors

    Properties

    message: string
    name: string
    stack?: string
    DEFAULT_MESSAGE: string = "Invalid configuration"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    -

    Type declaration

      • (err, stackTraces): any
      • Parameters

        • err: Error
        • stackTraces: CallSite[]

        Returns any

    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      -

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    \ No newline at end of file diff --git a/docs/classes/coinbase_errors.InvalidConfigurationError.html b/docs/classes/coinbase_errors.InvalidConfigurationError.html new file mode 100644 index 00000000..d10c0d11 --- /dev/null +++ b/docs/classes/coinbase_errors.InvalidConfigurationError.html @@ -0,0 +1,15 @@ +InvalidConfigurationError | @coinbase/coinbase-sdk

    InvalidConfigurationError error is thrown when apikey/privateKey configuration is invalid.

    +

    Hierarchy

    • Error
      • InvalidConfigurationError

    Constructors

    Properties

    message: string
    name: string
    stack?: string
    DEFAULT_MESSAGE: string = "Invalid configuration"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    +

    Type declaration

      • (err, stackTraces): any
      • Parameters

        • err: Error
        • stackTraces: CallSite[]

        Returns any

    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      +

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    \ No newline at end of file diff --git a/docs/classes/coinbase_errors.InvalidUnsignedPayloadError.html b/docs/classes/coinbase_errors.InvalidUnsignedPayloadError.html new file mode 100644 index 00000000..4d9a94e2 --- /dev/null +++ b/docs/classes/coinbase_errors.InvalidUnsignedPayloadError.html @@ -0,0 +1,15 @@ +InvalidUnsignedPayloadError | @coinbase/coinbase-sdk

    InvalidUnsignedPayload error is thrown when the unsigned payload is invalid.

    +

    Hierarchy

    • Error
      • InvalidUnsignedPayloadError

    Constructors

    Properties

    message: string
    name: string
    stack?: string
    DEFAULT_MESSAGE: string = "Invalid unsigned payload"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    +

    Type declaration

      • (err, stackTraces): any
      • Parameters

        • err: Error
        • stackTraces: CallSite[]

        Returns any

    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      +

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    \ No newline at end of file diff --git a/docs/classes/coinbase_errors.NotSignedError.html b/docs/classes/coinbase_errors.NotSignedError.html new file mode 100644 index 00000000..d712b277 --- /dev/null +++ b/docs/classes/coinbase_errors.NotSignedError.html @@ -0,0 +1,14 @@ +NotSignedError | @coinbase/coinbase-sdk

    NotSignedError is thrown when a resource is not signed.

    +

    Hierarchy

    • Error
      • NotSignedError

    Constructors

    Properties

    message: string
    name: string
    stack?: string
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    +

    Type declaration

      • (err, stackTraces): any
      • Parameters

        • err: Error
        • stackTraces: CallSite[]

        Returns any

    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      +

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    \ No newline at end of file diff --git a/docs/classes/coinbase_errors.TimeoutError.html b/docs/classes/coinbase_errors.TimeoutError.html new file mode 100644 index 00000000..66dddd6f --- /dev/null +++ b/docs/classes/coinbase_errors.TimeoutError.html @@ -0,0 +1,14 @@ +TimeoutError | @coinbase/coinbase-sdk

    TimeoutError is thrown when an operation times out.

    +

    Hierarchy

    • Error
      • TimeoutError

    Constructors

    Properties

    message: string
    name: string
    stack?: string
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    +

    Type declaration

      • (err, stackTraces): any
      • Parameters

        • err: Error
        • stackTraces: CallSite[]

        Returns any

    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      +

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    \ No newline at end of file diff --git a/docs/classes/coinbase_errors.InvalidUnsignedPayload.html b/docs/classes/coinbase_errors.UninitializedSDKError.html similarity index 56% rename from docs/classes/coinbase_errors.InvalidUnsignedPayload.html rename to docs/classes/coinbase_errors.UninitializedSDKError.html index b04e67bc..fe52bca5 100644 --- a/docs/classes/coinbase_errors.InvalidUnsignedPayload.html +++ b/docs/classes/coinbase_errors.UninitializedSDKError.html @@ -1,15 +1,15 @@ -InvalidUnsignedPayload | @coinbase/coinbase-sdk

    InvalidUnsignedPayload error is thrown when the unsigned payload is invalid.

    -

    Hierarchy

    • Error
      • InvalidUnsignedPayload

    Constructors

    Properties

    message: string
    name: string
    stack?: string
    DEFAULT_MESSAGE: string = "Invalid unsigned payload"
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    +UninitializedSDKError | @coinbase/coinbase-sdk

    UninitializedSDKError is thrown when the Coinbase instance is not initialized.

    +

    Hierarchy

    • Error
      • UninitializedSDKError

    Constructors

    Properties

    message: string
    name: string
    stack?: string
    DEFAULT_MESSAGE: string = ...
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    Type declaration

      • (err, stackTraces): any
      • Parameters

        • err: Error
        • stackTraces: CallSite[]

        Returns any

    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      -

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    \ No newline at end of file +
    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      +

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    \ No newline at end of file diff --git a/docs/classes/coinbase_faucet_transaction.FaucetTransaction.html b/docs/classes/coinbase_faucet_transaction.FaucetTransaction.html index 24c778ac..cb6fd100 100644 --- a/docs/classes/coinbase_faucet_transaction.FaucetTransaction.html +++ b/docs/classes/coinbase_faucet_transaction.FaucetTransaction.html @@ -1,17 +1,43 @@ FaucetTransaction | @coinbase/coinbase-sdk

    Represents a transaction from a faucet.

    -

    Constructors

    Properties

    Methods

    Constructors

    Properties

    Methods

    Properties

    _transaction: Transaction

    Accessors

    Methods

    • Returns the link to the transaction on the blockchain explorer.

      Returns string

      The link to the transaction on the blockchain explorer

      -
    • Returns a string representation of the FaucetTransaction.

      Returns string

      A string representation of the FaucetTransaction.

      -
    \ No newline at end of file +
    • Waits for the FaucetTransaction to be confirmed on the Network or fail on chain. +Waits until the FaucetTransaction is completed or failed on-chain by polling at the given interval. +Raises an error if the FaucetTransaction takes longer than the given timeout.

      +

      Parameters

      • options: {
            intervalSeconds: undefined | number;
            timeoutSeconds: undefined | number;
        } = {}

        The options to configure the wait function.

        +
        • intervalSeconds: undefined | number

          The interval to check the status of the FaucetTransaction.

          +
        • timeoutSeconds: undefined | number

          The maximum time to wait for the FaucetTransaction to be confirmed.

          +

      Returns Promise<FaucetTransaction>

      The FaucetTransaction object in a terminal state.

      +

      Throws

      if the FaucetTransaction times out.

      +
    \ No newline at end of file diff --git a/docs/classes/coinbase_fiat_amount.FiatAmount.html b/docs/classes/coinbase_fiat_amount.FiatAmount.html new file mode 100644 index 00000000..615db961 --- /dev/null +++ b/docs/classes/coinbase_fiat_amount.FiatAmount.html @@ -0,0 +1,21 @@ +FiatAmount | @coinbase/coinbase-sdk

    A representation of a FiatAmount that includes the amount and currency.

    +

    Constructors

    Properties

    Methods

    Constructors

    • Initialize a new FiatAmount. Do not use this directly, use the fromModel method instead.

      +

      Parameters

      • amount: string

        The amount in the fiat currency

        +
      • currency: string

        The currency code (e.g. 'USD')

        +

      Returns FiatAmount

    Properties

    amount: string
    currency: string

    Methods

    • Get a string representation of the FiatAmount.

      +

      Returns string

      A string representation of the FiatAmount.

      +
    \ No newline at end of file diff --git a/docs/classes/coinbase_fund_operation.FundOperation.html b/docs/classes/coinbase_fund_operation.FundOperation.html new file mode 100644 index 00000000..0e66ea85 --- /dev/null +++ b/docs/classes/coinbase_fund_operation.FundOperation.html @@ -0,0 +1,68 @@ +FundOperation | @coinbase/coinbase-sdk

    A representation of a Fund Operation.

    +

    Constructors

    Properties

    asset: null | Asset = null
    Status: {
        TERMINAL_STATES: Set<string>;
    } = ...

    Fund Operation status constants.

    +

    Type declaration

    • Readonly TERMINAL_STATES: Set<string>

    Methods

    • Check if the operation is in a terminal state.

      +

      Returns boolean

      True if the operation is in a terminal state, false otherwise

      +
    • Wait for the fund operation to complete.

      +

      Parameters

      • options: {
            intervalSeconds: undefined | number;
            timeoutSeconds: undefined | number;
        } = {}

        Options for waiting

        +
        • intervalSeconds: undefined | number

          The interval between checks in seconds

          +
        • timeoutSeconds: undefined | number

          The timeout in seconds

          +

      Returns Promise<FundOperation>

      The completed fund operation

      +

      Throws

      If the operation takes too long

      +
    • Create a new Fund Operation.

      +

      Parameters

      • walletId: string

        The Wallet ID

        +
      • addressId: string

        The Address ID

        +
      • amount: Decimal

        The amount of the Asset

        +
      • assetId: string

        The Asset ID

        +
      • networkId: string

        The Network ID

        +
      • Optional quote: FundQuote

        Optional Fund Quote

        +

      Returns Promise<FundOperation>

      The new FundOperation object

      +
    \ No newline at end of file diff --git a/docs/classes/coinbase_fund_quote.FundQuote.html b/docs/classes/coinbase_fund_quote.FundQuote.html new file mode 100644 index 00000000..c2f34587 --- /dev/null +++ b/docs/classes/coinbase_fund_quote.FundQuote.html @@ -0,0 +1,52 @@ +FundQuote | @coinbase/coinbase-sdk

    A representation of a Fund Operation Quote.

    +

    Constructors

    Properties

    asset: null | Asset = null
    model: FundQuote

    Methods

    • Gets the buy fee.

      +

      Returns {
          amount: string;
          currency: string;
      }

      The buy fee amount and currency

      +
      • amount: string
      • currency: string
    • Create a new Fund Operation Quote.

      +

      Parameters

      • walletId: string

        The Wallet ID

        +
      • addressId: string

        The Address ID

        +
      • amount: Decimal

        The amount of the Asset

        +
      • assetId: string

        The Asset ID

        +
      • networkId: string

        The Network ID

        +

      Returns Promise<FundQuote>

      The new FundQuote object

      +
    \ No newline at end of file diff --git a/docs/classes/coinbase_historical_balance.HistoricalBalance.html b/docs/classes/coinbase_historical_balance.HistoricalBalance.html new file mode 100644 index 00000000..c0081a15 --- /dev/null +++ b/docs/classes/coinbase_historical_balance.HistoricalBalance.html @@ -0,0 +1,10 @@ +HistoricalBalance | @coinbase/coinbase-sdk

    A representation of historical balance.

    +

    Properties

    Methods

    Properties

    amount: Decimal
    asset: Asset
    blockHash: string
    blockHeight: Decimal

    Methods

    \ No newline at end of file diff --git a/docs/classes/coinbase_payload_signature.PayloadSignature.html b/docs/classes/coinbase_payload_signature.PayloadSignature.html new file mode 100644 index 00000000..656e47d3 --- /dev/null +++ b/docs/classes/coinbase_payload_signature.PayloadSignature.html @@ -0,0 +1,40 @@ +PayloadSignature | @coinbase/coinbase-sdk

    A representation of a Payload Signature.

    +

    Constructors

    Properties

    Methods

    • Returns whether the Payload Signature is in a terminal State.

      +

      Returns boolean

      Whether the Payload Signature is in a terminal State

      +
    • Reloads the Payload Signature model with the latest data from the server.

      +

      Returns Promise<void>

      Throws

      if the API request to get a Payload Signature fails.

      +
    • Returns a string representation of the Payload Signature.

      +

      Returns string

      A string representation of the Payload Signature.

      +
    • Waits for the Payload Signature to be signed or for the signature operation to fail.

      +

      Parameters

      • options: {
            intervalSeconds: undefined | number;
            timeoutSeconds: undefined | number;
        } = {}

        The options to configure the wait function.

        +
        • intervalSeconds: undefined | number

          The interval to check the status of the Payload Signature.

          +
        • timeoutSeconds: undefined | number

          The maximum time to wait for the Payload Signature to be confirmed.

          +

      Returns Promise<PayloadSignature>

      The Payload Signature object in a terminal state.

      +

      Throws

      if the Payload Signature times out.

      +
    \ No newline at end of file diff --git a/docs/classes/coinbase_server_signer.ServerSigner.html b/docs/classes/coinbase_server_signer.ServerSigner.html index c5239552..fceba700 100644 --- a/docs/classes/coinbase_server_signer.ServerSigner.html +++ b/docs/classes/coinbase_server_signer.ServerSigner.html @@ -1,17 +1,17 @@ ServerSigner | @coinbase/coinbase-sdk

    A representation of a Server-Signer. Server-Signers are assigned to sign transactions for a Wallet.

    -

    Properties

    Properties

    Methods

    • Returns the ID of the Server-Signer.

      +

    Properties

    Methods

    • Returns the IDs of the Wallet's the Server-Signer can sign for.

      Returns undefined | string[]

      The Wallet IDs.

      -
    • Returns a String representation of the Server-Signer.

      Returns string

      a String representation of the Server-Signer.

      -
    • Returns the default Server-Signer for the CDP Project.

      Returns Promise<ServerSigner>

      The default Server-Signer.

      Throws

      if the API request to list Server-Signers fails.

      Throws

      if there is no Server-Signer associated with the CDP Project.

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/classes/coinbase_smart_contract.SmartContract.html b/docs/classes/coinbase_smart_contract.SmartContract.html new file mode 100644 index 00000000..5a712278 --- /dev/null +++ b/docs/classes/coinbase_smart_contract.SmartContract.html @@ -0,0 +1,104 @@ +SmartContract | @coinbase/coinbase-sdk

    A representation of a SmartContract on the blockchain.

    +

    Constructors

    Properties

    Accessors

    • get isExternal(): boolean
    • Returns whether the SmartContract is external.

      +

      Returns boolean

      True if the SmartContract is external, false otherwise.

      +

    Methods

    • Returns the Deployer Address of the smart contract.

      +

      Returns undefined | string

      The Deployer Address.

      +
    • Returns the Wallet ID that deployed the smart contract.

      +

      Returns undefined | string

      The Wallet ID.

      +
    • Reloads the SmartContract model with the latest data from the server.

      +

      Returns Promise<void>

      Throws

      if the API request to get a SmartContract fails.

      +
    • Signs the SmartContract deployment with the provided key and returns the hex signature +required for broadcasting the SmartContract deployment.

      +

      Parameters

      • key: Wallet

        The key to sign the SmartContract deployment with

        +

      Returns Promise<string>

      The hex-encoded signed payload

      +
    • Returns a string representation of the SmartContract.

      +

      Returns string

      The string representation of the SmartContract.

      +
    • Waits for the SmartContract deployment to be confirmed on the Network or fail on chain. +Waits until the SmartContract deployment is completed or failed on-chain by polling at the given interval. +Raises an error if the SmartContract deployment takes longer than the given timeout.

      +

      Parameters

      • options: {
            intervalSeconds: undefined | number;
            timeoutSeconds: undefined | number;
        } = {}

        The options to configure the wait function.

        +
        • intervalSeconds: undefined | number

          The interval to check the status of the SmartContract deployment.

          +
        • timeoutSeconds: undefined | number

          The maximum time to wait for the SmartContract deployment to be confirmed.

          +

      Returns Promise<SmartContract>

      The SmartContract object in a terminal state.

      +

      Throws

      if the SmartContract deployment times out.

      +
    • Returns a list of ContractEvents for the provided network, contract, and event details.

      +

      Parameters

      • networkId: string

        The network ID.

        +
      • protocolName: string

        The protocol name.

        +
      • contractAddress: string

        The contract address.

        +
      • contractName: string

        The contract name.

        +
      • eventName: string

        The event name.

        +
      • fromBlockHeight: number

        The start block height.

        +
      • toBlockHeight: number

        The end block height.

        +

      Returns Promise<ContractEvent[]>

      The contract events.

      +
    \ No newline at end of file diff --git a/docs/classes/coinbase_sponsored_send.SponsoredSend.html b/docs/classes/coinbase_sponsored_send.SponsoredSend.html new file mode 100644 index 00000000..12036019 --- /dev/null +++ b/docs/classes/coinbase_sponsored_send.SponsoredSend.html @@ -0,0 +1,35 @@ +SponsoredSend | @coinbase/coinbase-sdk

    A representation of an onchain Sponsored Send.

    +

    Constructors

    Properties

    Methods

    • Returns the signature of the typed data.

      +

      Returns undefined | string

      The hash of the typed data signature.

      +
    • Returns the Transaction Hash of the Sponsored Send.

      +

      Returns undefined | string

      The Transaction Hash

      +
    • Returns the link to the Sponsored Send on the blockchain explorer.

      +

      Returns undefined | string

      The link to the Sponsored Send on the blockchain explorer

      +
    • Returns the Keccak256 hash of the typed data. This payload must be signed +by the sender to be used as an approval in the EIP-3009 transaction.

      +

      Returns string

      The Keccak256 hash of the typed data.

      +
    • Returns whether the Sponsored Send has been signed.

      +

      Returns boolean

      if the Sponsored Send has been signed.

      +
    • Returns whether the Sponsored Send is in a terminal State.

      +

      Returns boolean

      Whether the Sponsored Send is in a terminal State

      +
    • Signs the Sponsored Send with the provided key and returns the hex signature.

      +

      Parameters

      • key: Wallet

        The key to sign the Sponsored Send with

        +

      Returns Promise<string>

      The hex-encoded signature

      +
    • Returns a string representation of the Sponsored Send.

      +

      Returns string

      A string representation of the Sponsored Send

      +
    \ No newline at end of file diff --git a/docs/classes/coinbase_staking_balance.StakingBalance.html b/docs/classes/coinbase_staking_balance.StakingBalance.html new file mode 100644 index 00000000..5fd2d163 --- /dev/null +++ b/docs/classes/coinbase_staking_balance.StakingBalance.html @@ -0,0 +1,32 @@ +StakingBalance | @coinbase/coinbase-sdk

    A representation of the staking balance for a given asset on a specific date.

    +

    Constructors

    Properties

    Methods

    • Returns a list of StakingBalances for the provided network, asset, and address.

      +

      Parameters

      • networkId: string

        The network ID.

        +
      • assetId: string

        The asset ID.

        +
      • addressId: string

        The address ID.

        +
      • startTime: string

        The start time.

        +
      • endTime: string

        The end time.

        +

      Returns Promise<StakingBalance[]>

      The staking balances.

      +
    \ No newline at end of file diff --git a/docs/classes/coinbase_staking_operation.StakingOperation.html b/docs/classes/coinbase_staking_operation.StakingOperation.html index 0d3a07a6..a7161efa 100644 --- a/docs/classes/coinbase_staking_operation.StakingOperation.html +++ b/docs/classes/coinbase_staking_operation.StakingOperation.html @@ -1,14 +1,73 @@ -StakingOperation | @coinbase/coinbase-sdk

    A representation of a staking operation (stake, unstake, claim rewards, etc). It +StakingOperation | @coinbase/coinbase-sdk

    A representation of a staking operation (stake, unstake, claim stake, etc.). It may have multiple steps with some being transactions to sign, and others to wait.

    -

    Constructors

    Constructors

    Properties

    transactions: Transaction[]

    Methods

    • Get the transactions associated with this staking operation.

      +

    Returns StakingOperation

    Properties

    transactions: Transaction[]

    Methods

    • Get signed voluntary exit messages for native eth unstaking

      +

      Returns string[]

      The signed voluntary exit messages for a native eth unstaking operation.

      +
    • Returns whether the Staking operation is in a complete state.

      +

      Returns boolean

      Whether the Staking operation is in a complete state.

      +
    • Returns whether the Staking operation is in a failed state.

      +

      Returns boolean

      Whether the Staking operation is in a failed state.

      +
    • Returns whether the Staking operation is in a terminal State.

      +

      Returns boolean

      Whether the Staking operation is in a terminal State

      +
    • loadTransactionsFromModel loads new unsigned transactions from the model into the transactions array. +Note: For External Address model since tx signing and broadcast status happens by the end user and not our backend +we need to be careful to not overwrite the transactions array with the response from the API. Ex: End user could have used +stakingOperation.sign() method to sign the transactions, and we should not overwrite them with the response from the API. +This however is ok to do so for the Wallet Address model since the transactions states are maintained by our backend. +This method attempts to be safe for both address models, and only adds newly created unsigned transactions that are not + already in the transactions array.

      +

      Returns void

    • Reloads the StakingOperation model with the latest data from the server. +If the StakingOperation object was created by an ExternalAddress then it will +not have a wallet ID.

      +

      Returns Promise<void>

      Throws

      if the API request to get the StakingOperation fails.

      +

      Throws

      if this function is called on a StakingOperation without a wallet ID.

      +
    • Sign the transactions in the StakingOperation object.

      Parameters

      • key: Wallet

        The key used to sign the transactions.

        -

      Returns Promise<void>

    \ No newline at end of file +

    Returns Promise<void>

    • Return a human-readable string representation of the StakingOperation object.

      +

      Returns string

      The string representation of the StakingOperation object.

      +
    • Waits until the Staking Operation is completed or failed by polling its status at the given interval.

      +

      Parameters

      • options: {
            intervalSeconds: undefined | number;
            timeoutSeconds: undefined | number;
        } = {}

        The options to configure the wait function.

        +
        • intervalSeconds: undefined | number

          The interval at which to poll, in seconds

          +
        • timeoutSeconds: undefined | number

          The maximum amount of time to wait for the StakingOperation to complete, in seconds

          +

      Returns Promise<StakingOperation>

      The completed StakingOperation object.

      +

      Throws

      If the StakingOperation takes longer than the given timeout.

      +
    • Get the staking operation for the given ID.

      +

      Parameters

      • networkId: string

        The network ID.

        +
      • addressId: string

        The address ID.

        +
      • id: string

        The staking operation ID.

        +
      • Optional walletId: string

        The wallet ID of the staking operation.

        +

      Returns Promise<StakingOperation>

      The staking operation object.

      +

      Throws

      If the wallet id is defined but empty.

      +
    \ No newline at end of file diff --git a/docs/classes/coinbase_staking_reward.StakingReward.html b/docs/classes/coinbase_staking_reward.StakingReward.html index 6cd459b6..c41c8e02 100644 --- a/docs/classes/coinbase_staking_reward.StakingReward.html +++ b/docs/classes/coinbase_staking_reward.StakingReward.html @@ -1,28 +1,40 @@ StakingReward | @coinbase/coinbase-sdk

    A representation of a staking reward earned on a network for a given asset.

    -

    Constructors

    Constructors

    Properties

    asset: Asset

    Methods

    • Returns the amount of the StakingReward.

      +
    • format: StakingRewardFormat

      The format to return the rewards in. (usd, native). Defaults to usd.

      +

    Returns StakingReward

    Properties

    asset: Asset

    Methods

    • Returns a list of StakingRewards for the provided network, asset, and addresses.

      Parameters

      • networkId: string

        The network ID.

      • assetId: string

        The asset ID.

      • addressIds: string[]

        The address ID.

      • startTime: string

        The start time.

      • endTime: string

        The end time.

        -
      • format: "usd" = FetchStakingRewardsRequestFormatEnum.Usd

        The format to return the rewards in. (usd, native). Defaults to usd.

        +
      • format: StakingRewardFormat = StakingRewardFormat.USD

        The format to return the rewards in. (usd, native). Defaults to usd.

      Returns Promise<StakingReward[]>

      The staking rewards.

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/classes/coinbase_trade.Trade.html b/docs/classes/coinbase_trade.Trade.html index 84a1bb15..0853d6b0 100644 --- a/docs/classes/coinbase_trade.Trade.html +++ b/docs/classes/coinbase_trade.Trade.html @@ -1,10 +1,11 @@ Trade | @coinbase/coinbase-sdk

    A representation of a Trade, which trades an amount of an Asset to another Asset on a Network. The fee is assumed to be paid in the native Asset of the Network.

    -

    Constructors

    Constructors

    • Trades should be created through Wallet.trade or Address.trade.

      @@ -23,38 +26,47 @@

    Returns Trade

    Throws

    • If the Trade model is empty.
    -

    Properties

    approveTransaction?: Transaction
    model: Trade
    transaction?: Transaction

    Methods

    Properties

    approveTransaction?: Transaction
    model: Trade
    transaction?: Transaction

    Methods

    • Broadcasts the Trade to the Network.

      +

      Returns Promise<Trade>

      The Trade object

      +

      Throws

      if the API request to broadcast a Trade fails.

      +
    • Returns the Address ID of the Trade.

      Returns string

      The Address ID.

      -
    • Returns the amount of the from asset for the Trade.

      Returns Decimal

      The amount of the from asset.

      -
    • Returns the From Asset ID of the Trade.

      Returns string

      The From Asset ID.

      -
    • Returns the Network ID of the Trade.

      Returns string

      The Network ID.

      -
    • Returns the amount of the to asset for the Trade.

      Returns Decimal

      The amount of the to asset.

      -
    • Returns the To Asset ID of the Trade.

      Returns string

      The To Asset ID.

      -
    • Returns the Wallet ID of the Trade.

      Returns string

      The Wallet ID.

      -
    • Reloads the Trade model with the latest version from the server side.

      Returns Promise<Trade>

      The most recent version of Trade from the server.

      -
    • Resets the trade model with the specified data from the server.

      +

      Parameters

      • model: Trade

        The Trade model

        +

      Returns Trade

      The updated Trade object

      +
    • Signs the Trade with the provided key. +This signs the transfer transaction and will sign the approval transaction if present.

      +

      Parameters

      • key: Wallet

        The key to sign the Transfer with

        +

      Returns Promise<void>

    • Returns a String representation of the Trade.

      Returns string

      A String representation of the Trade.

      -
    • Waits until the Trade is completed or failed by polling the Network at the given interval. Raises a -Error if the Trade takes longer than the given timeout.

      +
    • Waits until the Trade is completed or failed by polling the Network at the given interval. +Raises an error if the Trade takes longer than the given timeout.

      Parameters

      • options: {
            intervalSeconds: undefined | number;
            timeoutSeconds: undefined | number;
        } = {}

        The options to configure the wait function.

        • intervalSeconds: undefined | number

          The interval at which to poll the Network, in seconds

        • timeoutSeconds: undefined | number

          The maximum amount of time to wait for the Trade to complete, in seconds

      Returns Promise<Trade>

      The completed Trade object.

      Throws

      If the Trade takes longer than the given timeout.

      Throws

      If the request fails.

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/classes/coinbase_transaction.Transaction.html b/docs/classes/coinbase_transaction.Transaction.html index bb33d512..1ceeac68 100644 --- a/docs/classes/coinbase_transaction.Transaction.html +++ b/docs/classes/coinbase_transaction.Transaction.html @@ -1,9 +1,13 @@ Transaction | @coinbase/coinbase-sdk

    A representation of an onchain Transaction.

    -

    Constructors

    Constructors

    Properties

    raw?: Transaction
    signed: undefined | boolean

    Methods

    • Returns the From Address ID for the Transaction.

      +

    Returns Transaction

    Properties

    raw?: Transaction

    Methods

    • Returns the Block Hash where the Transaction is recorded.

      +

      Returns undefined | string

      The Block Hash

      +
    • Returns the Block Height where the Transaction is recorded.

      +

      Returns undefined | string

      The Block Height

      +
    • Returns the Signed Payload of the Transaction.

      Returns undefined | string

      The Signed Payload

      -
    • Returns the Signed Payload of the Transaction.

      +

      Returns undefined | string

      The Signed Payload

      +
    • Returns the Transaction Hash of the Transaction.

      Returns undefined | string

      The Transaction Hash

      -
    • Returns the link to the Transaction on the blockchain explorer.

      Returns string

      The link to the Transaction on the blockchain explorer

      -
    • Returns the Unsigned Payload of the Transaction.

      Returns string

      The Unsigned Payload

      -
    • Returns whether the transaction has been signed.

      -

      Returns undefined | boolean

      if the transaction has been signed.

      -
    • Returns whether the transaction has been signed.

      +

      Returns boolean

      if the transaction has been signed.

      +
    • Returns whether the Transaction is in a terminal State.

      Returns boolean

      Whether the Transaction is in a terminal State

      -
    • Returns the underlying raw transaction.

      Returns Transaction

      The ethers.js Transaction object

      Throws

      If the Unsigned Payload is invalid.

      -
    • Signs the Transaction with the provided key and returns the hex signing payload.

      Parameters

      • key: Wallet

        The key to sign the transaction with

      Returns Promise<string>

      The hex-encoded signed payload

      -
    • Returns the To Address ID for the Transaction if it's available.

      +

      Returns undefined | string

      The To Address ID

      +
    • Returns a string representation of the Transaction.

      Returns string

      A string representation of the Transaction.

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/classes/coinbase_transfer.Transfer.html b/docs/classes/coinbase_transfer.Transfer.html index 85111736..54b7606b 100644 --- a/docs/classes/coinbase_transfer.Transfer.html +++ b/docs/classes/coinbase_transfer.Transfer.html @@ -1,59 +1,76 @@ Transfer | @coinbase/coinbase-sdk

    A representation of a Transfer, which moves an Amount of an Asset from a user-controlled Wallet to another Address. The fee is assumed to be paid in the native Asset of the Network.

    -

    Properties

    model: Transfer

    Methods

    • Returns the Destination Address ID of the Transfer.

      Returns string

      The Destination Address ID.

      -
    • Returns the From Address ID of the Transfer.

      Returns string

      The From Address ID.

      -
    • Returns the Signed Payload of the Transfer.

      -

      Returns undefined | string

      The Signed Payload as a Hex string, or undefined if not yet available.

      -
    • Returns the Transaction of the Transfer.

      -

      Returns Transaction

      The ethers.js Transaction object.

      +
    • Returns the Transaction of the Transfer.

      +

      Returns undefined | Transaction

      The ethers.js Transaction object.

      Throws

      (InvalidUnsignedPayload) If the Unsigned Payload is invalid.

      -
    • Returns the Transaction Hash of the Transfer.

      Returns undefined | string

      The Transaction Hash as a Hex string, or undefined if not yet available.

      -
    • Returns the link to the Transaction on the blockchain explorer.

      -

      Returns string

      The link to the Transaction on the blockchain explorer.

      -
    • Returns the Unsigned Payload of the Transfer.

      -

      Returns string

      The Unsigned Payload as a Hex string.

      -
    • Returns the link to the Transaction on the blockchain explorer.

      +

      Returns undefined | string

      The link to the Transaction on the blockchain explorer.

      +
    • Reloads the Transfer model with the latest data from the server.

      Returns Promise<void>

      Throws

      if the API request to get a Transfer fails.

      -
    • Sets the Signed Transaction of the Transfer.

      -

      Parameters

      • transaction: Transaction

        The Signed Transaction.

        -

      Returns void

    • Signs the Transfer with the provided key and returns the hex signature +required for broadcasting the Transfer.

      +

      Parameters

      • key: Wallet

        The key to sign the Transfer with

        +

      Returns Promise<string>

      The hex-encoded signed payload

      +
    • Returns a string representation of the Transfer.

      Returns string

      The string representation of the Transfer.

      -
    • Waits for the Transfer to be confirmed on the Network or fail on chain. +Waits until the Transfer is completed or failed on-chain by polling at the given interval. +Raises an error if the Trade takes longer than the given timeout.

      +

      Parameters

      • options: {
            intervalSeconds: undefined | number;
            timeoutSeconds: undefined | number;
        } = {}

        The options to configure the wait function.

        +
        • intervalSeconds: undefined | number

          The interval to check the status of the Transfer.

          +
        • timeoutSeconds: undefined | number

          The maximum time to wait for the Transfer to be confirmed.

          +

      Returns Promise<Transfer>

      The Transfer object in a terminal state.

      +

      Throws

      if the Transfer times out.

      +
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/classes/coinbase_user.User.html b/docs/classes/coinbase_user.User.html deleted file mode 100644 index c8ff8642..00000000 --- a/docs/classes/coinbase_user.User.html +++ /dev/null @@ -1,40 +0,0 @@ -User | @coinbase/coinbase-sdk

    A representation of a User. -Users have Wallets, which can hold balances of Assets. -Access the default User through Coinbase.defaultUser().

    -

    Constructors

    Properties

    model: User

    Methods

    • Creates a new Wallet belonging to the User.

      -

      Parameters

      • createWalletOptions: CreateWalletOptionsType = {}

        The options for creating the Wallet.

        -

      Returns Promise<Wallet>

      the new Wallet

      -

      Throws

        -
      • If the request fails.
      • -
      -

      Throws

        -
      • If the model or client is not provided.
      • -
      -

      Throws

        -
      • If address derivation or caching fails.
      • -
      -
    • Returns the Wallet with the given ID.

      -

      Parameters

      • wallet_id: string

        the ID of the Wallet

        -

      Returns Promise<Wallet>

      the Wallet with the given ID

      -
    • Lists the Wallets belonging to the User.

      -

      Parameters

      • pageSize: number = 10

        The number of Wallets to return per page. Defaults to 10

        -
      • Optional nextPageToken: string

        The token for the next page of Wallets

        -

      Returns Promise<{
          nextPageToken: string;
          wallets: Wallet[];
      }>

      An object containing the Wallets and the token for the next page

      -
    • Returns a string representation of the User.

      -

      Returns string

      The string representation of the User.

      -
    \ No newline at end of file diff --git a/docs/classes/coinbase_validator.Validator.html b/docs/classes/coinbase_validator.Validator.html new file mode 100644 index 00000000..4dc545cc --- /dev/null +++ b/docs/classes/coinbase_validator.Validator.html @@ -0,0 +1,80 @@ +Validator | @coinbase/coinbase-sdk

    A representation of a validator onchain.

    +

    Constructors

    Properties

    model: Validator

    Methods

    • Returns the activation epoch of the validator.

      +

      Returns string

      The activation epoch as a string.

      +
    • Returns the exit epoch of the validator.

      +

      Returns string

      The exit epoch as a string.

      +
    • Returns the address for execution layer rewards (MEV & tx fees).If using a reward splitter plan, this is a smart contract +address that splits rewards based on defined commissions and send a portion to the forwarded_fee_recipient_address.

      +

      Returns string

      The fee recipient address as a string.

      +
    • If using a reward splitter plan, this address receives a defined percentage of the total execution layer rewards.

      +

      Returns string

      The forwarded fee recipient address as a string.

      +
    • Returns the public key of the validator.

      +

      Returns string

      The validator's public key as a string.

      +
    • Returns the withdrawable epoch of the validator.

      +

      Returns string

      The withdrawable epoch as a string.

      +
    • Returns the withdrawal address of the validator.

      +

      Returns string

      The withdrawal address as a string.

      +
    • Returns the withdrawal credentials of the validator.

      +

      Returns string

      The withdrawal credentials as a string.

      +
    • Returns whether the validator has been slashed.

      +

      Returns boolean

      True if the validator has been slashed, false otherwise.

      +
    • Returns the JSON representation of the Validator.

      +

      Returns string

      The JSON representation of the Validator.

      +
    • Returns the string representation of the Validator.

      +

      Returns string

      The string representation of the Validator.

      +
    • Returns the details of a specific validator.

      +

      Parameters

      • networkId: string

        The network ID.

        +
      • assetId: string

        The asset ID.

        +
      • id: string

        The unique publicly identifiable id of the validator for which to fetch the data.

        +

      Returns Promise<Validator>

      The requested validator details.

      +
    • Returns the list of Validators.

      +

      Parameters

      • networkId: string

        The network ID.

        +
      • assetId: string

        The asset ID.

        +
      • Optional status: ValidatorStatus

        The status to filter by.

        +

      Returns Promise<Validator[]>

      The list of Validators.

      +
    \ No newline at end of file diff --git a/docs/classes/coinbase_wallet.Wallet.html b/docs/classes/coinbase_wallet.Wallet.html index c05590ef..28846967 100644 --- a/docs/classes/coinbase_wallet.Wallet.html +++ b/docs/classes/coinbase_wallet.Wallet.html @@ -1,7 +1,10 @@ Wallet | @coinbase/coinbase-sdk

    A representation of a Wallet. Wallets come with a single default Address, but can expand to have a set of Addresses, each of which can hold a balance of one or more Assets. Wallets can create new Addresses, list their addresses, -list their balances, and transfer Assets to other Addresses. Wallets should be created through User.createWallet or User.importWallet.

    -

    Properties

    addressPathPrefix +list their balances, and transfer Assets to other Addresses. Wallets should be created through User.createWallet or User.importWallet. +Wallets should be created using Wallet.create, imported using Wallet.import, or fetched using Wallet.fetch. +Existing wallets can be imported with a seed using Wallet.import. +Wallets backed by a Server Signer can be fetched with Wallet.fetch and used for signing operations immediately.

    +

    Properties

    addressPathPrefix: "m/44'/60'/0'/0" = "m/44'/60'/0'/0"
    addresses: WalletAddress[] = []
    master?: HDKey
    model: Wallet
    seed?: string
    MAX_ADDRESSES: number = 20

    Methods

    • Returns a WalletAddress object for the given AddressModel.

      +

    Properties

    addressPathPrefix: "m/44'/60'/0'/0" = "m/44'/60'/0'/0"
    addresses: WalletAddress[] = []
    master?: HDKey
    model: Wallet
    seed?: string
    MAX_ADDRESSES: number = 20

    Methods

    • Returns a WalletAddress object for the given AddressModel.

      Parameters

      • addressModel: Address

        The AddressModel to build the WalletAddress from.

      • index: number

        The index of the AddressModel.

      Returns WalletAddress

      The WalletAddress object.

      -
    • Returns whether the Wallet has a seed with which to derive keys and sign transactions.

      +
    • Returns whether the Wallet has a seed with which to derive keys and sign transactions.

      Returns boolean

      Whether the Wallet has a seed with which to derive keys and sign transactions.

      -
    • Get the claimable balance for the supplied asset.

      +

      Parameters

      • asset_id: string

        The asset to check claimable balance for.

        +
      • mode: StakeOptionsMode = StakeOptionsMode.DEFAULT

        The staking mode. Defaults to DEFAULT.

        +
      • options: {
            [key: string]: string;
        } = {}

        Additional options for getting the claimable balance.

        +
        • [key: string]: string

      Returns Promise<Decimal>

      The claimable balance.

      +

      Throws

      if the default address is not found.

      +
    • Creates an attestation for the Address currently being created.

      +
    • Creates an attestation for the Address currently being created.

      Parameters

      • key: HDKey

        The key of the Wallet.

      Returns string

      The attestation.

      -
    • Trades the given amount of the given Asset for another Asset. Currently only the default address is used to source the Trade

      -

      Parameters

      • amount: Amount

        The amount of the Asset to send.

        -
      • fromAssetId: string

        The ID of the Asset to trade from.

        -
      • toAssetId: string

        The ID of the Asset to trade to.

        -

      Returns Promise<Trade>

      The Trade object.

      +
    • Creates a staking operation to claim stake, signs it, and broadcasts it on the blockchain.

      +

      Parameters

      • amount: Amount

        The amount for the staking operation.

        +
      • assetId: string

        The asset for the staking operation.

        +
      • mode: StakeOptionsMode = StakeOptionsMode.DEFAULT

        The staking mode. Defaults to DEFAULT.

        +
      • options: {
            [key: string]: string;
        } = {}

        Additional options such as setting the mode for the staking action.

        +
        • [key: string]: string
      • timeoutSeconds: number = 60

        The amount to wait for the transaction to complete when broadcasted.

        +
      • intervalSeconds: number = 0.2

        The amount to check each time for a successful broadcast.

        +

      Returns Promise<StakingOperation>

      The staking operation after it's completed fully.

      +

      Throws

      if the default address is not found.

      +
    • Creates a Payload Signature.

      +

      Parameters

      • unsignedPayload: string

        The Unsigned Payload to sign.

        +

      Returns Promise<PayloadSignature>

      A promise that resolves to the Payload Signature object.

      +

      Throws

      if the API request to create a Payload Signature fails.

      +

      Throws

      if the default address is not found.

      +
    • Creates a staking operation to stake, signs it, and broadcasts it on the blockchain.

      +

      Parameters

      • amount: Amount

        The amount for the staking operation.

        +
      • assetId: string

        The asset for the staking operation.

        +
      • mode: StakeOptionsMode = StakeOptionsMode.DEFAULT

        The staking mode. Defaults to DEFAULT.

        +
      • options: {
            [key: string]: string;
        } = {}

        Additional options such as setting the mode for the staking action.

        +
        • [key: string]: string
      • timeoutSeconds: number = 60

        The amount to wait for the transaction to complete when broadcasted.

        +
      • intervalSeconds: number = 0.2

        The amount to check each time for a successful broadcast.

        +

      Returns Promise<StakingOperation>

      The staking operation after it's completed fully.

      +

      Throws

      if the default address is not found.

      +
    • Trades the given amount of the given Asset for another Asset. + Currently only the default address is used to source the Trade.

      +

      Parameters

      Returns Promise<Trade>

      The created Trade object.

      Throws

      If the default address is not found.

      Throws

      If the private key is not loaded, or if the asset IDs are unsupported, or if there are insufficient funds.

      -
    • Transfers the given amount of the given Asset to the given address. Only same-Network Transfers are supported. +

    • Transfers the given amount of the given Asset to the given address. Only same-Network Transfers are supported. Currently only the default_address is used to source the Transfer.

      Parameters

      Returns Promise<Transfer>

      The hash of the Transfer transaction.

      +

    Returns Promise<Transfer>

    The created Transfer object.

    Throws

    if the API request to create a Transfer fails.

    Throws

    if the API request to broadcast a Transfer fails.

    -

    Throws

    if the Transfer times out.

    -

    Returns void

    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/classes/coinbase_webhook.Webhook.html b/docs/classes/coinbase_webhook.Webhook.html new file mode 100644 index 00000000..8913cb7f --- /dev/null +++ b/docs/classes/coinbase_webhook.Webhook.html @@ -0,0 +1,52 @@ +Webhook | @coinbase/coinbase-sdk

    A representation of a Webhook, +which provides methods to create, list, update, and delete webhooks that are used to receive notifications of specific events.

    +

    Constructors

    Properties

    model: null | Webhook

    Methods

    • Deletes the webhook.

      +

      Returns Promise<void>

      A promise that resolves when the webhook is deleted and its attributes are set to null.

      +
    • Returns the ID of the webhook.

      +

      Returns undefined | string

      The ID of the webhook, or undefined if the model is null.

      +
    • Returns the network ID associated with the webhook.

      +

      Returns undefined | string

      The network ID of the webhook, or undefined if the model is null.

      +
    • Returns the notification URI of the webhook.

      +

      Returns undefined | string

      The URI where notifications are sent, or undefined if the model is null.

      +
    • Returns the signature header of the webhook.

      +

      Returns undefined | string

      The signature header which will be set on the callback requests, or undefined if the model is null.

      +
    • Returns a String representation of the Webhook.

      +

      Returns string

      A String representation of the Webhook.

      +
    • Updates the webhook with a new notification URI, and optionally a new list of addresses to monitor.

      +

      Parameters

      Returns Promise<Webhook>

      A promise that resolves to the updated Webhook object.

      +
    • Returns a new Webhook object. Do not use this method directly. Instead, Webhook.create(...)

      +

      Parameters

      • model: Webhook

        The underlying Webhook model object

        +

      Returns Webhook

      A Webhook object.

      +

      Constructs

      Webhook

      +
    \ No newline at end of file diff --git a/docs/enums/client_api.Feature.html b/docs/enums/client_api.Feature.html deleted file mode 100644 index e16c6cbb..00000000 --- a/docs/enums/client_api.Feature.html +++ /dev/null @@ -1,6 +0,0 @@ -Feature | @coinbase/coinbase-sdk

    Features that can be enabled for a wallet

    -

    Export

    Enumeration Members

    Enumeration Members

    Faucet: "faucet"
    ServerSigner: "server_signer"
    Trade: "trade"
    Transfer: "transfer"
    \ No newline at end of file diff --git a/docs/enums/client_api.NetworkIdentifier.html b/docs/enums/client_api.NetworkIdentifier.html new file mode 100644 index 00000000..2a81f239 --- /dev/null +++ b/docs/enums/client_api.NetworkIdentifier.html @@ -0,0 +1,15 @@ +NetworkIdentifier | @coinbase/coinbase-sdk

    The ID of the blockchain network. This is unique across all networks, and takes the form of <blockchain>-<network>.

    +

    Export

    Enumeration Members

    ArbitrumMainnet: "arbitrum-mainnet"
    ArbitrumSepolia: "arbitrum-sepolia"
    BaseMainnet: "base-mainnet"
    BaseSepolia: "base-sepolia"
    BitcoinMainnet: "bitcoin-mainnet"
    EthereumHolesky: "ethereum-holesky"
    EthereumMainnet: "ethereum-mainnet"
    EthereumSepolia: "ethereum-sepolia"
    NearMainnet: "near-mainnet"
    NearTestnet: "near-testnet"
    PolygonMainnet: "polygon-mainnet"
    SolanaDevnet: "solana-devnet"
    SolanaMainnet: "solana-mainnet"
    \ No newline at end of file diff --git a/docs/enums/client_api.SmartContractType.html b/docs/enums/client_api.SmartContractType.html new file mode 100644 index 00000000..38c5e5af --- /dev/null +++ b/docs/enums/client_api.SmartContractType.html @@ -0,0 +1,6 @@ +SmartContractType | @coinbase/coinbase-sdk

    The type of the smart contract.

    +

    Export

    Enumeration Members

    Enumeration Members

    Custom: "custom"
    Erc1155: "erc1155"
    Erc20: "erc20"
    Erc721: "erc721"
    \ No newline at end of file diff --git a/docs/enums/client_api.StakingRewardFormat.html b/docs/enums/client_api.StakingRewardFormat.html new file mode 100644 index 00000000..57df4e64 --- /dev/null +++ b/docs/enums/client_api.StakingRewardFormat.html @@ -0,0 +1,4 @@ +StakingRewardFormat | @coinbase/coinbase-sdk

    The format in which the rewards are to be fetched i.e native or in equivalent USD

    +

    Export

    Enumeration Members

    Enumeration Members

    Native: "native"
    Usd: "usd"
    \ No newline at end of file diff --git a/docs/enums/client_api.TokenTransferType.html b/docs/enums/client_api.TokenTransferType.html new file mode 100644 index 00000000..901c9614 --- /dev/null +++ b/docs/enums/client_api.TokenTransferType.html @@ -0,0 +1,6 @@ +TokenTransferType | @coinbase/coinbase-sdk

    The type of the token transfer.

    +

    Export

    Enumeration Members

    Enumeration Members

    Erc1155: "erc1155"
    Erc20: "erc20"
    Erc721: "erc721"
    Unknown: "unknown"
    \ No newline at end of file diff --git a/docs/enums/client_api.TransactionType.html b/docs/enums/client_api.TransactionType.html index c57b94f3..df5cd4e2 100644 --- a/docs/enums/client_api.TransactionType.html +++ b/docs/enums/client_api.TransactionType.html @@ -1,2 +1,2 @@ -TransactionType | @coinbase/coinbase-sdk

    Export

    Enumeration Members

    Enumeration Members

    Transfer: "transfer"
    \ No newline at end of file +TransactionType | @coinbase/coinbase-sdk

    Export

    Enumeration Members

    Enumeration Members

    Transfer: "transfer"
    \ No newline at end of file diff --git a/docs/enums/client_api.ValidatorStatus.html b/docs/enums/client_api.ValidatorStatus.html new file mode 100644 index 00000000..84e96b81 --- /dev/null +++ b/docs/enums/client_api.ValidatorStatus.html @@ -0,0 +1,15 @@ +ValidatorStatus | @coinbase/coinbase-sdk

    The status of the validator.

    +

    Export

    Enumeration Members

    Active: "active"
    ActiveSlashed: "active_slashed"
    Deposited: "deposited"
    Exited: "exited"
    ExitedSlashed: "exited_slashed"
    Exiting: "exiting"
    PendingActivation: "pending_activation"
    Provisioned: "provisioned"
    Provisioning: "provisioning"
    Reaped: "reaped"
    Unknown: "unknown"
    WithdrawalAvailable: "withdrawal_available"
    WithdrawalComplete: "withdrawal_complete"
    \ No newline at end of file diff --git a/docs/enums/client_api.WebhookEventType.html b/docs/enums/client_api.WebhookEventType.html new file mode 100644 index 00000000..108556e6 --- /dev/null +++ b/docs/enums/client_api.WebhookEventType.html @@ -0,0 +1,6 @@ +WebhookEventType | @coinbase/coinbase-sdk

    Export

    Enumeration Members

    Erc20Transfer: "erc20_transfer"
    Erc721Transfer: "erc721_transfer"
    SmartContractEventActivity: "smart_contract_event_activity"
    Unspecified: "unspecified"
    WalletActivity: "wallet_activity"
    \ No newline at end of file diff --git a/docs/enums/client_api.WebhookStatus.html b/docs/enums/client_api.WebhookStatus.html new file mode 100644 index 00000000..8d7a5dc9 --- /dev/null +++ b/docs/enums/client_api.WebhookStatus.html @@ -0,0 +1,4 @@ +WebhookStatus | @coinbase/coinbase-sdk

    The status of the webhook.

    +

    Export

    Enumeration Members

    Enumeration Members

    Active: "active"
    Inactive: "inactive"
    \ No newline at end of file diff --git a/docs/enums/coinbase_types.FundOperationStatus.html b/docs/enums/coinbase_types.FundOperationStatus.html new file mode 100644 index 00000000..2cbf0cc6 --- /dev/null +++ b/docs/enums/coinbase_types.FundOperationStatus.html @@ -0,0 +1,5 @@ +FundOperationStatus | @coinbase/coinbase-sdk

    Fund Operation status type definition.

    +

    Enumeration Members

    Enumeration Members

    COMPLETE: "complete"
    FAILED: "failed"
    PENDING: "pending"
    \ No newline at end of file diff --git a/docs/enums/coinbase_types.PayloadSignatureStatus.html b/docs/enums/coinbase_types.PayloadSignatureStatus.html new file mode 100644 index 00000000..1895f547 --- /dev/null +++ b/docs/enums/coinbase_types.PayloadSignatureStatus.html @@ -0,0 +1,5 @@ +PayloadSignatureStatus | @coinbase/coinbase-sdk

    Payload Signature status type definition.

    +

    Enumeration Members

    Enumeration Members

    FAILED: "failed"
    PENDING: "pending"
    SIGNED: "signed"
    \ No newline at end of file diff --git a/docs/enums/coinbase_types.ServerSignerStatus.html b/docs/enums/coinbase_types.ServerSignerStatus.html index bc305e7c..6df4682a 100644 --- a/docs/enums/coinbase_types.ServerSignerStatus.html +++ b/docs/enums/coinbase_types.ServerSignerStatus.html @@ -1,4 +1,4 @@ ServerSignerStatus | @coinbase/coinbase-sdk

    ServerSigner status type definition.

    -

    Enumeration Members

    Enumeration Members

    Enumeration Members

    ACTIVE: "active_seed"
    PENDING: "pending_seed_creation"
    \ No newline at end of file +

    Enumeration Members

    ACTIVE: "active_seed"
    PENDING: "pending_seed_creation"
    \ No newline at end of file diff --git a/docs/enums/coinbase_types.SmartContractType.html b/docs/enums/coinbase_types.SmartContractType.html new file mode 100644 index 00000000..c3baa573 --- /dev/null +++ b/docs/enums/coinbase_types.SmartContractType.html @@ -0,0 +1,6 @@ +SmartContractType | @coinbase/coinbase-sdk

    Smart Contract Type

    +

    Enumeration Members

    Enumeration Members

    CUSTOM: "custom"
    ERC1155: "erc1155"
    ERC20: "erc20"
    ERC721: "erc721"
    \ No newline at end of file diff --git a/docs/enums/coinbase_types.SponsoredSendStatus.html b/docs/enums/coinbase_types.SponsoredSendStatus.html new file mode 100644 index 00000000..94561238 --- /dev/null +++ b/docs/enums/coinbase_types.SponsoredSendStatus.html @@ -0,0 +1,7 @@ +SponsoredSendStatus | @coinbase/coinbase-sdk

    Sponsored Send status type definition.

    +

    Enumeration Members

    Enumeration Members

    COMPLETE: "complete"
    FAILED: "failed"
    PENDING: "pending"
    SIGNED: "signed"
    SUBMITTED: "submitted"
    \ No newline at end of file diff --git a/docs/enums/coinbase_types.StakeOptionsMode.html b/docs/enums/coinbase_types.StakeOptionsMode.html index 91a510c2..3ec090cd 100644 --- a/docs/enums/coinbase_types.StakeOptionsMode.html +++ b/docs/enums/coinbase_types.StakeOptionsMode.html @@ -1,6 +1,8 @@ StakeOptionsMode | @coinbase/coinbase-sdk

    StakeOptionsMode type definition.

    -

    Enumeration Members

    Enumeration Members

    Enumeration Members

    DEFAULT: "default"

    Defaults to the mode specific to the asset.

    -
    PARTIAL: "partial"

    Partial represents Partial Ethereumn Staking mode.

    -
    \ No newline at end of file +
    NATIVE: "native"

    Native represents Native Ethereum Staking mode.

    +
    PARTIAL: "partial"

    Partial represents Partial Ethereum Staking mode.

    +
    \ No newline at end of file diff --git a/docs/enums/coinbase_types.StakingRewardFormat.html b/docs/enums/coinbase_types.StakingRewardFormat.html new file mode 100644 index 00000000..1ea3be9d --- /dev/null +++ b/docs/enums/coinbase_types.StakingRewardFormat.html @@ -0,0 +1,5 @@ +StakingRewardFormat | @coinbase/coinbase-sdk

    Staking reward format type definition. +Represents the format in which staking rewards can be queried.

    +

    Enumeration Members

    Enumeration Members

    NATIVE: "native"
    USD: "usd"
    \ No newline at end of file diff --git a/docs/enums/coinbase_types.TransactionStatus.html b/docs/enums/coinbase_types.TransactionStatus.html index 9acea669..d7cac2f6 100644 --- a/docs/enums/coinbase_types.TransactionStatus.html +++ b/docs/enums/coinbase_types.TransactionStatus.html @@ -1,6 +1,8 @@ TransactionStatus | @coinbase/coinbase-sdk

    Transaction status type definition.

    -

    Enumeration Members

    Enumeration Members

    Enumeration Members

    BROADCAST: "broadcast"
    COMPLETE: "complete"
    FAILED: "failed"
    PENDING: "pending"
    \ No newline at end of file +SIGNED +UNSPECIFIED +

    Enumeration Members

    BROADCAST: "broadcast"
    COMPLETE: "complete"
    FAILED: "failed"
    PENDING: "pending"
    SIGNED: "signed"
    UNSPECIFIED: "unspecified"
    \ No newline at end of file diff --git a/docs/enums/coinbase_types.TransferStatus.html b/docs/enums/coinbase_types.TransferStatus.html index 9324b75b..bfd0471c 100644 --- a/docs/enums/coinbase_types.TransferStatus.html +++ b/docs/enums/coinbase_types.TransferStatus.html @@ -1,6 +1,6 @@ TransferStatus | @coinbase/coinbase-sdk

    Transfer status type definition.

    -

    Enumeration Members

    Enumeration Members

    Enumeration Members

    BROADCAST: "broadcast"
    COMPLETE: "complete"
    FAILED: "failed"
    PENDING: "pending"
    \ No newline at end of file +

    Enumeration Members

    BROADCAST: "broadcast"
    COMPLETE: "complete"
    FAILED: "failed"
    PENDING: "pending"
    \ No newline at end of file diff --git a/docs/enums/coinbase_types.ValidatorStatus.html b/docs/enums/coinbase_types.ValidatorStatus.html new file mode 100644 index 00000000..715373ce --- /dev/null +++ b/docs/enums/coinbase_types.ValidatorStatus.html @@ -0,0 +1,16 @@ +ValidatorStatus | @coinbase/coinbase-sdk

    Validator status type definition. +Represents the various states a validator can be in.

    +

    Enumeration Members

    ACTIVE: "active"
    ACTIVE_SLASHED: "active_slashed"
    DEPOSITED: "deposited"
    EXITED: "exited"
    EXITED_SLASHED: "exited_slashed"
    EXITING: "exiting"
    PENDING_ACTIVATION: "pending_activation"
    PROVISIONED: "provisioned"
    PROVISIONING: "provisioning"
    REAPED: "reaped"
    UNKNOWN: "unknown"
    WITHDRAWAL_AVAILABLE: "withdrawal_available"
    WITHDRAWAL_COMPLETE: "withdrawal_complete"
    \ No newline at end of file diff --git a/docs/functions/actions_sendUserOperation.sendUserOperation.html b/docs/functions/actions_sendUserOperation.sendUserOperation.html new file mode 100644 index 00000000..afe21b08 --- /dev/null +++ b/docs/functions/actions_sendUserOperation.sendUserOperation.html @@ -0,0 +1,7 @@ +sendUserOperation | @coinbase/coinbase-sdk
    • Sends a user operation to the network

      +

      Type Parameters

      • T extends readonly unknown[]

      Parameters

      Returns Promise<SendUserOperationReturnType>

      The result of the user operation

      +

      Example

      import { sendUserOperation } from "@coinbase/coinbase-sdk";
      import { parseEther } from "viem";

      const result = await sendUserOperation(wallet, {
      calls: [
      {
      abi: erc20Abi,
      functionName: "transfer",
      args: [to, amount],
      },
      {
      to: "0x1234567890123456789012345678901234567890",
      data: "0x",
      value: parseEther("0.0000005"),
      },
      ],
      chainId: 1,
      paymasterUrl: "https://api.developer.coinbase.com/rpc/v1/base/someapikey",
      }); +
      +
    \ No newline at end of file diff --git a/docs/functions/actions_waitForUserOperation.waitForUserOperation.html b/docs/functions/actions_waitForUserOperation.waitForUserOperation.html new file mode 100644 index 00000000..99f5b2a2 --- /dev/null +++ b/docs/functions/actions_waitForUserOperation.waitForUserOperation.html @@ -0,0 +1,6 @@ +waitForUserOperation | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/functions/client_api.AddressesApiAxiosParamCreator.html b/docs/functions/client_api.AddressesApiAxiosParamCreator.html index 0218cffa..8b4cda78 100644 --- a/docs/functions/client_api.AddressesApiAxiosParamCreator.html +++ b/docs/functions/client_api.AddressesApiAxiosParamCreator.html @@ -1,34 +1,53 @@ -AddressesApiAxiosParamCreator | @coinbase/coinbase-sdk
    • AddressesApi - axios parameter creator

      -

      Parameters

      Returns {
          createAddress: ((walletId, createAddressRequest?, options?) => Promise<RequestArgs>);
          getAddress: ((walletId, addressId, options?) => Promise<RequestArgs>);
          getAddressBalance: ((walletId, addressId, assetId, options?) => Promise<RequestArgs>);
          listAddressBalances: ((walletId, addressId, page?, options?) => Promise<RequestArgs>);
          listAddresses: ((walletId, limit?, page?, options?) => Promise<RequestArgs>);
          requestFaucetFunds: ((walletId, addressId, options?) => Promise<RequestArgs>);
      }

      • createAddress: ((walletId, createAddressRequest?, options?) => Promise<RequestArgs>)

        Create a new address scoped to the wallet.

        +AddressesApiAxiosParamCreator | @coinbase/coinbase-sdk
        • AddressesApi - axios parameter creator

          +

          Parameters

          Returns {
              createAddress: ((walletId, createAddressRequest?, options?) => Promise<RequestArgs>);
              createPayloadSignature: ((walletId, addressId, createPayloadSignatureRequest?, options?) => Promise<RequestArgs>);
              getAddress: ((walletId, addressId, options?) => Promise<RequestArgs>);
              getAddressBalance: ((walletId, addressId, assetId, options?) => Promise<RequestArgs>);
              getPayloadSignature: ((walletId, addressId, payloadSignatureId, options?) => Promise<RequestArgs>);
              listAddressBalances: ((walletId, addressId, page?, options?) => Promise<RequestArgs>);
              listAddresses: ((walletId, limit?, page?, options?) => Promise<RequestArgs>);
              listPayloadSignatures: ((walletId, addressId, limit?, page?, options?) => Promise<RequestArgs>);
              requestFaucetFunds: ((walletId, addressId, assetId?, options?) => Promise<RequestArgs>);
          }

          • createAddress: ((walletId, createAddressRequest?, options?) => Promise<RequestArgs>)

            Create a new address scoped to the wallet.

            Summary

            Create a new address

            Throws

              • (walletId, createAddressRequest?, options?): Promise<RequestArgs>
              • Parameters

                • walletId: string

                  The ID of the wallet to create the address in.

                • Optional createAddressRequest: CreateAddressRequest
                • Optional options: RawAxiosRequestConfig = {}

                  Override http request option.

                  +

                Returns Promise<RequestArgs>

          • createPayloadSignature: ((walletId, addressId, createPayloadSignatureRequest?, options?) => Promise<RequestArgs>)

            Create a new payload signature with an address.

            +

            Summary

            Create a new payload signature.

            +

            Throws

              • (walletId, addressId, createPayloadSignatureRequest?, options?): Promise<RequestArgs>
              • Parameters

                • walletId: string

                  The ID of the wallet the address belongs to.

                  +
                • addressId: string

                  The onchain address of the address to sign the payload with.

                  +
                • Optional createPayloadSignatureRequest: CreatePayloadSignatureRequest
                • Optional options: RawAxiosRequestConfig = {}

                  Override http request option.

                Returns Promise<RequestArgs>

          • getAddress: ((walletId, addressId, options?) => Promise<RequestArgs>)

            Get address

            Summary

            Get address by onchain address

            -

            Throws

              • (walletId, addressId, options?): Promise<RequestArgs>
              • Parameters

                • walletId: string

                  The ID of the wallet the address belongs to.

                  +

                  Throws

                    • (walletId, addressId, options?): Promise<RequestArgs>
                    • Parameters

                      • walletId: string

                        The ID of the wallet the address belongs to.

                      • addressId: string

                        The onchain address of the address that is being fetched.

                      • Optional options: RawAxiosRequestConfig = {}

                        Override http request option.

                      Returns Promise<RequestArgs>

                • getAddressBalance: ((walletId, addressId, assetId, options?) => Promise<RequestArgs>)

                  Get address balance

                  Summary

                  Get address balance for asset

                  -

                  Throws

                    • (walletId, addressId, assetId, options?): Promise<RequestArgs>
                    • Parameters

                      • walletId: string

                        The ID of the wallet to fetch the balance for

                        +

                        Throws

                          • (walletId, addressId, assetId, options?): Promise<RequestArgs>
                          • Parameters

                            • walletId: string

                              The ID of the wallet to fetch the balance for

                            • addressId: string

                              The onchain address of the address that is being fetched.

                            • assetId: string

                              The symbol of the asset to fetch the balance for

                            • Optional options: RawAxiosRequestConfig = {}

                              Override http request option.

                              +

                            Returns Promise<RequestArgs>

                      • getPayloadSignature: ((walletId, addressId, payloadSignatureId, options?) => Promise<RequestArgs>)

                        Get payload signature.

                        +

                        Summary

                        Get payload signature.

                        +

                        Throws

                          • (walletId, addressId, payloadSignatureId, options?): Promise<RequestArgs>
                          • Parameters

                            • walletId: string

                              The ID of the wallet the address belongs to.

                              +
                            • addressId: string

                              The onchain address of the address that signed the payload.

                              +
                            • payloadSignatureId: string

                              The ID of the payload signature to fetch.

                              +
                            • Optional options: RawAxiosRequestConfig = {}

                              Override http request option.

                            Returns Promise<RequestArgs>

                      • listAddressBalances: ((walletId, addressId, page?, options?) => Promise<RequestArgs>)

                        Get address balances

                        Summary

                        Get all balances for address

                        -

                        Throws

                          • (walletId, addressId, page?, options?): Promise<RequestArgs>
                          • Parameters

                            • walletId: string

                              The ID of the wallet to fetch the balances for

                              +

                              Throws

                                • (walletId, addressId, page?, options?): Promise<RequestArgs>
                                • Parameters

                                  • walletId: string

                                    The ID of the wallet to fetch the balances for

                                  • addressId: string

                                    The onchain address of the address that is being fetched.

                                  • Optional page: string

                                    A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

                                  • Optional options: RawAxiosRequestConfig = {}

                                    Override http request option.

                                  Returns Promise<RequestArgs>

                            • listAddresses: ((walletId, limit?, page?, options?) => Promise<RequestArgs>)

                              List addresses in the wallet.

                              Summary

                              List addresses in a wallet.

                              -

                              Throws

                                • (walletId, limit?, page?, options?): Promise<RequestArgs>
                                • Parameters

                                  • walletId: string

                                    The ID of the wallet whose addresses to fetch

                                    +

                                    Throws

                                      • (walletId, limit?, page?, options?): Promise<RequestArgs>
                                      • Parameters

                                        • walletId: string

                                          The ID of the wallet whose addresses to fetch

                                          +
                                        • Optional limit: number

                                          A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

                                          +
                                        • Optional page: string

                                          A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

                                          +
                                        • Optional options: RawAxiosRequestConfig = {}

                                          Override http request option.

                                          +

                                        Returns Promise<RequestArgs>

                                  • listPayloadSignatures: ((walletId, addressId, limit?, page?, options?) => Promise<RequestArgs>)

                                    List payload signatures for an address.

                                    +

                                    Summary

                                    List payload signatures for an address.

                                    +

                                    Throws

                                      • (walletId, addressId, limit?, page?, options?): Promise<RequestArgs>
                                      • Parameters

                                        • walletId: string

                                          The ID of the wallet the address belongs to.

                                          +
                                        • addressId: string

                                          The onchain address of the address whose payload signatures to fetch.

                                        • Optional limit: number

                                          A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

                                        • Optional page: string

                                          A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

                                        • Optional options: RawAxiosRequestConfig = {}

                                          Override http request option.

                                          -

                                        Returns Promise<RequestArgs>

                                  • requestFaucetFunds: ((walletId, addressId, options?) => Promise<RequestArgs>)

                                    Request faucet funds to be sent to onchain address.

                                    +

                                  Returns Promise<RequestArgs>

                            • requestFaucetFunds: ((walletId, addressId, assetId?, options?) => Promise<RequestArgs>)

                              Request faucet funds to be sent to onchain address.

                              Summary

                              Request faucet funds for onchain address.

                              -

                              Throws

                                • (walletId, addressId, options?): Promise<RequestArgs>
                                • Parameters

                                  • walletId: string

                                    The ID of the wallet the address belongs to.

                                    +

                                    Deprecated

                                    Throws

                                      • (walletId, addressId, assetId?, options?): Promise<RequestArgs>
                                      • Parameters

                                        • walletId: string

                                          The ID of the wallet the address belongs to.

                                        • addressId: string

                                          The onchain address of the address that is being fetched.

                                          +
                                        • Optional assetId: string

                                          The ID of the asset to transfer from the faucet.

                                        • Optional options: RawAxiosRequestConfig = {}

                                          Override http request option.

                                          -

                                        Returns Promise<RequestArgs>

                                  Export

        \ No newline at end of file +

    Returns Promise<RequestArgs>

    Export

    \ No newline at end of file diff --git a/docs/functions/client_api.AddressesApiFactory.html b/docs/functions/client_api.AddressesApiFactory.html index ccd33fdb..421ff4e2 100644 --- a/docs/functions/client_api.AddressesApiFactory.html +++ b/docs/functions/client_api.AddressesApiFactory.html @@ -1,34 +1,53 @@ -AddressesApiFactory | @coinbase/coinbase-sdk
    • AddressesApi - factory interface

      -

      Parameters

      • Optional configuration: Configuration
      • Optional basePath: string
      • Optional axios: AxiosInstance

      Returns {
          createAddress(walletId, createAddressRequest?, options?): AxiosPromise<Address>;
          getAddress(walletId, addressId, options?): AxiosPromise<Address>;
          getAddressBalance(walletId, addressId, assetId, options?): AxiosPromise<Balance>;
          listAddressBalances(walletId, addressId, page?, options?): AxiosPromise<AddressBalanceList>;
          listAddresses(walletId, limit?, page?, options?): AxiosPromise<AddressList>;
          requestFaucetFunds(walletId, addressId, options?): AxiosPromise<FaucetTransaction>;
      }

      • createAddress:function
        • Create a new address scoped to the wallet.

          +AddressesApiFactory | @coinbase/coinbase-sdk
          • AddressesApi - factory interface

            +

            Parameters

            • Optional configuration: Configuration
            • Optional basePath: string
            • Optional axios: AxiosInstance

            Returns {
                createAddress(walletId, createAddressRequest?, options?): AxiosPromise<Address>;
                createPayloadSignature(walletId, addressId, createPayloadSignatureRequest?, options?): AxiosPromise<PayloadSignature>;
                getAddress(walletId, addressId, options?): AxiosPromise<Address>;
                getAddressBalance(walletId, addressId, assetId, options?): AxiosPromise<Balance>;
                getPayloadSignature(walletId, addressId, payloadSignatureId, options?): AxiosPromise<PayloadSignature>;
                listAddressBalances(walletId, addressId, page?, options?): AxiosPromise<AddressBalanceList>;
                listAddresses(walletId, limit?, page?, options?): AxiosPromise<AddressList>;
                listPayloadSignatures(walletId, addressId, limit?, page?, options?): AxiosPromise<PayloadSignatureList>;
                requestFaucetFunds(walletId, addressId, assetId?, options?): AxiosPromise<FaucetTransaction>;
            }

            • createAddress:function
              • Create a new address scoped to the wallet.

                Parameters

                • walletId: string

                  The ID of the wallet to create the address in.

                  -
                • Optional createAddressRequest: CreateAddressRequest
                • Optional options: any

                  Override http request option.

                  +
                • Optional createAddressRequest: CreateAddressRequest
                • Optional options: RawAxiosRequestConfig

                  Override http request option.

                Returns AxiosPromise<Address>

                Summary

                Create a new address

                -

                Throws

            • getAddress:function
            • createPayloadSignature:function
              • Create a new payload signature with an address.

                +

                Parameters

                • walletId: string

                  The ID of the wallet the address belongs to.

                  +
                • addressId: string

                  The onchain address of the address to sign the payload with.

                  +
                • Optional createPayloadSignatureRequest: CreatePayloadSignatureRequest
                • Optional options: RawAxiosRequestConfig

                  Override http request option.

                  +

                Returns AxiosPromise<PayloadSignature>

                Summary

                Create a new payload signature.

                +

                Throws

            • getAddress:function
              • Get address

                Parameters

                • walletId: string

                  The ID of the wallet the address belongs to.

                • addressId: string

                  The onchain address of the address that is being fetched.

                  -
                • Optional options: any

                  Override http request option.

                  +
                • Optional options: RawAxiosRequestConfig

                  Override http request option.

                Returns AxiosPromise<Address>

                Summary

                Get address by onchain address

                -

                Throws

            • getAddressBalance:function
            • getAddressBalance:function
              • Get address balance

                Parameters

                • walletId: string

                  The ID of the wallet to fetch the balance for

                • addressId: string

                  The onchain address of the address that is being fetched.

                • assetId: string

                  The symbol of the asset to fetch the balance for

                  -
                • Optional options: any

                  Override http request option.

                  +
                • Optional options: RawAxiosRequestConfig

                  Override http request option.

                Returns AxiosPromise<Balance>

                Summary

                Get address balance for asset

                -

                Throws

            • listAddressBalances:function
            • getPayloadSignature:function
              • Get payload signature.

                +

                Parameters

                • walletId: string

                  The ID of the wallet the address belongs to.

                  +
                • addressId: string

                  The onchain address of the address that signed the payload.

                  +
                • payloadSignatureId: string

                  The ID of the payload signature to fetch.

                  +
                • Optional options: RawAxiosRequestConfig

                  Override http request option.

                  +

                Returns AxiosPromise<PayloadSignature>

                Summary

                Get payload signature.

                +

                Throws

            • listAddressBalances:function
              • Get address balances

                Parameters

                • walletId: string

                  The ID of the wallet to fetch the balances for

                • addressId: string

                  The onchain address of the address that is being fetched.

                • Optional page: string

                  A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

                  -
                • Optional options: any

                  Override http request option.

                  +
                • Optional options: RawAxiosRequestConfig

                  Override http request option.

                Returns AxiosPromise<AddressBalanceList>

                Summary

                Get all balances for address

                -

                Throws

            • listAddresses:function
            • listAddresses:function
              • List addresses in the wallet.

                Parameters

                • walletId: string

                  The ID of the wallet whose addresses to fetch

                • Optional limit: number

                  A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

                • Optional page: string

                  A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

                  -
                • Optional options: any

                  Override http request option.

                  +
                • Optional options: RawAxiosRequestConfig

                  Override http request option.

                Returns AxiosPromise<AddressList>

                Summary

                List addresses in a wallet.

                -

                Throws

            • requestFaucetFunds:function
            • listPayloadSignatures:function
              • List payload signatures for an address.

                +

                Parameters

                • walletId: string

                  The ID of the wallet the address belongs to.

                  +
                • addressId: string

                  The onchain address of the address whose payload signatures to fetch.

                  +
                • Optional limit: number

                  A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

                  +
                • Optional page: string

                  A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

                  +
                • Optional options: RawAxiosRequestConfig

                  Override http request option.

                  +

                Returns AxiosPromise<PayloadSignatureList>

                Summary

                List payload signatures for an address.

                +

                Throws

            • requestFaucetFunds:function
              • Request faucet funds to be sent to onchain address.

                Parameters

                • walletId: string

                  The ID of the wallet the address belongs to.

                • addressId: string

                  The onchain address of the address that is being fetched.

                  -
                • Optional options: any

                  Override http request option.

                  +
                • Optional assetId: string

                  The ID of the asset to transfer from the faucet.

                  +
                • Optional options: RawAxiosRequestConfig

                  Override http request option.

                Returns AxiosPromise<FaucetTransaction>

                Summary

                Request faucet funds for onchain address.

                -

                Throws

            Export

          \ No newline at end of file +

          Deprecated

          Throws

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.AddressesApiFp.html b/docs/functions/client_api.AddressesApiFp.html index 54ee3513..2ad0fb82 100644 --- a/docs/functions/client_api.AddressesApiFp.html +++ b/docs/functions/client_api.AddressesApiFp.html @@ -1,34 +1,53 @@ -AddressesApiFp | @coinbase/coinbase-sdk
    • AddressesApi - functional programming interface

      -

      Parameters

      Returns {
          createAddress(walletId, createAddressRequest?, options?): Promise<((axios?, basePath?) => AxiosPromise<Address>)>;
          getAddress(walletId, addressId, options?): Promise<((axios?, basePath?) => AxiosPromise<Address>)>;
          getAddressBalance(walletId, addressId, assetId, options?): Promise<((axios?, basePath?) => AxiosPromise<Balance>)>;
          listAddressBalances(walletId, addressId, page?, options?): Promise<((axios?, basePath?) => AxiosPromise<AddressBalanceList>)>;
          listAddresses(walletId, limit?, page?, options?): Promise<((axios?, basePath?) => AxiosPromise<AddressList>)>;
          requestFaucetFunds(walletId, addressId, options?): Promise<((axios?, basePath?) => AxiosPromise<FaucetTransaction>)>;
      }

      • createAddress:function
        • Create a new address scoped to the wallet.

          +AddressesApiFp | @coinbase/coinbase-sdk
          • AddressesApi - functional programming interface

            +

            Parameters

            Returns {
                createAddress(walletId, createAddressRequest?, options?): Promise<((axios?, basePath?) => AxiosPromise<Address>)>;
                createPayloadSignature(walletId, addressId, createPayloadSignatureRequest?, options?): Promise<((axios?, basePath?) => AxiosPromise<PayloadSignature>)>;
                getAddress(walletId, addressId, options?): Promise<((axios?, basePath?) => AxiosPromise<Address>)>;
                getAddressBalance(walletId, addressId, assetId, options?): Promise<((axios?, basePath?) => AxiosPromise<Balance>)>;
                getPayloadSignature(walletId, addressId, payloadSignatureId, options?): Promise<((axios?, basePath?) => AxiosPromise<PayloadSignature>)>;
                listAddressBalances(walletId, addressId, page?, options?): Promise<((axios?, basePath?) => AxiosPromise<AddressBalanceList>)>;
                listAddresses(walletId, limit?, page?, options?): Promise<((axios?, basePath?) => AxiosPromise<AddressList>)>;
                listPayloadSignatures(walletId, addressId, limit?, page?, options?): Promise<((axios?, basePath?) => AxiosPromise<PayloadSignatureList>)>;
                requestFaucetFunds(walletId, addressId, assetId?, options?): Promise<((axios?, basePath?) => AxiosPromise<FaucetTransaction>)>;
            }

            • createAddress:function
              • Create a new address scoped to the wallet.

                Parameters

                • walletId: string

                  The ID of the wallet to create the address in.

                • Optional createAddressRequest: CreateAddressRequest
                • Optional options: RawAxiosRequestConfig

                  Override http request option.

                Returns Promise<((axios?, basePath?) => AxiosPromise<Address>)>

                Summary

                Create a new address

                -

                Throws

            • getAddress:function
              • Get address

                +

                Throws

            • createPayloadSignature:function
              • Create a new payload signature with an address.

                +

                Parameters

                • walletId: string

                  The ID of the wallet the address belongs to.

                  +
                • addressId: string

                  The onchain address of the address to sign the payload with.

                  +
                • Optional createPayloadSignatureRequest: CreatePayloadSignatureRequest
                • Optional options: RawAxiosRequestConfig

                  Override http request option.

                  +

                Returns Promise<((axios?, basePath?) => AxiosPromise<PayloadSignature>)>

                Summary

                Create a new payload signature.

                +

                Throws

            • getAddress:function
              • Get address

                Parameters

                • walletId: string

                  The ID of the wallet the address belongs to.

                • addressId: string

                  The onchain address of the address that is being fetched.

                • Optional options: RawAxiosRequestConfig

                  Override http request option.

                Returns Promise<((axios?, basePath?) => AxiosPromise<Address>)>

                Summary

                Get address by onchain address

                -

                Throws

            • getAddressBalance:function
              • Get address balance

                +

                Throws

            • getAddressBalance:function
              • Get address balance

                Parameters

                • walletId: string

                  The ID of the wallet to fetch the balance for

                • addressId: string

                  The onchain address of the address that is being fetched.

                • assetId: string

                  The symbol of the asset to fetch the balance for

                • Optional options: RawAxiosRequestConfig

                  Override http request option.

                Returns Promise<((axios?, basePath?) => AxiosPromise<Balance>)>

                Summary

                Get address balance for asset

                -

                Throws

            • listAddressBalances:function
            • getPayloadSignature:function
              • Get payload signature.

                +

                Parameters

                • walletId: string

                  The ID of the wallet the address belongs to.

                  +
                • addressId: string

                  The onchain address of the address that signed the payload.

                  +
                • payloadSignatureId: string

                  The ID of the payload signature to fetch.

                  +
                • Optional options: RawAxiosRequestConfig

                  Override http request option.

                  +

                Returns Promise<((axios?, basePath?) => AxiosPromise<PayloadSignature>)>

                Summary

                Get payload signature.

                +

                Throws

            • listAddressBalances:function
              • Get address balances

                Parameters

                • walletId: string

                  The ID of the wallet to fetch the balances for

                • addressId: string

                  The onchain address of the address that is being fetched.

                • Optional page: string

                  A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

                • Optional options: RawAxiosRequestConfig

                  Override http request option.

                Returns Promise<((axios?, basePath?) => AxiosPromise<AddressBalanceList>)>

                Summary

                Get all balances for address

                -

                Throws

            • listAddresses:function
              • List addresses in the wallet.

                +

                Throws

            • listAddresses:function
              • List addresses in the wallet.

                Parameters

                • walletId: string

                  The ID of the wallet whose addresses to fetch

                • Optional limit: number

                  A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

                • Optional page: string

                  A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

                • Optional options: RawAxiosRequestConfig

                  Override http request option.

                Returns Promise<((axios?, basePath?) => AxiosPromise<AddressList>)>

                Summary

                List addresses in a wallet.

                -

                Throws

            • requestFaucetFunds:function
              • Request faucet funds to be sent to onchain address.

                +

                Throws

            • listPayloadSignatures:function
              • List payload signatures for an address.

                +

                Parameters

                • walletId: string

                  The ID of the wallet the address belongs to.

                  +
                • addressId: string

                  The onchain address of the address whose payload signatures to fetch.

                  +
                • Optional limit: number

                  A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

                  +
                • Optional page: string

                  A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

                  +
                • Optional options: RawAxiosRequestConfig

                  Override http request option.

                  +

                Returns Promise<((axios?, basePath?) => AxiosPromise<PayloadSignatureList>)>

                Summary

                List payload signatures for an address.

                +

                Throws

            • requestFaucetFunds:function
              • Request faucet funds to be sent to onchain address.

                Parameters

                • walletId: string

                  The ID of the wallet the address belongs to.

                • addressId: string

                  The onchain address of the address that is being fetched.

                  +
                • Optional assetId: string

                  The ID of the asset to transfer from the faucet.

                • Optional options: RawAxiosRequestConfig

                  Override http request option.

                Returns Promise<((axios?, basePath?) => AxiosPromise<FaucetTransaction>)>

                Summary

                Request faucet funds for onchain address.

                -

                Throws

            Export

          \ No newline at end of file +

          Deprecated

          Throws

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.AssetsApiAxiosParamCreator.html b/docs/functions/client_api.AssetsApiAxiosParamCreator.html index c1082600..5aeccd1e 100644 --- a/docs/functions/client_api.AssetsApiAxiosParamCreator.html +++ b/docs/functions/client_api.AssetsApiAxiosParamCreator.html @@ -2,6 +2,6 @@

    Parameters

    Returns {
        getAsset: ((networkId, assetId, options?) => Promise<RequestArgs>);
    }

    Export

    \ No newline at end of file +

    Returns Promise<RequestArgs>

    Export

    \ No newline at end of file diff --git a/docs/functions/client_api.AssetsApiFactory.html b/docs/functions/client_api.AssetsApiFactory.html index d3169b0c..c61821bf 100644 --- a/docs/functions/client_api.AssetsApiFactory.html +++ b/docs/functions/client_api.AssetsApiFactory.html @@ -1,7 +1,7 @@ AssetsApiFactory | @coinbase/coinbase-sdk
    • AssetsApi - factory interface

      Parameters

      • Optional configuration: Configuration
      • Optional basePath: string
      • Optional axios: AxiosInstance

      Returns {
          getAsset(networkId, assetId, options?): AxiosPromise<Asset>;
      }

      • getAsset:function
        • Get the asset for the specified asset ID.

          Parameters

          • networkId: string

            The ID of the blockchain network

            -
          • assetId: string

            The ID of the asset to fetch

            -
          • Optional options: any

            Override http request option.

            +
          • assetId: string

            The ID of the asset to fetch. This could be a symbol or an ERC20 contract address.

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

          Returns AxiosPromise<Asset>

          Summary

          Get the asset for the specified asset ID.

          -

          Throws

      Export

    \ No newline at end of file +

    Throws

    Export

    \ No newline at end of file diff --git a/docs/functions/client_api.AssetsApiFp.html b/docs/functions/client_api.AssetsApiFp.html index a6140389..7864fd2a 100644 --- a/docs/functions/client_api.AssetsApiFp.html +++ b/docs/functions/client_api.AssetsApiFp.html @@ -1,7 +1,7 @@ AssetsApiFp | @coinbase/coinbase-sdk
    • AssetsApi - functional programming interface

      Parameters

      Returns {
          getAsset(networkId, assetId, options?): Promise<((axios?, basePath?) => AxiosPromise<Asset>)>;
      }

      • getAsset:function
        • Get the asset for the specified asset ID.

          Parameters

          • networkId: string

            The ID of the blockchain network

            -
          • assetId: string

            The ID of the asset to fetch

            +
          • assetId: string

            The ID of the asset to fetch. This could be a symbol or an ERC20 contract address.

          • Optional options: RawAxiosRequestConfig

            Override http request option.

          Returns Promise<((axios?, basePath?) => AxiosPromise<Asset>)>

          Summary

          Get the asset for the specified asset ID.

          -

          Throws

      Export

    \ No newline at end of file +

    Throws

    Export

    \ No newline at end of file diff --git a/docs/functions/client_api.BalanceHistoryApiAxiosParamCreator.html b/docs/functions/client_api.BalanceHistoryApiAxiosParamCreator.html new file mode 100644 index 00000000..32890844 --- /dev/null +++ b/docs/functions/client_api.BalanceHistoryApiAxiosParamCreator.html @@ -0,0 +1,10 @@ +BalanceHistoryApiAxiosParamCreator | @coinbase/coinbase-sdk
    • BalanceHistoryApi - axios parameter creator

      +

      Parameters

      Returns {
          listAddressHistoricalBalance: ((networkId, addressId, assetId, limit?, page?, options?) => Promise<RequestArgs>);
      }

      • listAddressHistoricalBalance: ((networkId, addressId, assetId, limit?, page?, options?) => Promise<RequestArgs>)

        List the historical balance of an asset in a specific address.

        +

        Summary

        Get address balance history for asset

        +

        Throws

          • (networkId, addressId, assetId, limit?, page?, options?): Promise<RequestArgs>
          • Parameters

            • networkId: string

              The ID of the blockchain network

              +
            • addressId: string

              The ID of the address to fetch the historical balance for.

              +
            • assetId: string

              The symbol of the asset to fetch the historical balance for.

              +
            • Optional limit: number

              A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

              +
            • Optional page: string

              A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

              +
            • Optional options: RawAxiosRequestConfig = {}

              Override http request option.

              +

            Returns Promise<RequestArgs>

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.BalanceHistoryApiFactory.html b/docs/functions/client_api.BalanceHistoryApiFactory.html new file mode 100644 index 00000000..37d07424 --- /dev/null +++ b/docs/functions/client_api.BalanceHistoryApiFactory.html @@ -0,0 +1,10 @@ +BalanceHistoryApiFactory | @coinbase/coinbase-sdk
    • BalanceHistoryApi - factory interface

      +

      Parameters

      • Optional configuration: Configuration
      • Optional basePath: string
      • Optional axios: AxiosInstance

      Returns {
          listAddressHistoricalBalance(networkId, addressId, assetId, limit?, page?, options?): AxiosPromise<AddressHistoricalBalanceList>;
      }

      • listAddressHistoricalBalance:function
        • List the historical balance of an asset in a specific address.

          +

          Parameters

          • networkId: string

            The ID of the blockchain network

            +
          • addressId: string

            The ID of the address to fetch the historical balance for.

            +
          • assetId: string

            The symbol of the asset to fetch the historical balance for.

            +
          • Optional limit: number

            A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

            +
          • Optional page: string

            A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns AxiosPromise<AddressHistoricalBalanceList>

          Summary

          Get address balance history for asset

          +

          Throws

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.BalanceHistoryApiFp.html b/docs/functions/client_api.BalanceHistoryApiFp.html new file mode 100644 index 00000000..c392fa39 --- /dev/null +++ b/docs/functions/client_api.BalanceHistoryApiFp.html @@ -0,0 +1,10 @@ +BalanceHistoryApiFp | @coinbase/coinbase-sdk
    • BalanceHistoryApi - functional programming interface

      +

      Parameters

      Returns {
          listAddressHistoricalBalance(networkId, addressId, assetId, limit?, page?, options?): Promise<((axios?, basePath?) => AxiosPromise<AddressHistoricalBalanceList>)>;
      }

      • listAddressHistoricalBalance:function
        • List the historical balance of an asset in a specific address.

          +

          Parameters

          • networkId: string

            The ID of the blockchain network

            +
          • addressId: string

            The ID of the address to fetch the historical balance for.

            +
          • assetId: string

            The symbol of the asset to fetch the historical balance for.

            +
          • Optional limit: number

            A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

            +
          • Optional page: string

            A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns Promise<((axios?, basePath?) => AxiosPromise<AddressHistoricalBalanceList>)>

          Summary

          Get address balance history for asset

          +

          Throws

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.ContractEventsApiAxiosParamCreator.html b/docs/functions/client_api.ContractEventsApiAxiosParamCreator.html new file mode 100644 index 00000000..d9dbe62d --- /dev/null +++ b/docs/functions/client_api.ContractEventsApiAxiosParamCreator.html @@ -0,0 +1,13 @@ +ContractEventsApiAxiosParamCreator | @coinbase/coinbase-sdk
    • ContractEventsApi - axios parameter creator

      +

      Parameters

      Returns {
          listContractEvents: ((networkId, protocolName, contractAddress, contractName, eventName, fromBlockHeight, toBlockHeight, nextPage?, options?) => Promise<RequestArgs>);
      }

      • listContractEvents: ((networkId, protocolName, contractAddress, contractName, eventName, fromBlockHeight, toBlockHeight, nextPage?, options?) => Promise<RequestArgs>)

        Retrieve events for a specific contract

        +

        Summary

        List contract events

        +

        Throws

          • (networkId, protocolName, contractAddress, contractName, eventName, fromBlockHeight, toBlockHeight, nextPage?, options?): Promise<RequestArgs>
          • Parameters

            • networkId: string

              Unique identifier for the blockchain network

              +
            • protocolName: string

              Case-sensitive name of the blockchain protocol

              +
            • contractAddress: string

              EVM address of the smart contract (42 characters, including &#39;0x&#39;, in lowercase)

              +
            • contractName: string

              Case-sensitive name of the specific contract within the project

              +
            • eventName: string

              Case-sensitive name of the event to filter for in the contract&#39;s logs

              +
            • fromBlockHeight: number

              Lower bound of the block range to query (inclusive)

              +
            • toBlockHeight: number

              Upper bound of the block range to query (inclusive)

              +
            • Optional nextPage: string

              Pagination token for retrieving the next set of results

              +
            • Optional options: RawAxiosRequestConfig = {}

              Override http request option.

              +

            Returns Promise<RequestArgs>

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.ContractEventsApiFactory.html b/docs/functions/client_api.ContractEventsApiFactory.html new file mode 100644 index 00000000..213f4a54 --- /dev/null +++ b/docs/functions/client_api.ContractEventsApiFactory.html @@ -0,0 +1,13 @@ +ContractEventsApiFactory | @coinbase/coinbase-sdk
    • ContractEventsApi - factory interface

      +

      Parameters

      • Optional configuration: Configuration
      • Optional basePath: string
      • Optional axios: AxiosInstance

      Returns {
          listContractEvents(networkId, protocolName, contractAddress, contractName, eventName, fromBlockHeight, toBlockHeight, nextPage?, options?): AxiosPromise<ContractEventList>;
      }

      • listContractEvents:function
        • Retrieve events for a specific contract

          +

          Parameters

          • networkId: string

            Unique identifier for the blockchain network

            +
          • protocolName: string

            Case-sensitive name of the blockchain protocol

            +
          • contractAddress: string

            EVM address of the smart contract (42 characters, including &#39;0x&#39;, in lowercase)

            +
          • contractName: string

            Case-sensitive name of the specific contract within the project

            +
          • eventName: string

            Case-sensitive name of the event to filter for in the contract&#39;s logs

            +
          • fromBlockHeight: number

            Lower bound of the block range to query (inclusive)

            +
          • toBlockHeight: number

            Upper bound of the block range to query (inclusive)

            +
          • Optional nextPage: string

            Pagination token for retrieving the next set of results

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns AxiosPromise<ContractEventList>

          Summary

          List contract events

          +

          Throws

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.ContractEventsApiFp.html b/docs/functions/client_api.ContractEventsApiFp.html new file mode 100644 index 00000000..62619b5c --- /dev/null +++ b/docs/functions/client_api.ContractEventsApiFp.html @@ -0,0 +1,13 @@ +ContractEventsApiFp | @coinbase/coinbase-sdk
    • ContractEventsApi - functional programming interface

      +

      Parameters

      Returns {
          listContractEvents(networkId, protocolName, contractAddress, contractName, eventName, fromBlockHeight, toBlockHeight, nextPage?, options?): Promise<((axios?, basePath?) => AxiosPromise<ContractEventList>)>;
      }

      • listContractEvents:function
        • Retrieve events for a specific contract

          +

          Parameters

          • networkId: string

            Unique identifier for the blockchain network

            +
          • protocolName: string

            Case-sensitive name of the blockchain protocol

            +
          • contractAddress: string

            EVM address of the smart contract (42 characters, including &#39;0x&#39;, in lowercase)

            +
          • contractName: string

            Case-sensitive name of the specific contract within the project

            +
          • eventName: string

            Case-sensitive name of the event to filter for in the contract&#39;s logs

            +
          • fromBlockHeight: number

            Lower bound of the block range to query (inclusive)

            +
          • toBlockHeight: number

            Upper bound of the block range to query (inclusive)

            +
          • Optional nextPage: string

            Pagination token for retrieving the next set of results

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns Promise<((axios?, basePath?) => AxiosPromise<ContractEventList>)>

          Summary

          List contract events

          +

          Throws

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.ContractInvocationsApiAxiosParamCreator.html b/docs/functions/client_api.ContractInvocationsApiAxiosParamCreator.html new file mode 100644 index 00000000..7aa67e4c --- /dev/null +++ b/docs/functions/client_api.ContractInvocationsApiAxiosParamCreator.html @@ -0,0 +1,26 @@ +ContractInvocationsApiAxiosParamCreator | @coinbase/coinbase-sdk

    Function ContractInvocationsApiAxiosParamCreator

    • ContractInvocationsApi - axios parameter creator

      +

      Parameters

      Returns {
          broadcastContractInvocation: ((walletId, addressId, contractInvocationId, broadcastContractInvocationRequest, options?) => Promise<RequestArgs>);
          createContractInvocation: ((walletId, addressId, createContractInvocationRequest, options?) => Promise<RequestArgs>);
          getContractInvocation: ((walletId, addressId, contractInvocationId, options?) => Promise<RequestArgs>);
          listContractInvocations: ((walletId, addressId, limit?, page?, options?) => Promise<RequestArgs>);
      }

      • broadcastContractInvocation: ((walletId, addressId, contractInvocationId, broadcastContractInvocationRequest, options?) => Promise<RequestArgs>)

        Broadcast a contract invocation.

        +

        Summary

        Broadcast a contract invocation.

        +

        Throws

          • (walletId, addressId, contractInvocationId, broadcastContractInvocationRequest, options?): Promise<RequestArgs>
          • Parameters

            • walletId: string

              The ID of the wallet the address belongs to.

              +
            • addressId: string

              The ID of the address the contract invocation belongs to.

              +
            • contractInvocationId: string

              The ID of the contract invocation to broadcast.

              +
            • broadcastContractInvocationRequest: BroadcastContractInvocationRequest
            • Optional options: RawAxiosRequestConfig = {}

              Override http request option.

              +

            Returns Promise<RequestArgs>

      • createContractInvocation: ((walletId, addressId, createContractInvocationRequest, options?) => Promise<RequestArgs>)

        Create a new contract invocation.

        +

        Summary

        Create a new contract invocation for an address.

        +

        Throws

          • (walletId, addressId, createContractInvocationRequest, options?): Promise<RequestArgs>
          • Parameters

            • walletId: string

              The ID of the wallet the source address belongs to.

              +
            • addressId: string

              The ID of the address to invoke the contract from.

              +
            • createContractInvocationRequest: CreateContractInvocationRequest
            • Optional options: RawAxiosRequestConfig = {}

              Override http request option.

              +

            Returns Promise<RequestArgs>

      • getContractInvocation: ((walletId, addressId, contractInvocationId, options?) => Promise<RequestArgs>)

        Get a contract invocation by ID.

        +

        Summary

        Get a contract invocation by ID.

        +

        Throws

          • (walletId, addressId, contractInvocationId, options?): Promise<RequestArgs>
          • Parameters

            • walletId: string

              The ID of the wallet the address belongs to.

              +
            • addressId: string

              The ID of the address the contract invocation belongs to.

              +
            • contractInvocationId: string

              The ID of the contract invocation to fetch.

              +
            • Optional options: RawAxiosRequestConfig = {}

              Override http request option.

              +

            Returns Promise<RequestArgs>

      • listContractInvocations: ((walletId, addressId, limit?, page?, options?) => Promise<RequestArgs>)

        List contract invocations for an address.

        +

        Summary

        List contract invocations for an address.

        +

        Throws

          • (walletId, addressId, limit?, page?, options?): Promise<RequestArgs>
          • Parameters

            • walletId: string

              The ID of the wallet the address belongs to.

              +
            • addressId: string

              The ID of the address to list contract invocations for.

              +
            • Optional limit: number

              A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

              +
            • Optional page: string

              A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

              +
            • Optional options: RawAxiosRequestConfig = {}

              Override http request option.

              +

            Returns Promise<RequestArgs>

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.ContractInvocationsApiFactory.html b/docs/functions/client_api.ContractInvocationsApiFactory.html new file mode 100644 index 00000000..064390d4 --- /dev/null +++ b/docs/functions/client_api.ContractInvocationsApiFactory.html @@ -0,0 +1,26 @@ +ContractInvocationsApiFactory | @coinbase/coinbase-sdk
    • ContractInvocationsApi - factory interface

      +

      Parameters

      • Optional configuration: Configuration
      • Optional basePath: string
      • Optional axios: AxiosInstance

      Returns {
          broadcastContractInvocation(walletId, addressId, contractInvocationId, broadcastContractInvocationRequest, options?): AxiosPromise<ContractInvocation>;
          createContractInvocation(walletId, addressId, createContractInvocationRequest, options?): AxiosPromise<ContractInvocation>;
          getContractInvocation(walletId, addressId, contractInvocationId, options?): AxiosPromise<ContractInvocation>;
          listContractInvocations(walletId, addressId, limit?, page?, options?): AxiosPromise<ContractInvocationList>;
      }

      • broadcastContractInvocation:function
        • Broadcast a contract invocation.

          +

          Parameters

          • walletId: string

            The ID of the wallet the address belongs to.

            +
          • addressId: string

            The ID of the address the contract invocation belongs to.

            +
          • contractInvocationId: string

            The ID of the contract invocation to broadcast.

            +
          • broadcastContractInvocationRequest: BroadcastContractInvocationRequest
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns AxiosPromise<ContractInvocation>

          Summary

          Broadcast a contract invocation.

          +

          Throws

      • createContractInvocation:function
        • Create a new contract invocation.

          +

          Parameters

          • walletId: string

            The ID of the wallet the source address belongs to.

            +
          • addressId: string

            The ID of the address to invoke the contract from.

            +
          • createContractInvocationRequest: CreateContractInvocationRequest
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns AxiosPromise<ContractInvocation>

          Summary

          Create a new contract invocation for an address.

          +

          Throws

      • getContractInvocation:function
        • Get a contract invocation by ID.

          +

          Parameters

          • walletId: string

            The ID of the wallet the address belongs to.

            +
          • addressId: string

            The ID of the address the contract invocation belongs to.

            +
          • contractInvocationId: string

            The ID of the contract invocation to fetch.

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns AxiosPromise<ContractInvocation>

          Summary

          Get a contract invocation by ID.

          +

          Throws

      • listContractInvocations:function
        • List contract invocations for an address.

          +

          Parameters

          • walletId: string

            The ID of the wallet the address belongs to.

            +
          • addressId: string

            The ID of the address to list contract invocations for.

            +
          • Optional limit: number

            A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

            +
          • Optional page: string

            A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns AxiosPromise<ContractInvocationList>

          Summary

          List contract invocations for an address.

          +

          Throws

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.ContractInvocationsApiFp.html b/docs/functions/client_api.ContractInvocationsApiFp.html new file mode 100644 index 00000000..606d5dc7 --- /dev/null +++ b/docs/functions/client_api.ContractInvocationsApiFp.html @@ -0,0 +1,26 @@ +ContractInvocationsApiFp | @coinbase/coinbase-sdk
    • ContractInvocationsApi - functional programming interface

      +

      Parameters

      Returns {
          broadcastContractInvocation(walletId, addressId, contractInvocationId, broadcastContractInvocationRequest, options?): Promise<((axios?, basePath?) => AxiosPromise<ContractInvocation>)>;
          createContractInvocation(walletId, addressId, createContractInvocationRequest, options?): Promise<((axios?, basePath?) => AxiosPromise<ContractInvocation>)>;
          getContractInvocation(walletId, addressId, contractInvocationId, options?): Promise<((axios?, basePath?) => AxiosPromise<ContractInvocation>)>;
          listContractInvocations(walletId, addressId, limit?, page?, options?): Promise<((axios?, basePath?) => AxiosPromise<ContractInvocationList>)>;
      }

      • broadcastContractInvocation:function
        • Broadcast a contract invocation.

          +

          Parameters

          • walletId: string

            The ID of the wallet the address belongs to.

            +
          • addressId: string

            The ID of the address the contract invocation belongs to.

            +
          • contractInvocationId: string

            The ID of the contract invocation to broadcast.

            +
          • broadcastContractInvocationRequest: BroadcastContractInvocationRequest
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns Promise<((axios?, basePath?) => AxiosPromise<ContractInvocation>)>

          Summary

          Broadcast a contract invocation.

          +

          Throws

      • createContractInvocation:function
        • Create a new contract invocation.

          +

          Parameters

          • walletId: string

            The ID of the wallet the source address belongs to.

            +
          • addressId: string

            The ID of the address to invoke the contract from.

            +
          • createContractInvocationRequest: CreateContractInvocationRequest
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns Promise<((axios?, basePath?) => AxiosPromise<ContractInvocation>)>

          Summary

          Create a new contract invocation for an address.

          +

          Throws

      • getContractInvocation:function
        • Get a contract invocation by ID.

          +

          Parameters

          • walletId: string

            The ID of the wallet the address belongs to.

            +
          • addressId: string

            The ID of the address the contract invocation belongs to.

            +
          • contractInvocationId: string

            The ID of the contract invocation to fetch.

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns Promise<((axios?, basePath?) => AxiosPromise<ContractInvocation>)>

          Summary

          Get a contract invocation by ID.

          +

          Throws

      • listContractInvocations:function
        • List contract invocations for an address.

          +

          Parameters

          • walletId: string

            The ID of the wallet the address belongs to.

            +
          • addressId: string

            The ID of the address to list contract invocations for.

            +
          • Optional limit: number

            A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

            +
          • Optional page: string

            A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns Promise<((axios?, basePath?) => AxiosPromise<ContractInvocationList>)>

          Summary

          List contract invocations for an address.

          +

          Throws

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.ExternalAddressesApiAxiosParamCreator.html b/docs/functions/client_api.ExternalAddressesApiAxiosParamCreator.html index 6c28a463..74098f8b 100644 --- a/docs/functions/client_api.ExternalAddressesApiAxiosParamCreator.html +++ b/docs/functions/client_api.ExternalAddressesApiAxiosParamCreator.html @@ -1,19 +1,49 @@ -ExternalAddressesApiAxiosParamCreator | @coinbase/coinbase-sdk

    Function ExternalAddressesApiAxiosParamCreator

    • ExternalAddressesApi - axios parameter creator

      -

      Parameters

      Returns {
          getExternalAddressBalance: ((networkId, addressId, assetId, options?) => Promise<RequestArgs>);
          listExternalAddressBalances: ((networkId, addressId, page?, options?) => Promise<RequestArgs>);
          requestExternalFaucetFunds: ((networkId, addressId, options?) => Promise<RequestArgs>);
      }

      • getExternalAddressBalance: ((networkId, addressId, assetId, options?) => Promise<RequestArgs>)

        Get the balance of an asset in an external address

        +ExternalAddressesApiAxiosParamCreator | @coinbase/coinbase-sdk

        Function ExternalAddressesApiAxiosParamCreator

        • ExternalAddressesApi - axios parameter creator

          +

          Parameters

          Returns {
              broadcastExternalTransaction: ((networkId, addressId, broadcastExternalTransactionRequest, options?) => Promise<RequestArgs>);
              broadcastExternalTransfer: ((networkId, addressId, transferId, broadcastExternalTransferRequest, options?) => Promise<RequestArgs>);
              createExternalTransfer: ((networkId, addressId, createExternalTransferRequest, options?) => Promise<RequestArgs>);
              getExternalAddressBalance: ((networkId, addressId, assetId, options?) => Promise<RequestArgs>);
              getExternalTransfer: ((networkId, addressId, transferId, options?) => Promise<RequestArgs>);
              getFaucetTransaction: ((networkId, addressId, txHash, options?) => Promise<RequestArgs>);
              listExternalAddressBalances: ((networkId, addressId, page?, options?) => Promise<RequestArgs>);
              requestExternalFaucetFunds: ((networkId, addressId, assetId?, skipWait?, options?) => Promise<RequestArgs>);
          }

          • broadcastExternalTransaction: ((networkId, addressId, broadcastExternalTransactionRequest, options?) => Promise<RequestArgs>)

            Broadcast an arbitrary transaction to the node constructed and signed by an external address.

            +

            Summary

            Broadcast an arbitrary transaction.

            +

            Throws

              • (networkId, addressId, broadcastExternalTransactionRequest, options?): Promise<RequestArgs>
              • Parameters

                • networkId: string

                  The ID of the network the external address belongs to.

                  +
                • addressId: string

                  The onchain address of the transaction sender.

                  +
                • broadcastExternalTransactionRequest: BroadcastExternalTransactionRequest
                • Optional options: RawAxiosRequestConfig = {}

                  Override http request option.

                  +

                Returns Promise<RequestArgs>

          • broadcastExternalTransfer: ((networkId, addressId, transferId, broadcastExternalTransferRequest, options?) => Promise<RequestArgs>)

            Broadcast an external address's transfer with a signed payload

            +

            Summary

            Broadcast an external address' transfer

            +

            Throws

              • (networkId, addressId, transferId, broadcastExternalTransferRequest, options?): Promise<RequestArgs>
              • Parameters

                • networkId: string

                  The ID of the network the address belongs to

                  +
                • addressId: string

                  The ID of the address the transfer belongs to

                  +
                • transferId: string

                  The ID of the transfer to broadcast

                  +
                • broadcastExternalTransferRequest: BroadcastExternalTransferRequest
                • Optional options: RawAxiosRequestConfig = {}

                  Override http request option.

                  +

                Returns Promise<RequestArgs>

          • createExternalTransfer: ((networkId, addressId, createExternalTransferRequest, options?) => Promise<RequestArgs>)

            Create a new transfer between addresses.

            +

            Summary

            Create a new transfer

            +

            Throws

              • (networkId, addressId, createExternalTransferRequest, options?): Promise<RequestArgs>
              • Parameters

                • networkId: string

                  The ID of the network the address is on

                  +
                • addressId: string

                  The ID of the address to transfer from

                  +
                • createExternalTransferRequest: CreateExternalTransferRequest
                • Optional options: RawAxiosRequestConfig = {}

                  Override http request option.

                  +

                Returns Promise<RequestArgs>

          • getExternalAddressBalance: ((networkId, addressId, assetId, options?) => Promise<RequestArgs>)

            Get the balance of an asset in an external address

            Summary

            Get the balance of an asset in an external address

            -

            Throws

              • (networkId, addressId, assetId, options?): Promise<RequestArgs>
              • Parameters

                • networkId: string

                  The ID of the blockchain network

                  +

                  Throws

                    • (networkId, addressId, assetId, options?): Promise<RequestArgs>
                    • Parameters

                      • networkId: string

                        The ID of the blockchain network

                      • addressId: string

                        The ID of the address to fetch the balance for

                      • assetId: string

                        The ID of the asset to fetch the balance for

                      • Optional options: RawAxiosRequestConfig = {}

                        Override http request option.

                        +

                      Returns Promise<RequestArgs>

                • getExternalTransfer: ((networkId, addressId, transferId, options?) => Promise<RequestArgs>)

                  Get an external address' transfer by ID

                  +

                  Summary

                  Get a external address' transfer

                  +

                  Throws

                    • (networkId, addressId, transferId, options?): Promise<RequestArgs>
                    • Parameters

                      • networkId: string

                        The ID of the network the address is on

                        +
                      • addressId: string

                        The ID of the address the transfer belongs to

                        +
                      • transferId: string

                        The ID of the transfer to fetch

                        +
                      • Optional options: RawAxiosRequestConfig = {}

                        Override http request option.

                        +

                      Returns Promise<RequestArgs>

                • getFaucetTransaction: ((networkId, addressId, txHash, options?) => Promise<RequestArgs>)

                  Get the status of a faucet transaction

                  +

                  Summary

                  Get the status of a faucet transaction

                  +

                  Throws

                    • (networkId, addressId, txHash, options?): Promise<RequestArgs>
                    • Parameters

                      • networkId: string

                        The ID of the blockchain network

                        +
                      • addressId: string

                        The ID of the address to fetch the faucet transaction for

                        +
                      • txHash: string

                        The hash of the faucet transaction

                        +
                      • Optional options: RawAxiosRequestConfig = {}

                        Override http request option.

                      Returns Promise<RequestArgs>

                • listExternalAddressBalances: ((networkId, addressId, page?, options?) => Promise<RequestArgs>)

                  List all of the balances of an external address

                  Summary

                  Get the balances of an external address

                  -

                  Throws

                    • (networkId, addressId, page?, options?): Promise<RequestArgs>
                    • Parameters

                      • networkId: string

                        The ID of the blockchain network

                        +

                        Throws

                          • (networkId, addressId, page?, options?): Promise<RequestArgs>
                          • Parameters

                            • networkId: string

                              The ID of the blockchain network

                            • addressId: string

                              The ID of the address to fetch the balance for

                            • Optional page: string

                              A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

                            • Optional options: RawAxiosRequestConfig = {}

                              Override http request option.

                              -

                            Returns Promise<RequestArgs>

                      • requestExternalFaucetFunds: ((networkId, addressId, options?) => Promise<RequestArgs>)

                        Request faucet funds to be sent to external address.

                        +

                      Returns Promise<RequestArgs>

                • requestExternalFaucetFunds: ((networkId, addressId, assetId?, skipWait?, options?) => Promise<RequestArgs>)

                  Request faucet funds to be sent to external address.

                  Summary

                  Request faucet funds for external address.

                  -

                  Throws

                    • (networkId, addressId, options?): Promise<RequestArgs>
                    • Parameters

                      • networkId: string

                        The ID of the wallet the address belongs to.

                        +

                        Throws

                          • (networkId, addressId, assetId?, skipWait?, options?): Promise<RequestArgs>
                          • Parameters

                            • networkId: string

                              The ID of the wallet the address belongs to.

                            • addressId: string

                              The onchain address of the address that is being fetched.

                              +
                            • Optional assetId: string

                              The ID of the asset to transfer from the faucet.

                              +
                            • Optional skipWait: boolean

                              Whether to skip waiting for the transaction to be mined. This will become the default behavior in the future.

                            • Optional options: RawAxiosRequestConfig = {}

                              Override http request option.

                              -

                            Returns Promise<RequestArgs>

                      Export

        \ No newline at end of file +

    Returns Promise<RequestArgs>

    Export

    \ No newline at end of file diff --git a/docs/functions/client_api.ExternalAddressesApiFactory.html b/docs/functions/client_api.ExternalAddressesApiFactory.html index 9c1afa16..2375f933 100644 --- a/docs/functions/client_api.ExternalAddressesApiFactory.html +++ b/docs/functions/client_api.ExternalAddressesApiFactory.html @@ -1,19 +1,49 @@ -ExternalAddressesApiFactory | @coinbase/coinbase-sdk
    • ExternalAddressesApi - factory interface

      -

      Parameters

      • Optional configuration: Configuration
      • Optional basePath: string
      • Optional axios: AxiosInstance

      Returns {
          getExternalAddressBalance(networkId, addressId, assetId, options?): AxiosPromise<Balance>;
          listExternalAddressBalances(networkId, addressId, page?, options?): AxiosPromise<AddressBalanceList>;
          requestExternalFaucetFunds(networkId, addressId, options?): AxiosPromise<FaucetTransaction>;
      }

      • getExternalAddressBalance:function
        • Get the balance of an asset in an external address

          +ExternalAddressesApiFactory | @coinbase/coinbase-sdk
          • ExternalAddressesApi - factory interface

            +

            Parameters

            • Optional configuration: Configuration
            • Optional basePath: string
            • Optional axios: AxiosInstance

            Returns {
                broadcastExternalTransaction(networkId, addressId, broadcastExternalTransactionRequest, options?): AxiosPromise<BroadcastExternalTransaction200Response>;
                broadcastExternalTransfer(networkId, addressId, transferId, broadcastExternalTransferRequest, options?): AxiosPromise<Transfer>;
                createExternalTransfer(networkId, addressId, createExternalTransferRequest, options?): AxiosPromise<Transfer>;
                getExternalAddressBalance(networkId, addressId, assetId, options?): AxiosPromise<Balance>;
                getExternalTransfer(networkId, addressId, transferId, options?): AxiosPromise<Transfer>;
                getFaucetTransaction(networkId, addressId, txHash, options?): AxiosPromise<FaucetTransaction>;
                listExternalAddressBalances(networkId, addressId, page?, options?): AxiosPromise<AddressBalanceList>;
                requestExternalFaucetFunds(networkId, addressId, assetId?, skipWait?, options?): AxiosPromise<FaucetTransaction>;
            }

            • broadcastExternalTransaction:function
              • Broadcast an arbitrary transaction to the node constructed and signed by an external address.

                +

                Parameters

                • networkId: string

                  The ID of the network the external address belongs to.

                  +
                • addressId: string

                  The onchain address of the transaction sender.

                  +
                • broadcastExternalTransactionRequest: BroadcastExternalTransactionRequest
                • Optional options: RawAxiosRequestConfig

                  Override http request option.

                  +

                Returns AxiosPromise<BroadcastExternalTransaction200Response>

                Summary

                Broadcast an arbitrary transaction.

                +

                Throws

            • broadcastExternalTransfer:function
              • Broadcast an external address's transfer with a signed payload

                +

                Parameters

                • networkId: string

                  The ID of the network the address belongs to

                  +
                • addressId: string

                  The ID of the address the transfer belongs to

                  +
                • transferId: string

                  The ID of the transfer to broadcast

                  +
                • broadcastExternalTransferRequest: BroadcastExternalTransferRequest
                • Optional options: RawAxiosRequestConfig

                  Override http request option.

                  +

                Returns AxiosPromise<Transfer>

                Summary

                Broadcast an external address' transfer

                +

                Throws

            • createExternalTransfer:function
              • Create a new transfer between addresses.

                +

                Parameters

                • networkId: string

                  The ID of the network the address is on

                  +
                • addressId: string

                  The ID of the address to transfer from

                  +
                • createExternalTransferRequest: CreateExternalTransferRequest
                • Optional options: RawAxiosRequestConfig

                  Override http request option.

                  +

                Returns AxiosPromise<Transfer>

                Summary

                Create a new transfer

                +

                Throws

            • getExternalAddressBalance:function
              • Get the balance of an asset in an external address

                Parameters

                • networkId: string

                  The ID of the blockchain network

                • addressId: string

                  The ID of the address to fetch the balance for

                • assetId: string

                  The ID of the asset to fetch the balance for

                  -
                • Optional options: any

                  Override http request option.

                  +
                • Optional options: RawAxiosRequestConfig

                  Override http request option.

                Returns AxiosPromise<Balance>

                Summary

                Get the balance of an asset in an external address

                -

                Throws

            • listExternalAddressBalances:function
            • getExternalTransfer:function
              • Get an external address' transfer by ID

                +

                Parameters

                • networkId: string

                  The ID of the network the address is on

                  +
                • addressId: string

                  The ID of the address the transfer belongs to

                  +
                • transferId: string

                  The ID of the transfer to fetch

                  +
                • Optional options: RawAxiosRequestConfig

                  Override http request option.

                  +

                Returns AxiosPromise<Transfer>

                Summary

                Get a external address' transfer

                +

                Throws

            • getFaucetTransaction:function
              • Get the status of a faucet transaction

                +

                Parameters

                • networkId: string

                  The ID of the blockchain network

                  +
                • addressId: string

                  The ID of the address to fetch the faucet transaction for

                  +
                • txHash: string

                  The hash of the faucet transaction

                  +
                • Optional options: RawAxiosRequestConfig

                  Override http request option.

                  +

                Returns AxiosPromise<FaucetTransaction>

                Summary

                Get the status of a faucet transaction

                +

                Throws

            • listExternalAddressBalances:function
              • List all of the balances of an external address

                Parameters

                • networkId: string

                  The ID of the blockchain network

                • addressId: string

                  The ID of the address to fetch the balance for

                • Optional page: string

                  A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

                  -
                • Optional options: any

                  Override http request option.

                  +
                • Optional options: RawAxiosRequestConfig

                  Override http request option.

                Returns AxiosPromise<AddressBalanceList>

                Summary

                Get the balances of an external address

                -

                Throws

            • requestExternalFaucetFunds:function
            • requestExternalFaucetFunds:function
              • Request faucet funds to be sent to external address.

                Parameters

                • networkId: string

                  The ID of the wallet the address belongs to.

                • addressId: string

                  The onchain address of the address that is being fetched.

                  -
                • Optional options: any

                  Override http request option.

                  +
                • Optional assetId: string

                  The ID of the asset to transfer from the faucet.

                  +
                • Optional skipWait: boolean

                  Whether to skip waiting for the transaction to be mined. This will become the default behavior in the future.

                  +
                • Optional options: RawAxiosRequestConfig

                  Override http request option.

                Returns AxiosPromise<FaucetTransaction>

                Summary

                Request faucet funds for external address.

                -

                Throws

            Export

          \ No newline at end of file +

          Throws

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.ExternalAddressesApiFp.html b/docs/functions/client_api.ExternalAddressesApiFp.html index 407f8085..c88f3dc2 100644 --- a/docs/functions/client_api.ExternalAddressesApiFp.html +++ b/docs/functions/client_api.ExternalAddressesApiFp.html @@ -1,19 +1,49 @@ -ExternalAddressesApiFp | @coinbase/coinbase-sdk
    • ExternalAddressesApi - functional programming interface

      -

      Parameters

      Returns {
          getExternalAddressBalance(networkId, addressId, assetId, options?): Promise<((axios?, basePath?) => AxiosPromise<Balance>)>;
          listExternalAddressBalances(networkId, addressId, page?, options?): Promise<((axios?, basePath?) => AxiosPromise<AddressBalanceList>)>;
          requestExternalFaucetFunds(networkId, addressId, options?): Promise<((axios?, basePath?) => AxiosPromise<FaucetTransaction>)>;
      }

      • getExternalAddressBalance:function
        • Get the balance of an asset in an external address

          +ExternalAddressesApiFp | @coinbase/coinbase-sdk
          • ExternalAddressesApi - functional programming interface

            +

            Parameters

            Returns {
                broadcastExternalTransaction(networkId, addressId, broadcastExternalTransactionRequest, options?): Promise<((axios?, basePath?) => AxiosPromise<BroadcastExternalTransaction200Response>)>;
                broadcastExternalTransfer(networkId, addressId, transferId, broadcastExternalTransferRequest, options?): Promise<((axios?, basePath?) => AxiosPromise<Transfer>)>;
                createExternalTransfer(networkId, addressId, createExternalTransferRequest, options?): Promise<((axios?, basePath?) => AxiosPromise<Transfer>)>;
                getExternalAddressBalance(networkId, addressId, assetId, options?): Promise<((axios?, basePath?) => AxiosPromise<Balance>)>;
                getExternalTransfer(networkId, addressId, transferId, options?): Promise<((axios?, basePath?) => AxiosPromise<Transfer>)>;
                getFaucetTransaction(networkId, addressId, txHash, options?): Promise<((axios?, basePath?) => AxiosPromise<FaucetTransaction>)>;
                listExternalAddressBalances(networkId, addressId, page?, options?): Promise<((axios?, basePath?) => AxiosPromise<AddressBalanceList>)>;
                requestExternalFaucetFunds(networkId, addressId, assetId?, skipWait?, options?): Promise<((axios?, basePath?) => AxiosPromise<FaucetTransaction>)>;
            }

            • broadcastExternalTransaction:function
              • Broadcast an arbitrary transaction to the node constructed and signed by an external address.

                +

                Parameters

                • networkId: string

                  The ID of the network the external address belongs to.

                  +
                • addressId: string

                  The onchain address of the transaction sender.

                  +
                • broadcastExternalTransactionRequest: BroadcastExternalTransactionRequest
                • Optional options: RawAxiosRequestConfig

                  Override http request option.

                  +

                Returns Promise<((axios?, basePath?) => AxiosPromise<BroadcastExternalTransaction200Response>)>

                Summary

                Broadcast an arbitrary transaction.

                +

                Throws

            • broadcastExternalTransfer:function
              • Broadcast an external address's transfer with a signed payload

                +

                Parameters

                • networkId: string

                  The ID of the network the address belongs to

                  +
                • addressId: string

                  The ID of the address the transfer belongs to

                  +
                • transferId: string

                  The ID of the transfer to broadcast

                  +
                • broadcastExternalTransferRequest: BroadcastExternalTransferRequest
                • Optional options: RawAxiosRequestConfig

                  Override http request option.

                  +

                Returns Promise<((axios?, basePath?) => AxiosPromise<Transfer>)>

                Summary

                Broadcast an external address' transfer

                +

                Throws

            • createExternalTransfer:function
              • Create a new transfer between addresses.

                +

                Parameters

                • networkId: string

                  The ID of the network the address is on

                  +
                • addressId: string

                  The ID of the address to transfer from

                  +
                • createExternalTransferRequest: CreateExternalTransferRequest
                • Optional options: RawAxiosRequestConfig

                  Override http request option.

                  +

                Returns Promise<((axios?, basePath?) => AxiosPromise<Transfer>)>

                Summary

                Create a new transfer

                +

                Throws

            • getExternalAddressBalance:function
              • Get the balance of an asset in an external address

                Parameters

                • networkId: string

                  The ID of the blockchain network

                • addressId: string

                  The ID of the address to fetch the balance for

                • assetId: string

                  The ID of the asset to fetch the balance for

                • Optional options: RawAxiosRequestConfig

                  Override http request option.

                Returns Promise<((axios?, basePath?) => AxiosPromise<Balance>)>

                Summary

                Get the balance of an asset in an external address

                -

                Throws

            • listExternalAddressBalances:function
              • List all of the balances of an external address

                +

                Throws

            • getExternalTransfer:function
              • Get an external address' transfer by ID

                +

                Parameters

                • networkId: string

                  The ID of the network the address is on

                  +
                • addressId: string

                  The ID of the address the transfer belongs to

                  +
                • transferId: string

                  The ID of the transfer to fetch

                  +
                • Optional options: RawAxiosRequestConfig

                  Override http request option.

                  +

                Returns Promise<((axios?, basePath?) => AxiosPromise<Transfer>)>

                Summary

                Get a external address' transfer

                +

                Throws

            • getFaucetTransaction:function
              • Get the status of a faucet transaction

                +

                Parameters

                • networkId: string

                  The ID of the blockchain network

                  +
                • addressId: string

                  The ID of the address to fetch the faucet transaction for

                  +
                • txHash: string

                  The hash of the faucet transaction

                  +
                • Optional options: RawAxiosRequestConfig

                  Override http request option.

                  +

                Returns Promise<((axios?, basePath?) => AxiosPromise<FaucetTransaction>)>

                Summary

                Get the status of a faucet transaction

                +

                Throws

            • listExternalAddressBalances:function
              • List all of the balances of an external address

                Parameters

                • networkId: string

                  The ID of the blockchain network

                • addressId: string

                  The ID of the address to fetch the balance for

                • Optional page: string

                  A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

                • Optional options: RawAxiosRequestConfig

                  Override http request option.

                Returns Promise<((axios?, basePath?) => AxiosPromise<AddressBalanceList>)>

                Summary

                Get the balances of an external address

                -

                Throws

            • requestExternalFaucetFunds:function
              • Request faucet funds to be sent to external address.

                +

                Throws

            • requestExternalFaucetFunds:function
              • Request faucet funds to be sent to external address.

                Parameters

                • networkId: string

                  The ID of the wallet the address belongs to.

                • addressId: string

                  The onchain address of the address that is being fetched.

                  +
                • Optional assetId: string

                  The ID of the asset to transfer from the faucet.

                  +
                • Optional skipWait: boolean

                  Whether to skip waiting for the transaction to be mined. This will become the default behavior in the future.

                • Optional options: RawAxiosRequestConfig

                  Override http request option.

                Returns Promise<((axios?, basePath?) => AxiosPromise<FaucetTransaction>)>

                Summary

                Request faucet funds for external address.

                -

                Throws

            Export

          \ No newline at end of file +

          Throws

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.FundApiAxiosParamCreator.html b/docs/functions/client_api.FundApiAxiosParamCreator.html new file mode 100644 index 00000000..8eef2c00 --- /dev/null +++ b/docs/functions/client_api.FundApiAxiosParamCreator.html @@ -0,0 +1,25 @@ +FundApiAxiosParamCreator | @coinbase/coinbase-sdk
    • FundApi - axios parameter creator

      +

      Parameters

      Returns {
          createFundOperation: ((walletId, addressId, createFundOperationRequest, options?) => Promise<RequestArgs>);
          createFundQuote: ((walletId, addressId, createFundQuoteRequest, options?) => Promise<RequestArgs>);
          getFundOperation: ((walletId, addressId, fundOperationId, options?) => Promise<RequestArgs>);
          listFundOperations: ((walletId, addressId, limit?, page?, options?) => Promise<RequestArgs>);
      }

      • createFundOperation: ((walletId, addressId, createFundOperationRequest, options?) => Promise<RequestArgs>)

        Create a new fund operation with an address.

        +

        Summary

        Create a new fund operation.

        +

        Throws

          • (walletId, addressId, createFundOperationRequest, options?): Promise<RequestArgs>
          • Parameters

            • walletId: string

              The ID of the wallet the address belongs to.

              +
            • addressId: string

              The onchain address to be funded.

              +
            • createFundOperationRequest: CreateFundOperationRequest
            • Optional options: RawAxiosRequestConfig = {}

              Override http request option.

              +

            Returns Promise<RequestArgs>

      • createFundQuote: ((walletId, addressId, createFundQuoteRequest, options?) => Promise<RequestArgs>)

        Create a new fund operation with an address.

        +

        Summary

        Create a Fund Operation quote.

        +

        Throws

          • (walletId, addressId, createFundQuoteRequest, options?): Promise<RequestArgs>
          • Parameters

            • walletId: string

              The ID of the wallet the address belongs to.

              +
            • addressId: string

              The onchain address to be funded.

              +
            • createFundQuoteRequest: CreateFundQuoteRequest
            • Optional options: RawAxiosRequestConfig = {}

              Override http request option.

              +

            Returns Promise<RequestArgs>

      • getFundOperation: ((walletId, addressId, fundOperationId, options?) => Promise<RequestArgs>)

        Get fund operation.

        +

        Summary

        Get fund operation.

        +

        Throws

          • (walletId, addressId, fundOperationId, options?): Promise<RequestArgs>
          • Parameters

            • walletId: string

              The ID of the wallet the address belongs to.

              +
            • addressId: string

              The onchain address of the address that created the fund operation.

              +
            • fundOperationId: string

              The ID of the fund operation to fetch.

              +
            • Optional options: RawAxiosRequestConfig = {}

              Override http request option.

              +

            Returns Promise<RequestArgs>

      • listFundOperations: ((walletId, addressId, limit?, page?, options?) => Promise<RequestArgs>)

        List fund operations for an address.

        +

        Summary

        List fund operations for an address.

        +

        Throws

          • (walletId, addressId, limit?, page?, options?): Promise<RequestArgs>
          • Parameters

            • walletId: string

              The ID of the wallet the address belongs to.

              +
            • addressId: string

              The onchain address of the address to list fund operations for.

              +
            • Optional limit: number

              A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

              +
            • Optional page: string

              A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

              +
            • Optional options: RawAxiosRequestConfig = {}

              Override http request option.

              +

            Returns Promise<RequestArgs>

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.FundApiFactory.html b/docs/functions/client_api.FundApiFactory.html new file mode 100644 index 00000000..b4187cb1 --- /dev/null +++ b/docs/functions/client_api.FundApiFactory.html @@ -0,0 +1,25 @@ +FundApiFactory | @coinbase/coinbase-sdk
    • FundApi - factory interface

      +

      Parameters

      • Optional configuration: Configuration
      • Optional basePath: string
      • Optional axios: AxiosInstance

      Returns {
          createFundOperation(walletId, addressId, createFundOperationRequest, options?): AxiosPromise<FundOperation>;
          createFundQuote(walletId, addressId, createFundQuoteRequest, options?): AxiosPromise<FundQuote>;
          getFundOperation(walletId, addressId, fundOperationId, options?): AxiosPromise<FundOperation>;
          listFundOperations(walletId, addressId, limit?, page?, options?): AxiosPromise<FundOperationList>;
      }

      • createFundOperation:function
        • Create a new fund operation with an address.

          +

          Parameters

          • walletId: string

            The ID of the wallet the address belongs to.

            +
          • addressId: string

            The onchain address to be funded.

            +
          • createFundOperationRequest: CreateFundOperationRequest
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns AxiosPromise<FundOperation>

          Summary

          Create a new fund operation.

          +

          Throws

      • createFundQuote:function
        • Create a new fund operation with an address.

          +

          Parameters

          • walletId: string

            The ID of the wallet the address belongs to.

            +
          • addressId: string

            The onchain address to be funded.

            +
          • createFundQuoteRequest: CreateFundQuoteRequest
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns AxiosPromise<FundQuote>

          Summary

          Create a Fund Operation quote.

          +

          Throws

      • getFundOperation:function
        • Get fund operation.

          +

          Parameters

          • walletId: string

            The ID of the wallet the address belongs to.

            +
          • addressId: string

            The onchain address of the address that created the fund operation.

            +
          • fundOperationId: string

            The ID of the fund operation to fetch.

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns AxiosPromise<FundOperation>

          Summary

          Get fund operation.

          +

          Throws

      • listFundOperations:function
        • List fund operations for an address.

          +

          Parameters

          • walletId: string

            The ID of the wallet the address belongs to.

            +
          • addressId: string

            The onchain address of the address to list fund operations for.

            +
          • Optional limit: number

            A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

            +
          • Optional page: string

            A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns AxiosPromise<FundOperationList>

          Summary

          List fund operations for an address.

          +

          Throws

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.FundApiFp.html b/docs/functions/client_api.FundApiFp.html new file mode 100644 index 00000000..9661e43f --- /dev/null +++ b/docs/functions/client_api.FundApiFp.html @@ -0,0 +1,25 @@ +FundApiFp | @coinbase/coinbase-sdk
    • FundApi - functional programming interface

      +

      Parameters

      Returns {
          createFundOperation(walletId, addressId, createFundOperationRequest, options?): Promise<((axios?, basePath?) => AxiosPromise<FundOperation>)>;
          createFundQuote(walletId, addressId, createFundQuoteRequest, options?): Promise<((axios?, basePath?) => AxiosPromise<FundQuote>)>;
          getFundOperation(walletId, addressId, fundOperationId, options?): Promise<((axios?, basePath?) => AxiosPromise<FundOperation>)>;
          listFundOperations(walletId, addressId, limit?, page?, options?): Promise<((axios?, basePath?) => AxiosPromise<FundOperationList>)>;
      }

      • createFundOperation:function
        • Create a new fund operation with an address.

          +

          Parameters

          • walletId: string

            The ID of the wallet the address belongs to.

            +
          • addressId: string

            The onchain address to be funded.

            +
          • createFundOperationRequest: CreateFundOperationRequest
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns Promise<((axios?, basePath?) => AxiosPromise<FundOperation>)>

          Summary

          Create a new fund operation.

          +

          Throws

      • createFundQuote:function
        • Create a new fund operation with an address.

          +

          Parameters

          • walletId: string

            The ID of the wallet the address belongs to.

            +
          • addressId: string

            The onchain address to be funded.

            +
          • createFundQuoteRequest: CreateFundQuoteRequest
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns Promise<((axios?, basePath?) => AxiosPromise<FundQuote>)>

          Summary

          Create a Fund Operation quote.

          +

          Throws

      • getFundOperation:function
        • Get fund operation.

          +

          Parameters

          • walletId: string

            The ID of the wallet the address belongs to.

            +
          • addressId: string

            The onchain address of the address that created the fund operation.

            +
          • fundOperationId: string

            The ID of the fund operation to fetch.

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns Promise<((axios?, basePath?) => AxiosPromise<FundOperation>)>

          Summary

          Get fund operation.

          +

          Throws

      • listFundOperations:function
        • List fund operations for an address.

          +

          Parameters

          • walletId: string

            The ID of the wallet the address belongs to.

            +
          • addressId: string

            The onchain address of the address to list fund operations for.

            +
          • Optional limit: number

            A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

            +
          • Optional page: string

            A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns Promise<((axios?, basePath?) => AxiosPromise<FundOperationList>)>

          Summary

          List fund operations for an address.

          +

          Throws

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.MPCWalletStakeApiAxiosParamCreator.html b/docs/functions/client_api.MPCWalletStakeApiAxiosParamCreator.html new file mode 100644 index 00000000..a09f9fd4 --- /dev/null +++ b/docs/functions/client_api.MPCWalletStakeApiAxiosParamCreator.html @@ -0,0 +1,19 @@ +MPCWalletStakeApiAxiosParamCreator | @coinbase/coinbase-sdk
    • MPCWalletStakeApi - axios parameter creator

      +

      Parameters

      Returns {
          broadcastStakingOperation: ((walletId, addressId, stakingOperationId, broadcastStakingOperationRequest, options?) => Promise<RequestArgs>);
          createStakingOperation: ((walletId, addressId, createStakingOperationRequest, options?) => Promise<RequestArgs>);
          getStakingOperation: ((walletId, addressId, stakingOperationId, options?) => Promise<RequestArgs>);
      }

      • broadcastStakingOperation: ((walletId, addressId, stakingOperationId, broadcastStakingOperationRequest, options?) => Promise<RequestArgs>)

        Broadcast a staking operation.

        +

        Summary

        Broadcast a staking operation

        +

        Throws

          • (walletId, addressId, stakingOperationId, broadcastStakingOperationRequest, options?): Promise<RequestArgs>
          • Parameters

            • walletId: string

              The ID of the wallet the address belongs to.

              +
            • addressId: string

              The ID of the address the staking operation belongs to.

              +
            • stakingOperationId: string

              The ID of the staking operation to broadcast.

              +
            • broadcastStakingOperationRequest: BroadcastStakingOperationRequest
            • Optional options: RawAxiosRequestConfig = {}

              Override http request option.

              +

            Returns Promise<RequestArgs>

      • createStakingOperation: ((walletId, addressId, createStakingOperationRequest, options?) => Promise<RequestArgs>)

        Create a new staking operation.

        +

        Summary

        Create a new staking operation for an address

        +

        Throws

          • (walletId, addressId, createStakingOperationRequest, options?): Promise<RequestArgs>
          • Parameters

            • walletId: string

              The ID of the wallet the address belongs to.

              +
            • addressId: string

              The ID of the address to create the staking operation for.

              +
            • createStakingOperationRequest: CreateStakingOperationRequest
            • Optional options: RawAxiosRequestConfig = {}

              Override http request option.

              +

            Returns Promise<RequestArgs>

      • getStakingOperation: ((walletId, addressId, stakingOperationId, options?) => Promise<RequestArgs>)

        Get the latest state of a staking operation.

        +

        Summary

        Get the latest state of a staking operation

        +

        Throws

          • (walletId, addressId, stakingOperationId, options?): Promise<RequestArgs>
          • Parameters

            • walletId: string

              The ID of the wallet the address belongs to

              +
            • addressId: string

              The ID of the address to fetch the staking operation for.

              +
            • stakingOperationId: string

              The ID of the staking operation.

              +
            • Optional options: RawAxiosRequestConfig = {}

              Override http request option.

              +

            Returns Promise<RequestArgs>

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.MPCWalletStakeApiFactory.html b/docs/functions/client_api.MPCWalletStakeApiFactory.html new file mode 100644 index 00000000..f6232609 --- /dev/null +++ b/docs/functions/client_api.MPCWalletStakeApiFactory.html @@ -0,0 +1,19 @@ +MPCWalletStakeApiFactory | @coinbase/coinbase-sdk
    • MPCWalletStakeApi - factory interface

      +

      Parameters

      • Optional configuration: Configuration
      • Optional basePath: string
      • Optional axios: AxiosInstance

      Returns {
          broadcastStakingOperation(walletId, addressId, stakingOperationId, broadcastStakingOperationRequest, options?): AxiosPromise<StakingOperation>;
          createStakingOperation(walletId, addressId, createStakingOperationRequest, options?): AxiosPromise<StakingOperation>;
          getStakingOperation(walletId, addressId, stakingOperationId, options?): AxiosPromise<StakingOperation>;
      }

      • broadcastStakingOperation:function
        • Broadcast a staking operation.

          +

          Parameters

          • walletId: string

            The ID of the wallet the address belongs to.

            +
          • addressId: string

            The ID of the address the staking operation belongs to.

            +
          • stakingOperationId: string

            The ID of the staking operation to broadcast.

            +
          • broadcastStakingOperationRequest: BroadcastStakingOperationRequest
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns AxiosPromise<StakingOperation>

          Summary

          Broadcast a staking operation

          +

          Throws

      • createStakingOperation:function
        • Create a new staking operation.

          +

          Parameters

          • walletId: string

            The ID of the wallet the address belongs to.

            +
          • addressId: string

            The ID of the address to create the staking operation for.

            +
          • createStakingOperationRequest: CreateStakingOperationRequest
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns AxiosPromise<StakingOperation>

          Summary

          Create a new staking operation for an address

          +

          Throws

      • getStakingOperation:function
        • Get the latest state of a staking operation.

          +

          Parameters

          • walletId: string

            The ID of the wallet the address belongs to

            +
          • addressId: string

            The ID of the address to fetch the staking operation for.

            +
          • stakingOperationId: string

            The ID of the staking operation.

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns AxiosPromise<StakingOperation>

          Summary

          Get the latest state of a staking operation

          +

          Throws

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.MPCWalletStakeApiFp.html b/docs/functions/client_api.MPCWalletStakeApiFp.html new file mode 100644 index 00000000..a302d9bc --- /dev/null +++ b/docs/functions/client_api.MPCWalletStakeApiFp.html @@ -0,0 +1,19 @@ +MPCWalletStakeApiFp | @coinbase/coinbase-sdk
    • MPCWalletStakeApi - functional programming interface

      +

      Parameters

      Returns {
          broadcastStakingOperation(walletId, addressId, stakingOperationId, broadcastStakingOperationRequest, options?): Promise<((axios?, basePath?) => AxiosPromise<StakingOperation>)>;
          createStakingOperation(walletId, addressId, createStakingOperationRequest, options?): Promise<((axios?, basePath?) => AxiosPromise<StakingOperation>)>;
          getStakingOperation(walletId, addressId, stakingOperationId, options?): Promise<((axios?, basePath?) => AxiosPromise<StakingOperation>)>;
      }

      • broadcastStakingOperation:function
        • Broadcast a staking operation.

          +

          Parameters

          • walletId: string

            The ID of the wallet the address belongs to.

            +
          • addressId: string

            The ID of the address the staking operation belongs to.

            +
          • stakingOperationId: string

            The ID of the staking operation to broadcast.

            +
          • broadcastStakingOperationRequest: BroadcastStakingOperationRequest
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns Promise<((axios?, basePath?) => AxiosPromise<StakingOperation>)>

          Summary

          Broadcast a staking operation

          +

          Throws

      • createStakingOperation:function
        • Create a new staking operation.

          +

          Parameters

          • walletId: string

            The ID of the wallet the address belongs to.

            +
          • addressId: string

            The ID of the address to create the staking operation for.

            +
          • createStakingOperationRequest: CreateStakingOperationRequest
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns Promise<((axios?, basePath?) => AxiosPromise<StakingOperation>)>

          Summary

          Create a new staking operation for an address

          +

          Throws

      • getStakingOperation:function
        • Get the latest state of a staking operation.

          +

          Parameters

          • walletId: string

            The ID of the wallet the address belongs to

            +
          • addressId: string

            The ID of the address to fetch the staking operation for.

            +
          • stakingOperationId: string

            The ID of the staking operation.

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns Promise<((axios?, basePath?) => AxiosPromise<StakingOperation>)>

          Summary

          Get the latest state of a staking operation

          +

          Throws

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.NetworksApiAxiosParamCreator.html b/docs/functions/client_api.NetworksApiAxiosParamCreator.html new file mode 100644 index 00000000..5fe6a2db --- /dev/null +++ b/docs/functions/client_api.NetworksApiAxiosParamCreator.html @@ -0,0 +1,6 @@ +NetworksApiAxiosParamCreator | @coinbase/coinbase-sdk
    • NetworksApi - axios parameter creator

      +

      Parameters

      Returns {
          getNetwork: ((networkId, options?) => Promise<RequestArgs>);
      }

      • getNetwork: ((networkId, options?) => Promise<RequestArgs>)

        Get network

        +

        Summary

        Get network by ID

        +

        Throws

          • (networkId, options?): Promise<RequestArgs>
          • Parameters

            • networkId: string

              The ID of the network to fetch.

              +
            • Optional options: RawAxiosRequestConfig = {}

              Override http request option.

              +

            Returns Promise<RequestArgs>

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.NetworksApiFactory.html b/docs/functions/client_api.NetworksApiFactory.html new file mode 100644 index 00000000..fbf97459 --- /dev/null +++ b/docs/functions/client_api.NetworksApiFactory.html @@ -0,0 +1,6 @@ +NetworksApiFactory | @coinbase/coinbase-sdk
    • NetworksApi - factory interface

      +

      Parameters

      • Optional configuration: Configuration
      • Optional basePath: string
      • Optional axios: AxiosInstance

      Returns {
          getNetwork(networkId, options?): AxiosPromise<Network>;
      }

      • getNetwork:function
        • Get network

          +

          Parameters

          • networkId: string

            The ID of the network to fetch.

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns AxiosPromise<Network>

          Summary

          Get network by ID

          +

          Throws

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.NetworksApiFp.html b/docs/functions/client_api.NetworksApiFp.html new file mode 100644 index 00000000..558578eb --- /dev/null +++ b/docs/functions/client_api.NetworksApiFp.html @@ -0,0 +1,6 @@ +NetworksApiFp | @coinbase/coinbase-sdk
    • NetworksApi - functional programming interface

      +

      Parameters

      Returns {
          getNetwork(networkId, options?): Promise<((axios?, basePath?) => AxiosPromise<Network>)>;
      }

      • getNetwork:function
        • Get network

          +

          Parameters

          • networkId: string

            The ID of the network to fetch.

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns Promise<((axios?, basePath?) => AxiosPromise<Network>)>

          Summary

          Get network by ID

          +

          Throws

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.OnchainIdentityApiAxiosParamCreator.html b/docs/functions/client_api.OnchainIdentityApiAxiosParamCreator.html new file mode 100644 index 00000000..13a0e54f --- /dev/null +++ b/docs/functions/client_api.OnchainIdentityApiAxiosParamCreator.html @@ -0,0 +1,10 @@ +OnchainIdentityApiAxiosParamCreator | @coinbase/coinbase-sdk
    • OnchainIdentityApi - axios parameter creator

      +

      Parameters

      Returns {
          resolveIdentityByAddress: ((networkId, addressId, roles?, limit?, page?, options?) => Promise<RequestArgs>);
      }

      • resolveIdentityByAddress: ((networkId, addressId, roles?, limit?, page?, options?) => Promise<RequestArgs>)

        Obtains onchain identity for an address on a specific network

        +

        Summary

        Obtains onchain identity for an address on a specific network

        +

        Throws

          • (networkId, addressId, roles?, limit?, page?, options?): Promise<RequestArgs>
          • Parameters

            • networkId: string

              The ID of the blockchain network

              +
            • addressId: string

              The ID of the address to fetch the identity for

              +
            • Optional roles: ResolveIdentityByAddressRolesEnum[]

              A filter by role of the names related to this address (managed or owned)

              +
            • Optional limit: number

              A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

              +
            • Optional page: string

              A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

              +
            • Optional options: RawAxiosRequestConfig = {}

              Override http request option.

              +

            Returns Promise<RequestArgs>

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.OnchainIdentityApiFactory.html b/docs/functions/client_api.OnchainIdentityApiFactory.html new file mode 100644 index 00000000..1ab0fd07 --- /dev/null +++ b/docs/functions/client_api.OnchainIdentityApiFactory.html @@ -0,0 +1,10 @@ +OnchainIdentityApiFactory | @coinbase/coinbase-sdk
    • OnchainIdentityApi - factory interface

      +

      Parameters

      • Optional configuration: Configuration
      • Optional basePath: string
      • Optional axios: AxiosInstance

      Returns {
          resolveIdentityByAddress(networkId, addressId, roles?, limit?, page?, options?): AxiosPromise<OnchainNameList>;
      }

      • resolveIdentityByAddress:function
        • Obtains onchain identity for an address on a specific network

          +

          Parameters

          • networkId: string

            The ID of the blockchain network

            +
          • addressId: string

            The ID of the address to fetch the identity for

            +
          • Optional roles: ResolveIdentityByAddressRolesEnum[]

            A filter by role of the names related to this address (managed or owned)

            +
          • Optional limit: number

            A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

            +
          • Optional page: string

            A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns AxiosPromise<OnchainNameList>

          Summary

          Obtains onchain identity for an address on a specific network

          +

          Throws

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.OnchainIdentityApiFp.html b/docs/functions/client_api.OnchainIdentityApiFp.html new file mode 100644 index 00000000..4725b10e --- /dev/null +++ b/docs/functions/client_api.OnchainIdentityApiFp.html @@ -0,0 +1,10 @@ +OnchainIdentityApiFp | @coinbase/coinbase-sdk
    • OnchainIdentityApi - functional programming interface

      +

      Parameters

      Returns {
          resolveIdentityByAddress(networkId, addressId, roles?, limit?, page?, options?): Promise<((axios?, basePath?) => AxiosPromise<OnchainNameList>)>;
      }

      • resolveIdentityByAddress:function
        • Obtains onchain identity for an address on a specific network

          +

          Parameters

          • networkId: string

            The ID of the blockchain network

            +
          • addressId: string

            The ID of the address to fetch the identity for

            +
          • Optional roles: ResolveIdentityByAddressRolesEnum[]

            A filter by role of the names related to this address (managed or owned)

            +
          • Optional limit: number

            A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

            +
          • Optional page: string

            A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns Promise<((axios?, basePath?) => AxiosPromise<OnchainNameList>)>

          Summary

          Obtains onchain identity for an address on a specific network

          +

          Throws

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.ReputationApiAxiosParamCreator.html b/docs/functions/client_api.ReputationApiAxiosParamCreator.html new file mode 100644 index 00000000..c72bccf4 --- /dev/null +++ b/docs/functions/client_api.ReputationApiAxiosParamCreator.html @@ -0,0 +1,7 @@ +ReputationApiAxiosParamCreator | @coinbase/coinbase-sdk
    • ReputationApi - axios parameter creator

      +

      Parameters

      Returns {
          getAddressReputation: ((networkId, addressId, options?) => Promise<RequestArgs>);
      }

      • getAddressReputation: ((networkId, addressId, options?) => Promise<RequestArgs>)

        Get the onchain reputation of an external address

        +

        Summary

        Get the onchain reputation of an external address

        +

        Throws

          • (networkId, addressId, options?): Promise<RequestArgs>
          • Parameters

            • networkId: string

              The ID of the blockchain network.

              +
            • addressId: string

              The ID of the address to fetch the reputation for.

              +
            • Optional options: RawAxiosRequestConfig = {}

              Override http request option.

              +

            Returns Promise<RequestArgs>

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.ReputationApiFactory.html b/docs/functions/client_api.ReputationApiFactory.html new file mode 100644 index 00000000..20a931ce --- /dev/null +++ b/docs/functions/client_api.ReputationApiFactory.html @@ -0,0 +1,7 @@ +ReputationApiFactory | @coinbase/coinbase-sdk
    • ReputationApi - factory interface

      +

      Parameters

      • Optional configuration: Configuration
      • Optional basePath: string
      • Optional axios: AxiosInstance

      Returns {
          getAddressReputation(networkId, addressId, options?): AxiosPromise<AddressReputation>;
      }

      • getAddressReputation:function
        • Get the onchain reputation of an external address

          +

          Parameters

          • networkId: string

            The ID of the blockchain network.

            +
          • addressId: string

            The ID of the address to fetch the reputation for.

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns AxiosPromise<AddressReputation>

          Summary

          Get the onchain reputation of an external address

          +

          Throws

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.ReputationApiFp.html b/docs/functions/client_api.ReputationApiFp.html new file mode 100644 index 00000000..3b2edfff --- /dev/null +++ b/docs/functions/client_api.ReputationApiFp.html @@ -0,0 +1,7 @@ +ReputationApiFp | @coinbase/coinbase-sdk
    • ReputationApi - functional programming interface

      +

      Parameters

      Returns {
          getAddressReputation(networkId, addressId, options?): Promise<((axios?, basePath?) => AxiosPromise<AddressReputation>)>;
      }

      • getAddressReputation:function
        • Get the onchain reputation of an external address

          +

          Parameters

          • networkId: string

            The ID of the blockchain network.

            +
          • addressId: string

            The ID of the address to fetch the reputation for.

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns Promise<((axios?, basePath?) => AxiosPromise<AddressReputation>)>

          Summary

          Get the onchain reputation of an external address

          +

          Throws

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.ServerSignersApiAxiosParamCreator.html b/docs/functions/client_api.ServerSignersApiAxiosParamCreator.html index 17cb71ef..f49a2db7 100644 --- a/docs/functions/client_api.ServerSignersApiAxiosParamCreator.html +++ b/docs/functions/client_api.ServerSignersApiAxiosParamCreator.html @@ -8,7 +8,7 @@

    Throws

    Returns Promise<RequestArgs>

  • listServerSignerEvents: ((serverSignerId, limit?, page?, options?) => Promise<RequestArgs>)

    List events for a server signer

    Summary

    List events for a server signer

    -

    Throws

  • Export

    \ No newline at end of file diff --git a/docs/functions/client_api.ServerSignersApiFactory.html b/docs/functions/client_api.ServerSignersApiFactory.html index 36eaf067..25a5065a 100644 --- a/docs/functions/client_api.ServerSignersApiFactory.html +++ b/docs/functions/client_api.ServerSignersApiFactory.html @@ -1,28 +1,28 @@ ServerSignersApiFactory | @coinbase/coinbase-sdk
    • ServerSignersApi - factory interface

      Parameters

      • Optional configuration: Configuration
      • Optional basePath: string
      • Optional axios: AxiosInstance

      Returns {
          createServerSigner(createServerSignerRequest?, options?): AxiosPromise<ServerSigner>;
          getServerSigner(serverSignerId, options?): AxiosPromise<ServerSigner>;
          listServerSignerEvents(serverSignerId, limit?, page?, options?): AxiosPromise<ServerSignerEventList>;
          listServerSigners(limit?, page?, options?): AxiosPromise<ServerSignerList>;
          submitServerSignerSeedEventResult(serverSignerId, seedCreationEventResult?, options?): AxiosPromise<SeedCreationEventResult>;
          submitServerSignerSignatureEventResult(serverSignerId, signatureCreationEventResult?, options?): AxiosPromise<SignatureCreationEventResult>;
      }

      • createServerSigner:function
        • Create a new Server-Signer

          -

          Parameters

        • getServerSigner:function
        • getServerSigner:function
          • Get a server signer by ID

            Parameters

            • serverSignerId: string

              The ID of the server signer to fetch

              -
            • Optional options: any

              Override http request option.

              +
            • Optional options: RawAxiosRequestConfig

              Override http request option.

            Returns AxiosPromise<ServerSigner>

            Summary

            Get a server signer by ID

            -

            Throws

        • listServerSignerEvents:function
        • listServerSignerEvents:function
          • List events for a server signer

            Parameters

            • serverSignerId: string

              The ID of the server signer to fetch events for

            • Optional limit: number

              A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

            • Optional page: string

              A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

              -
            • Optional options: any

              Override http request option.

              +
            • Optional options: RawAxiosRequestConfig

              Override http request option.

            Returns AxiosPromise<ServerSignerEventList>

            Summary

            List events for a server signer

            -

            Throws

        • listServerSigners:function
        • listServerSigners:function
          • List server signers for the current project

            Parameters

            • Optional limit: number

              A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

            • Optional page: string

              A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

              -
            • Optional options: any

              Override http request option.

              +
            • Optional options: RawAxiosRequestConfig

              Override http request option.

            Returns AxiosPromise<ServerSignerList>

            Summary

            List server signers for the current project

            -

            Throws

        • submitServerSignerSeedEventResult:function
        • submitServerSignerSeedEventResult:function
          • Submit the result of a server signer event

            Parameters

            • serverSignerId: string

              The ID of the server signer to submit the event result for

              -
            • Optional seedCreationEventResult: SeedCreationEventResult
            • Optional options: any

              Override http request option.

              +
            • Optional seedCreationEventResult: SeedCreationEventResult
            • Optional options: RawAxiosRequestConfig

              Override http request option.

            Returns AxiosPromise<SeedCreationEventResult>

            Summary

            Submit the result of a server signer event

            -

            Throws

        • submitServerSignerSignatureEventResult:function
        • submitServerSignerSignatureEventResult:function

        Export

    \ No newline at end of file +

    Throws

    Export

    \ No newline at end of file diff --git a/docs/functions/client_api.ServerSignersApiFp.html b/docs/functions/client_api.ServerSignersApiFp.html index d59062a6..61e3a42d 100644 --- a/docs/functions/client_api.ServerSignersApiFp.html +++ b/docs/functions/client_api.ServerSignersApiFp.html @@ -2,27 +2,27 @@

    Parameters

    Returns {
        createServerSigner(createServerSignerRequest?, options?): Promise<((axios?, basePath?) => AxiosPromise<ServerSigner>)>;
        getServerSigner(serverSignerId, options?): Promise<((axios?, basePath?) => AxiosPromise<ServerSigner>)>;
        listServerSignerEvents(serverSignerId, limit?, page?, options?): Promise<((axios?, basePath?) => AxiosPromise<ServerSignerEventList>)>;
        listServerSigners(limit?, page?, options?): Promise<((axios?, basePath?) => AxiosPromise<ServerSignerList>)>;
        submitServerSignerSeedEventResult(serverSignerId, seedCreationEventResult?, options?): Promise<((axios?, basePath?) => AxiosPromise<SeedCreationEventResult>)>;
        submitServerSignerSignatureEventResult(serverSignerId, signatureCreationEventResult?, options?): Promise<((axios?, basePath?) => AxiosPromise<SignatureCreationEventResult>)>;
    }

    Export

    \ No newline at end of file +

    Throws

    Export

    \ No newline at end of file diff --git a/docs/functions/client_api.SmartContractsApiAxiosParamCreator.html b/docs/functions/client_api.SmartContractsApiAxiosParamCreator.html new file mode 100644 index 00000000..de12f37f --- /dev/null +++ b/docs/functions/client_api.SmartContractsApiAxiosParamCreator.html @@ -0,0 +1,39 @@ +SmartContractsApiAxiosParamCreator | @coinbase/coinbase-sdk
    • SmartContractsApi - axios parameter creator

      +

      Parameters

      Returns {
          compileSmartContract: ((compileSmartContractRequest, options?) => Promise<RequestArgs>);
          createSmartContract: ((walletId, addressId, createSmartContractRequest, options?) => Promise<RequestArgs>);
          deploySmartContract: ((walletId, addressId, smartContractId, deploySmartContractRequest, options?) => Promise<RequestArgs>);
          getSmartContract: ((walletId, addressId, smartContractId, options?) => Promise<RequestArgs>);
          listSmartContracts: ((page?, options?) => Promise<RequestArgs>);
          readContract: ((networkId, contractAddress, readContractRequest, options?) => Promise<RequestArgs>);
          registerSmartContract: ((networkId, contractAddress, registerSmartContractRequest?, options?) => Promise<RequestArgs>);
          updateSmartContract: ((networkId, contractAddress, updateSmartContractRequest?, options?) => Promise<RequestArgs>);
      }

      • compileSmartContract: ((compileSmartContractRequest, options?) => Promise<RequestArgs>)

        Compile a smart contract

        +

        Summary

        Compile a smart contract

        +

        Throws

      • createSmartContract: ((walletId, addressId, createSmartContractRequest, options?) => Promise<RequestArgs>)

        Create a new smart contract

        +

        Summary

        Create a new smart contract

        +

        Throws

          • (walletId, addressId, createSmartContractRequest, options?): Promise<RequestArgs>
          • Parameters

            • walletId: string

              The ID of the wallet the address belongs to.

              +
            • addressId: string

              The ID of the address to deploy the smart contract from.

              +
            • createSmartContractRequest: CreateSmartContractRequest
            • Optional options: RawAxiosRequestConfig = {}

              Override http request option.

              +

            Returns Promise<RequestArgs>

      • deploySmartContract: ((walletId, addressId, smartContractId, deploySmartContractRequest, options?) => Promise<RequestArgs>)

        Deploys a smart contract, by broadcasting the transaction to the network.

        +

        Summary

        Deploy a smart contract

        +

        Throws

          • (walletId, addressId, smartContractId, deploySmartContractRequest, options?): Promise<RequestArgs>
          • Parameters

            • walletId: string

              The ID of the wallet the address belongs to.

              +
            • addressId: string

              The ID of the address to broadcast the transaction from.

              +
            • smartContractId: string

              The UUID of the smart contract to broadcast the transaction to.

              +
            • deploySmartContractRequest: DeploySmartContractRequest
            • Optional options: RawAxiosRequestConfig = {}

              Override http request option.

              +

            Returns Promise<RequestArgs>

      • getSmartContract: ((walletId, addressId, smartContractId, options?) => Promise<RequestArgs>)

        Get a specific smart contract deployed by address.

        +

        Summary

        Get a specific smart contract deployed by address

        +

        Throws

          • (walletId, addressId, smartContractId, options?): Promise<RequestArgs>
          • Parameters

            • walletId: string

              The ID of the wallet the address belongs to.

              +
            • addressId: string

              The ID of the address to fetch the smart contract for.

              +
            • smartContractId: string

              The UUID of the smart contract to fetch.

              +
            • Optional options: RawAxiosRequestConfig = {}

              Override http request option.

              +

            Returns Promise<RequestArgs>

      • listSmartContracts: ((page?, options?) => Promise<RequestArgs>)

        List smart contracts

        +

        Summary

        List smart contracts

        +

        Throws

          • (page?, options?): Promise<RequestArgs>
          • Parameters

            • Optional page: string

              Pagination token for retrieving the next set of results

              +
            • Optional options: RawAxiosRequestConfig = {}

              Override http request option.

              +

            Returns Promise<RequestArgs>

      • readContract: ((networkId, contractAddress, readContractRequest, options?) => Promise<RequestArgs>)

        Perform a read operation on a smart contract without creating a transaction

        +

        Summary

        Read data from a smart contract

        +

        Throws

          • (networkId, contractAddress, readContractRequest, options?): Promise<RequestArgs>
          • Parameters

            • networkId: string
            • contractAddress: string
            • readContractRequest: ReadContractRequest
            • Optional options: RawAxiosRequestConfig = {}

              Override http request option.

              +

            Returns Promise<RequestArgs>

      • registerSmartContract: ((networkId, contractAddress, registerSmartContractRequest?, options?) => Promise<RequestArgs>)

        Register a smart contract

        +

        Summary

        Register a smart contract

        +

        Throws

          • (networkId, contractAddress, registerSmartContractRequest?, options?): Promise<RequestArgs>
          • Parameters

            • networkId: string

              The ID of the network to fetch.

              +
            • contractAddress: string

              EVM address of the smart contract (42 characters, including &#39;0x&#39;, in lowercase)

              +
            • Optional registerSmartContractRequest: RegisterSmartContractRequest
            • Optional options: RawAxiosRequestConfig = {}

              Override http request option.

              +

            Returns Promise<RequestArgs>

      • updateSmartContract: ((networkId, contractAddress, updateSmartContractRequest?, options?) => Promise<RequestArgs>)

        Update a smart contract

        +

        Summary

        Update a smart contract

        +

        Throws

          • (networkId, contractAddress, updateSmartContractRequest?, options?): Promise<RequestArgs>
          • Parameters

            • networkId: string

              The ID of the network to fetch.

              +
            • contractAddress: string

              EVM address of the smart contract (42 characters, including &#39;0x&#39;, in lowercase)

              +
            • Optional updateSmartContractRequest: UpdateSmartContractRequest
            • Optional options: RawAxiosRequestConfig = {}

              Override http request option.

              +

            Returns Promise<RequestArgs>

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.SmartContractsApiFactory.html b/docs/functions/client_api.SmartContractsApiFactory.html new file mode 100644 index 00000000..3ed70239 --- /dev/null +++ b/docs/functions/client_api.SmartContractsApiFactory.html @@ -0,0 +1,39 @@ +SmartContractsApiFactory | @coinbase/coinbase-sdk
    • SmartContractsApi - factory interface

      +

      Parameters

      • Optional configuration: Configuration
      • Optional basePath: string
      • Optional axios: AxiosInstance

      Returns {
          compileSmartContract(compileSmartContractRequest, options?): AxiosPromise<CompiledSmartContract>;
          createSmartContract(walletId, addressId, createSmartContractRequest, options?): AxiosPromise<SmartContract>;
          deploySmartContract(walletId, addressId, smartContractId, deploySmartContractRequest, options?): AxiosPromise<SmartContract>;
          getSmartContract(walletId, addressId, smartContractId, options?): AxiosPromise<SmartContract>;
          listSmartContracts(page?, options?): AxiosPromise<SmartContractList>;
          readContract(networkId, contractAddress, readContractRequest, options?): AxiosPromise<SolidityValue>;
          registerSmartContract(networkId, contractAddress, registerSmartContractRequest?, options?): AxiosPromise<SmartContract>;
          updateSmartContract(networkId, contractAddress, updateSmartContractRequest?, options?): AxiosPromise<SmartContract>;
      }

      • compileSmartContract:function
      • createSmartContract:function
        • Create a new smart contract

          +

          Parameters

          • walletId: string

            The ID of the wallet the address belongs to.

            +
          • addressId: string

            The ID of the address to deploy the smart contract from.

            +
          • createSmartContractRequest: CreateSmartContractRequest
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns AxiosPromise<SmartContract>

          Summary

          Create a new smart contract

          +

          Throws

      • deploySmartContract:function
        • Deploys a smart contract, by broadcasting the transaction to the network.

          +

          Parameters

          • walletId: string

            The ID of the wallet the address belongs to.

            +
          • addressId: string

            The ID of the address to broadcast the transaction from.

            +
          • smartContractId: string

            The UUID of the smart contract to broadcast the transaction to.

            +
          • deploySmartContractRequest: DeploySmartContractRequest
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns AxiosPromise<SmartContract>

          Summary

          Deploy a smart contract

          +

          Throws

      • getSmartContract:function
        • Get a specific smart contract deployed by address.

          +

          Parameters

          • walletId: string

            The ID of the wallet the address belongs to.

            +
          • addressId: string

            The ID of the address to fetch the smart contract for.

            +
          • smartContractId: string

            The UUID of the smart contract to fetch.

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns AxiosPromise<SmartContract>

          Summary

          Get a specific smart contract deployed by address

          +

          Throws

      • listSmartContracts:function
        • List smart contracts

          +

          Parameters

          • Optional page: string

            Pagination token for retrieving the next set of results

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns AxiosPromise<SmartContractList>

          Summary

          List smart contracts

          +

          Throws

      • readContract:function
        • Perform a read operation on a smart contract without creating a transaction

          +

          Parameters

          • networkId: string
          • contractAddress: string
          • readContractRequest: ReadContractRequest
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns AxiosPromise<SolidityValue>

          Summary

          Read data from a smart contract

          +

          Throws

      • registerSmartContract:function
        • Register a smart contract

          +

          Parameters

          • networkId: string

            The ID of the network to fetch.

            +
          • contractAddress: string

            EVM address of the smart contract (42 characters, including &#39;0x&#39;, in lowercase)

            +
          • Optional registerSmartContractRequest: RegisterSmartContractRequest
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns AxiosPromise<SmartContract>

          Summary

          Register a smart contract

          +

          Throws

      • updateSmartContract:function
        • Update a smart contract

          +

          Parameters

          • networkId: string

            The ID of the network to fetch.

            +
          • contractAddress: string

            EVM address of the smart contract (42 characters, including &#39;0x&#39;, in lowercase)

            +
          • Optional updateSmartContractRequest: UpdateSmartContractRequest
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns AxiosPromise<SmartContract>

          Summary

          Update a smart contract

          +

          Throws

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.SmartContractsApiFp.html b/docs/functions/client_api.SmartContractsApiFp.html new file mode 100644 index 00000000..c3f86b5a --- /dev/null +++ b/docs/functions/client_api.SmartContractsApiFp.html @@ -0,0 +1,39 @@ +SmartContractsApiFp | @coinbase/coinbase-sdk
    • SmartContractsApi - functional programming interface

      +

      Parameters

      Returns {
          compileSmartContract(compileSmartContractRequest, options?): Promise<((axios?, basePath?) => AxiosPromise<CompiledSmartContract>)>;
          createSmartContract(walletId, addressId, createSmartContractRequest, options?): Promise<((axios?, basePath?) => AxiosPromise<SmartContract>)>;
          deploySmartContract(walletId, addressId, smartContractId, deploySmartContractRequest, options?): Promise<((axios?, basePath?) => AxiosPromise<SmartContract>)>;
          getSmartContract(walletId, addressId, smartContractId, options?): Promise<((axios?, basePath?) => AxiosPromise<SmartContract>)>;
          listSmartContracts(page?, options?): Promise<((axios?, basePath?) => AxiosPromise<SmartContractList>)>;
          readContract(networkId, contractAddress, readContractRequest, options?): Promise<((axios?, basePath?) => AxiosPromise<SolidityValue>)>;
          registerSmartContract(networkId, contractAddress, registerSmartContractRequest?, options?): Promise<((axios?, basePath?) => AxiosPromise<SmartContract>)>;
          updateSmartContract(networkId, contractAddress, updateSmartContractRequest?, options?): Promise<((axios?, basePath?) => AxiosPromise<SmartContract>)>;
      }

      • compileSmartContract:function
      • createSmartContract:function
        • Create a new smart contract

          +

          Parameters

          • walletId: string

            The ID of the wallet the address belongs to.

            +
          • addressId: string

            The ID of the address to deploy the smart contract from.

            +
          • createSmartContractRequest: CreateSmartContractRequest
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns Promise<((axios?, basePath?) => AxiosPromise<SmartContract>)>

          Summary

          Create a new smart contract

          +

          Throws

      • deploySmartContract:function
        • Deploys a smart contract, by broadcasting the transaction to the network.

          +

          Parameters

          • walletId: string

            The ID of the wallet the address belongs to.

            +
          • addressId: string

            The ID of the address to broadcast the transaction from.

            +
          • smartContractId: string

            The UUID of the smart contract to broadcast the transaction to.

            +
          • deploySmartContractRequest: DeploySmartContractRequest
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns Promise<((axios?, basePath?) => AxiosPromise<SmartContract>)>

          Summary

          Deploy a smart contract

          +

          Throws

      • getSmartContract:function
        • Get a specific smart contract deployed by address.

          +

          Parameters

          • walletId: string

            The ID of the wallet the address belongs to.

            +
          • addressId: string

            The ID of the address to fetch the smart contract for.

            +
          • smartContractId: string

            The UUID of the smart contract to fetch.

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns Promise<((axios?, basePath?) => AxiosPromise<SmartContract>)>

          Summary

          Get a specific smart contract deployed by address

          +

          Throws

      • listSmartContracts:function
        • List smart contracts

          +

          Parameters

          • Optional page: string

            Pagination token for retrieving the next set of results

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns Promise<((axios?, basePath?) => AxiosPromise<SmartContractList>)>

          Summary

          List smart contracts

          +

          Throws

      • readContract:function
        • Perform a read operation on a smart contract without creating a transaction

          +

          Parameters

          • networkId: string
          • contractAddress: string
          • readContractRequest: ReadContractRequest
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns Promise<((axios?, basePath?) => AxiosPromise<SolidityValue>)>

          Summary

          Read data from a smart contract

          +

          Throws

      • registerSmartContract:function
        • Register a smart contract

          +

          Parameters

          • networkId: string

            The ID of the network to fetch.

            +
          • contractAddress: string

            EVM address of the smart contract (42 characters, including &#39;0x&#39;, in lowercase)

            +
          • Optional registerSmartContractRequest: RegisterSmartContractRequest
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns Promise<((axios?, basePath?) => AxiosPromise<SmartContract>)>

          Summary

          Register a smart contract

          +

          Throws

      • updateSmartContract:function
        • Update a smart contract

          +

          Parameters

          • networkId: string

            The ID of the network to fetch.

            +
          • contractAddress: string

            EVM address of the smart contract (42 characters, including &#39;0x&#39;, in lowercase)

            +
          • Optional updateSmartContractRequest: UpdateSmartContractRequest
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns Promise<((axios?, basePath?) => AxiosPromise<SmartContract>)>

          Summary

          Update a smart contract

          +

          Throws

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.SmartWalletsApiAxiosParamCreator.html b/docs/functions/client_api.SmartWalletsApiAxiosParamCreator.html new file mode 100644 index 00000000..104e8b95 --- /dev/null +++ b/docs/functions/client_api.SmartWalletsApiAxiosParamCreator.html @@ -0,0 +1,29 @@ +SmartWalletsApiAxiosParamCreator | @coinbase/coinbase-sdk
    • SmartWalletsApi - axios parameter creator

      +

      Parameters

      Returns {
          broadcastUserOperation: ((smartWalletAddress, userOpHash, broadcastUserOperationRequest?, options?) => Promise<RequestArgs>);
          createSmartWallet: ((createSmartWalletRequest?, options?) => Promise<RequestArgs>);
          createUserOperation: ((smartWalletAddress, networkId, createUserOperationRequest?, options?) => Promise<RequestArgs>);
          getSmartWallet: ((smartWalletAddress, options?) => Promise<RequestArgs>);
          getUserOperation: ((smartWalletAddress, userOpHash, options?) => Promise<RequestArgs>);
          listSmartWallets: ((limit?, page?, options?) => Promise<RequestArgs>);
      }

      • broadcastUserOperation: ((smartWalletAddress, userOpHash, broadcastUserOperationRequest?, options?) => Promise<RequestArgs>)

        Broadcast a user operation

        +

        Summary

        Broadcast a user operation

        +

        Throws

          • (smartWalletAddress, userOpHash, broadcastUserOperationRequest?, options?): Promise<RequestArgs>
          • Parameters

            • smartWalletAddress: string

              The address of the smart wallet to broadcast the user operation from.

              +
            • userOpHash: string

              The hash of the user operation to broadcast

              +
            • Optional broadcastUserOperationRequest: BroadcastUserOperationRequest
            • Optional options: RawAxiosRequestConfig = {}

              Override http request option.

              +

            Returns Promise<RequestArgs>

      • createSmartWallet: ((createSmartWalletRequest?, options?) => Promise<RequestArgs>)

        Create a new smart wallet, not scoped to a given network.

        +

        Summary

        Create a new smart wallet

        +

        Throws

          • (createSmartWalletRequest?, options?): Promise<RequestArgs>
          • Parameters

            • Optional createSmartWalletRequest: CreateSmartWalletRequest
            • Optional options: RawAxiosRequestConfig = {}

              Override http request option.

              +

            Returns Promise<RequestArgs>

      • createUserOperation: ((smartWalletAddress, networkId, createUserOperationRequest?, options?) => Promise<RequestArgs>)

        Create a new user operation on a smart wallet.

        +

        Summary

        Create a new user operation

        +

        Throws

          • (smartWalletAddress, networkId, createUserOperationRequest?, options?): Promise<RequestArgs>
          • Parameters

            • smartWalletAddress: string

              The address of the smart wallet to create the user operation on.

              +
            • networkId: string

              The ID of the network to create the user operation on.

              +
            • Optional createUserOperationRequest: CreateUserOperationRequest
            • Optional options: RawAxiosRequestConfig = {}

              Override http request option.

              +

            Returns Promise<RequestArgs>

      • getSmartWallet: ((smartWalletAddress, options?) => Promise<RequestArgs>)

        Get smart wallet

        +

        Summary

        Get smart wallet by address

        +

        Throws

          • (smartWalletAddress, options?): Promise<RequestArgs>
          • Parameters

            • smartWalletAddress: string

              The address of that smart wallet to fetch.

              +
            • Optional options: RawAxiosRequestConfig = {}

              Override http request option.

              +

            Returns Promise<RequestArgs>

      • getUserOperation: ((smartWalletAddress, userOpHash, options?) => Promise<RequestArgs>)

        Get user operation

        +

        Summary

        Get user operation

        +

        Throws

          • (smartWalletAddress, userOpHash, options?): Promise<RequestArgs>
          • Parameters

            • smartWalletAddress: string

              The address of the smart wallet the user operation belongs to.

              +
            • userOpHash: string

              The hash of the user operation to fetch

              +
            • Optional options: RawAxiosRequestConfig = {}

              Override http request option.

              +

            Returns Promise<RequestArgs>

      • listSmartWallets: ((limit?, page?, options?) => Promise<RequestArgs>)

        List smart wallets

        +

        Summary

        List smart wallets

        +

        Throws

          • (limit?, page?, options?): Promise<RequestArgs>
          • Parameters

            • Optional limit: number

              A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

              +
            • Optional page: string

              A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

              +
            • Optional options: RawAxiosRequestConfig = {}

              Override http request option.

              +

            Returns Promise<RequestArgs>

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.SmartWalletsApiFactory.html b/docs/functions/client_api.SmartWalletsApiFactory.html new file mode 100644 index 00000000..8409a72a --- /dev/null +++ b/docs/functions/client_api.SmartWalletsApiFactory.html @@ -0,0 +1,29 @@ +SmartWalletsApiFactory | @coinbase/coinbase-sdk
    • SmartWalletsApi - factory interface

      +

      Parameters

      • Optional configuration: Configuration
      • Optional basePath: string
      • Optional axios: AxiosInstance

      Returns {
          broadcastUserOperation(smartWalletAddress, userOpHash, broadcastUserOperationRequest?, options?): AxiosPromise<UserOperation>;
          createSmartWallet(createSmartWalletRequest?, options?): AxiosPromise<SmartWallet>;
          createUserOperation(smartWalletAddress, networkId, createUserOperationRequest?, options?): AxiosPromise<UserOperation>;
          getSmartWallet(smartWalletAddress, options?): AxiosPromise<SmartWallet>;
          getUserOperation(smartWalletAddress, userOpHash, options?): AxiosPromise<UserOperation>;
          listSmartWallets(limit?, page?, options?): AxiosPromise<SmartWalletList>;
      }

      • broadcastUserOperation:function
        • Broadcast a user operation

          +

          Parameters

          • smartWalletAddress: string

            The address of the smart wallet to broadcast the user operation from.

            +
          • userOpHash: string

            The hash of the user operation to broadcast

            +
          • Optional broadcastUserOperationRequest: BroadcastUserOperationRequest
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns AxiosPromise<UserOperation>

          Summary

          Broadcast a user operation

          +

          Throws

      • createSmartWallet:function
        • Create a new smart wallet, not scoped to a given network.

          +

          Parameters

          • Optional createSmartWalletRequest: CreateSmartWalletRequest
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns AxiosPromise<SmartWallet>

          Summary

          Create a new smart wallet

          +

          Throws

      • createUserOperation:function
        • Create a new user operation on a smart wallet.

          +

          Parameters

          • smartWalletAddress: string

            The address of the smart wallet to create the user operation on.

            +
          • networkId: string

            The ID of the network to create the user operation on.

            +
          • Optional createUserOperationRequest: CreateUserOperationRequest
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns AxiosPromise<UserOperation>

          Summary

          Create a new user operation

          +

          Throws

      • getSmartWallet:function
        • Get smart wallet

          +

          Parameters

          • smartWalletAddress: string

            The address of that smart wallet to fetch.

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns AxiosPromise<SmartWallet>

          Summary

          Get smart wallet by address

          +

          Throws

      • getUserOperation:function
        • Get user operation

          +

          Parameters

          • smartWalletAddress: string

            The address of the smart wallet the user operation belongs to.

            +
          • userOpHash: string

            The hash of the user operation to fetch

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns AxiosPromise<UserOperation>

          Summary

          Get user operation

          +

          Throws

      • listSmartWallets:function
        • List smart wallets

          +

          Parameters

          • Optional limit: number

            A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

            +
          • Optional page: string

            A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns AxiosPromise<SmartWalletList>

          Summary

          List smart wallets

          +

          Throws

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.SmartWalletsApiFp.html b/docs/functions/client_api.SmartWalletsApiFp.html new file mode 100644 index 00000000..c0391883 --- /dev/null +++ b/docs/functions/client_api.SmartWalletsApiFp.html @@ -0,0 +1,29 @@ +SmartWalletsApiFp | @coinbase/coinbase-sdk
    • SmartWalletsApi - functional programming interface

      +

      Parameters

      Returns {
          broadcastUserOperation(smartWalletAddress, userOpHash, broadcastUserOperationRequest?, options?): Promise<((axios?, basePath?) => AxiosPromise<UserOperation>)>;
          createSmartWallet(createSmartWalletRequest?, options?): Promise<((axios?, basePath?) => AxiosPromise<SmartWallet>)>;
          createUserOperation(smartWalletAddress, networkId, createUserOperationRequest?, options?): Promise<((axios?, basePath?) => AxiosPromise<UserOperation>)>;
          getSmartWallet(smartWalletAddress, options?): Promise<((axios?, basePath?) => AxiosPromise<SmartWallet>)>;
          getUserOperation(smartWalletAddress, userOpHash, options?): Promise<((axios?, basePath?) => AxiosPromise<UserOperation>)>;
          listSmartWallets(limit?, page?, options?): Promise<((axios?, basePath?) => AxiosPromise<SmartWalletList>)>;
      }

      • broadcastUserOperation:function
        • Broadcast a user operation

          +

          Parameters

          • smartWalletAddress: string

            The address of the smart wallet to broadcast the user operation from.

            +
          • userOpHash: string

            The hash of the user operation to broadcast

            +
          • Optional broadcastUserOperationRequest: BroadcastUserOperationRequest
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns Promise<((axios?, basePath?) => AxiosPromise<UserOperation>)>

          Summary

          Broadcast a user operation

          +

          Throws

      • createSmartWallet:function
        • Create a new smart wallet, not scoped to a given network.

          +

          Parameters

          • Optional createSmartWalletRequest: CreateSmartWalletRequest
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns Promise<((axios?, basePath?) => AxiosPromise<SmartWallet>)>

          Summary

          Create a new smart wallet

          +

          Throws

      • createUserOperation:function
        • Create a new user operation on a smart wallet.

          +

          Parameters

          • smartWalletAddress: string

            The address of the smart wallet to create the user operation on.

            +
          • networkId: string

            The ID of the network to create the user operation on.

            +
          • Optional createUserOperationRequest: CreateUserOperationRequest
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns Promise<((axios?, basePath?) => AxiosPromise<UserOperation>)>

          Summary

          Create a new user operation

          +

          Throws

      • getSmartWallet:function
        • Get smart wallet

          +

          Parameters

          • smartWalletAddress: string

            The address of that smart wallet to fetch.

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns Promise<((axios?, basePath?) => AxiosPromise<SmartWallet>)>

          Summary

          Get smart wallet by address

          +

          Throws

      • getUserOperation:function
        • Get user operation

          +

          Parameters

          • smartWalletAddress: string

            The address of the smart wallet the user operation belongs to.

            +
          • userOpHash: string

            The hash of the user operation to fetch

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns Promise<((axios?, basePath?) => AxiosPromise<UserOperation>)>

          Summary

          Get user operation

          +

          Throws

      • listSmartWallets:function
        • List smart wallets

          +

          Parameters

          • Optional limit: number

            A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

            +
          • Optional page: string

            A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns Promise<((axios?, basePath?) => AxiosPromise<SmartWalletList>)>

          Summary

          List smart wallets

          +

          Throws

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.StakeApiAxiosParamCreator.html b/docs/functions/client_api.StakeApiAxiosParamCreator.html index ffc36bd5..3eb86ac9 100644 --- a/docs/functions/client_api.StakeApiAxiosParamCreator.html +++ b/docs/functions/client_api.StakeApiAxiosParamCreator.html @@ -1,13 +1,43 @@ -StakeApiAxiosParamCreator | @coinbase/coinbase-sdk
    • StakeApi - axios parameter creator

      -

      Parameters

      Returns {
          buildStakingOperation: ((buildStakingOperationRequest, options?) => Promise<RequestArgs>);
          fetchStakingRewards: ((fetchStakingRewardsRequest, limit?, page?, options?) => Promise<RequestArgs>);
          getStakingContext: ((getStakingContextRequest, options?) => Promise<RequestArgs>);
      }

      • buildStakingOperation: ((buildStakingOperationRequest, options?) => Promise<RequestArgs>)

        Build a new staking operation

        +StakeApiAxiosParamCreator | @coinbase/coinbase-sdk
        • StakeApi - axios parameter creator

          +

          Parameters

          Returns {
              buildStakingOperation: ((buildStakingOperationRequest, options?) => Promise<RequestArgs>);
              fetchHistoricalStakingBalances: ((networkId, assetId, addressId, startTime, endTime, limit?, page?, options?) => Promise<RequestArgs>);
              fetchStakingRewards: ((fetchStakingRewardsRequest, limit?, page?, options?) => Promise<RequestArgs>);
              getExternalStakingOperation: ((networkId, addressId, stakingOperationId, options?) => Promise<RequestArgs>);
              getStakingContext: ((getStakingContextRequest, options?) => Promise<RequestArgs>);
              getValidator: ((networkId, assetId, validatorId, options?) => Promise<RequestArgs>);
              listValidators: ((networkId, assetId, status?, limit?, page?, options?) => Promise<RequestArgs>);
          }

          • buildStakingOperation: ((buildStakingOperationRequest, options?) => Promise<RequestArgs>)

            Build a new staking operation

            Summary

            Build a new staking operation

            Throws

          • fetchHistoricalStakingBalances: ((networkId, assetId, addressId, startTime, endTime, limit?, page?, options?) => Promise<RequestArgs>)

            Fetch historical staking balances for given address.

            +

            Summary

            Fetch historical staking balances

            +

            Throws

              • (networkId, assetId, addressId, startTime, endTime, limit?, page?, options?): Promise<RequestArgs>
              • Parameters

                • networkId: string

                  The ID of the blockchain network.

                  +
                • assetId: string

                  The ID of the asset for which the historical staking balances are being fetched.

                  +
                • addressId: string

                  The onchain address for which the historical staking balances are being fetched.

                  +
                • startTime: string

                  The start time of this historical staking balance period.

                  +
                • endTime: string

                  The end time of this historical staking balance period.

                  +
                • Optional limit: number

                  A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 50.

                  +
                • Optional page: string

                  A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

                  +
                • Optional options: RawAxiosRequestConfig = {}

                  Override http request option.

                Returns Promise<RequestArgs>

          • fetchStakingRewards: ((fetchStakingRewardsRequest, limit?, page?, options?) => Promise<RequestArgs>)

            Fetch staking rewards for a list of addresses

            Summary

            Fetch staking rewards

            -

            Throws

              • (fetchStakingRewardsRequest, limit?, page?, options?): Promise<RequestArgs>
              • Parameters

                • fetchStakingRewardsRequest: FetchStakingRewardsRequest
                • Optional limit: number

                  A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 50.

                  +

                  Throws

                    • (fetchStakingRewardsRequest, limit?, page?, options?): Promise<RequestArgs>
                    • Parameters

                      • fetchStakingRewardsRequest: FetchStakingRewardsRequest
                      • Optional limit: number

                        A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 50.

                      • Optional page: string

                        A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

                      • Optional options: RawAxiosRequestConfig = {}

                        Override http request option.

                        +

                      Returns Promise<RequestArgs>

                • getExternalStakingOperation: ((networkId, addressId, stakingOperationId, options?) => Promise<RequestArgs>)

                  Get the latest state of a staking operation

                  +

                  Summary

                  Get the latest state of a staking operation

                  +

                  Throws

                    • (networkId, addressId, stakingOperationId, options?): Promise<RequestArgs>
                    • Parameters

                      • networkId: string

                        The ID of the blockchain network

                        +
                      • addressId: string

                        The ID of the address to fetch the staking operation for

                        +
                      • stakingOperationId: string

                        The ID of the staking operation

                        +
                      • Optional options: RawAxiosRequestConfig = {}

                        Override http request option.

                      Returns Promise<RequestArgs>

                • getStakingContext: ((getStakingContextRequest, options?) => Promise<RequestArgs>)

                  Get staking context for an address

                  Summary

                  Get staking context

                  -

                  Throws

                Export

        \ No newline at end of file +

        Throws

      • getValidator: ((networkId, assetId, validatorId, options?) => Promise<RequestArgs>)

        Get a validator belonging to the user for a given network, asset and id.

        +

        Summary

        Get a validator belonging to the CDP project

        +

        Throws

          • (networkId, assetId, validatorId, options?): Promise<RequestArgs>
          • Parameters

            • networkId: string

              The ID of the blockchain network.

              +
            • assetId: string

              The symbol of the asset to get the validator for.

              +
            • validatorId: string

              The unique id of the validator to fetch details for.

              +
            • Optional options: RawAxiosRequestConfig = {}

              Override http request option.

              +

            Returns Promise<RequestArgs>

      • listValidators: ((networkId, assetId, status?, limit?, page?, options?) => Promise<RequestArgs>)

        List validators belonging to the user for a given network and asset.

        +

        Summary

        List validators belonging to the CDP project

        +

        Throws

          • (networkId, assetId, status?, limit?, page?, options?): Promise<RequestArgs>
          • Parameters

            • networkId: string

              The ID of the blockchain network.

              +
            • assetId: string

              The symbol of the asset to get the validators for.

              +
            • Optional status: ValidatorStatus

              A filter to list validators based on a status.

              +
            • Optional limit: number

              A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 50.

              +
            • Optional page: string

              A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

              +
            • Optional options: RawAxiosRequestConfig = {}

              Override http request option.

              +

            Returns Promise<RequestArgs>

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.StakeApiFactory.html b/docs/functions/client_api.StakeApiFactory.html index 91b819de..0be2b710 100644 --- a/docs/functions/client_api.StakeApiFactory.html +++ b/docs/functions/client_api.StakeApiFactory.html @@ -1,13 +1,43 @@ -StakeApiFactory | @coinbase/coinbase-sdk
    • StakeApi - factory interface

      -

      Parameters

      • Optional configuration: Configuration
      • Optional basePath: string
      • Optional axios: AxiosInstance

      Returns {
          buildStakingOperation(buildStakingOperationRequest, options?): AxiosPromise<StakingOperation>;
          fetchStakingRewards(fetchStakingRewardsRequest, limit?, page?, options?): AxiosPromise<FetchStakingRewards200Response>;
          getStakingContext(getStakingContextRequest, options?): AxiosPromise<StakingContext>;
      }

      • buildStakingOperation:function
        • Build a new staking operation

          -

          Parameters

          • buildStakingOperationRequest: BuildStakingOperationRequest
          • Optional options: any

            Override http request option.

            +StakeApiFactory | @coinbase/coinbase-sdk
            • StakeApi - factory interface

              +

              Parameters

              • Optional configuration: Configuration
              • Optional basePath: string
              • Optional axios: AxiosInstance

              Returns {
                  buildStakingOperation(buildStakingOperationRequest, options?): AxiosPromise<StakingOperation>;
                  fetchHistoricalStakingBalances(networkId, assetId, addressId, startTime, endTime, limit?, page?, options?): AxiosPromise<FetchHistoricalStakingBalances200Response>;
                  fetchStakingRewards(fetchStakingRewardsRequest, limit?, page?, options?): AxiosPromise<FetchStakingRewards200Response>;
                  getExternalStakingOperation(networkId, addressId, stakingOperationId, options?): AxiosPromise<StakingOperation>;
                  getStakingContext(getStakingContextRequest, options?): AxiosPromise<StakingContext>;
                  getValidator(networkId, assetId, validatorId, options?): AxiosPromise<Validator>;
                  listValidators(networkId, assetId, status?, limit?, page?, options?): AxiosPromise<ValidatorList>;
              }

              • buildStakingOperation:function
              • fetchStakingRewards:function
              • fetchHistoricalStakingBalances:function
                • Fetch historical staking balances for given address.

                  +

                  Parameters

                  • networkId: string

                    The ID of the blockchain network.

                    +
                  • assetId: string

                    The ID of the asset for which the historical staking balances are being fetched.

                    +
                  • addressId: string

                    The onchain address for which the historical staking balances are being fetched.

                    +
                  • startTime: string

                    The start time of this historical staking balance period.

                    +
                  • endTime: string

                    The end time of this historical staking balance period.

                    +
                  • Optional limit: number

                    A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 50.

                    +
                  • Optional page: string

                    A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

                    +
                  • Optional options: RawAxiosRequestConfig

                    Override http request option.

                    +

                  Returns AxiosPromise<FetchHistoricalStakingBalances200Response>

                  Summary

                  Fetch historical staking balances

                  +

                  Throws

              • fetchStakingRewards:function
                • Fetch staking rewards for a list of addresses

                  Parameters

                  • fetchStakingRewardsRequest: FetchStakingRewardsRequest
                  • Optional limit: number

                    A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 50.

                  • Optional page: string

                    A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

                    -
                  • Optional options: any

                    Override http request option.

                    +
                  • Optional options: RawAxiosRequestConfig

                    Override http request option.

                  Returns AxiosPromise<FetchStakingRewards200Response>

                  Summary

                  Fetch staking rewards

                  -

                  Throws

              • getStakingContext:function
                • Get staking context for an address

                  -

                  Parameters

                • getExternalStakingOperation:function
                  • Get the latest state of a staking operation

                    +

                    Parameters

                    • networkId: string

                      The ID of the blockchain network

                      +
                    • addressId: string

                      The ID of the address to fetch the staking operation for

                      +
                    • stakingOperationId: string

                      The ID of the staking operation

                      +
                    • Optional options: RawAxiosRequestConfig

                      Override http request option.

                      +

                    Returns AxiosPromise<StakingOperation>

                    Summary

                    Get the latest state of a staking operation

                    +

                    Throws

                • getStakingContext:function

                Export

            \ No newline at end of file +

            Throws

        • getValidator:function
          • Get a validator belonging to the user for a given network, asset and id.

            +

            Parameters

            • networkId: string

              The ID of the blockchain network.

              +
            • assetId: string

              The symbol of the asset to get the validator for.

              +
            • validatorId: string

              The unique id of the validator to fetch details for.

              +
            • Optional options: RawAxiosRequestConfig

              Override http request option.

              +

            Returns AxiosPromise<Validator>

            Summary

            Get a validator belonging to the CDP project

            +

            Throws

        • listValidators:function
          • List validators belonging to the user for a given network and asset.

            +

            Parameters

            • networkId: string

              The ID of the blockchain network.

              +
            • assetId: string

              The symbol of the asset to get the validators for.

              +
            • Optional status: ValidatorStatus

              A filter to list validators based on a status.

              +
            • Optional limit: number

              A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 50.

              +
            • Optional page: string

              A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

              +
            • Optional options: RawAxiosRequestConfig

              Override http request option.

              +

            Returns AxiosPromise<ValidatorList>

            Summary

            List validators belonging to the CDP project

            +

            Throws

        Export

    \ No newline at end of file diff --git a/docs/functions/client_api.StakeApiFp.html b/docs/functions/client_api.StakeApiFp.html index f1d1018b..8df889f7 100644 --- a/docs/functions/client_api.StakeApiFp.html +++ b/docs/functions/client_api.StakeApiFp.html @@ -1,13 +1,43 @@ -StakeApiFp | @coinbase/coinbase-sdk
    • StakeApi - functional programming interface

      -

      Parameters

      Returns {
          buildStakingOperation(buildStakingOperationRequest, options?): Promise<((axios?, basePath?) => AxiosPromise<StakingOperation>)>;
          fetchStakingRewards(fetchStakingRewardsRequest, limit?, page?, options?): Promise<((axios?, basePath?) => AxiosPromise<FetchStakingRewards200Response>)>;
          getStakingContext(getStakingContextRequest, options?): Promise<((axios?, basePath?) => AxiosPromise<StakingContext>)>;
      }

      • buildStakingOperation:function
        • Build a new staking operation

          +StakeApiFp | @coinbase/coinbase-sdk
          • StakeApi - functional programming interface

            +

            Parameters

            Returns {
                buildStakingOperation(buildStakingOperationRequest, options?): Promise<((axios?, basePath?) => AxiosPromise<StakingOperation>)>;
                fetchHistoricalStakingBalances(networkId, assetId, addressId, startTime, endTime, limit?, page?, options?): Promise<((axios?, basePath?) => AxiosPromise<FetchHistoricalStakingBalances200Response>)>;
                fetchStakingRewards(fetchStakingRewardsRequest, limit?, page?, options?): Promise<((axios?, basePath?) => AxiosPromise<FetchStakingRewards200Response>)>;
                getExternalStakingOperation(networkId, addressId, stakingOperationId, options?): Promise<((axios?, basePath?) => AxiosPromise<StakingOperation>)>;
                getStakingContext(getStakingContextRequest, options?): Promise<((axios?, basePath?) => AxiosPromise<StakingContext>)>;
                getValidator(networkId, assetId, validatorId, options?): Promise<((axios?, basePath?) => AxiosPromise<Validator>)>;
                listValidators(networkId, assetId, status?, limit?, page?, options?): Promise<((axios?, basePath?) => AxiosPromise<ValidatorList>)>;
            }

            • buildStakingOperation:function
              • Build a new staking operation

                Parameters

                Returns Promise<((axios?, basePath?) => AxiosPromise<StakingOperation>)>

                Summary

                Build a new staking operation

                -

                Throws

            • fetchStakingRewards:function
            • fetchHistoricalStakingBalances:function
              • Fetch historical staking balances for given address.

                +

                Parameters

                • networkId: string

                  The ID of the blockchain network.

                  +
                • assetId: string

                  The ID of the asset for which the historical staking balances are being fetched.

                  +
                • addressId: string

                  The onchain address for which the historical staking balances are being fetched.

                  +
                • startTime: string

                  The start time of this historical staking balance period.

                  +
                • endTime: string

                  The end time of this historical staking balance period.

                  +
                • Optional limit: number

                  A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 50.

                  +
                • Optional page: string

                  A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

                  +
                • Optional options: RawAxiosRequestConfig

                  Override http request option.

                  +

                Returns Promise<((axios?, basePath?) => AxiosPromise<FetchHistoricalStakingBalances200Response>)>

                Summary

                Fetch historical staking balances

                +

                Throws

            • fetchStakingRewards:function
              • Fetch staking rewards for a list of addresses

                Parameters

                • fetchStakingRewardsRequest: FetchStakingRewardsRequest
                • Optional limit: number

                  A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 50.

                • Optional page: string

                  A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

                • Optional options: RawAxiosRequestConfig

                  Override http request option.

                Returns Promise<((axios?, basePath?) => AxiosPromise<FetchStakingRewards200Response>)>

                Summary

                Fetch staking rewards

                -

                Throws

            • getStakingContext:function
              • Get staking context for an address

                +

                Throws

            • getExternalStakingOperation:function
              • Get the latest state of a staking operation

                +

                Parameters

                • networkId: string

                  The ID of the blockchain network

                  +
                • addressId: string

                  The ID of the address to fetch the staking operation for

                  +
                • stakingOperationId: string

                  The ID of the staking operation

                  +
                • Optional options: RawAxiosRequestConfig

                  Override http request option.

                  +

                Returns Promise<((axios?, basePath?) => AxiosPromise<StakingOperation>)>

                Summary

                Get the latest state of a staking operation

                +

                Throws

            • getStakingContext:function
              • Get staking context for an address

                Parameters

                Returns Promise<((axios?, basePath?) => AxiosPromise<StakingContext>)>

                Summary

                Get staking context

                -

                Throws

            Export

          \ No newline at end of file +

          Throws

      • getValidator:function
        • Get a validator belonging to the user for a given network, asset and id.

          +

          Parameters

          • networkId: string

            The ID of the blockchain network.

            +
          • assetId: string

            The symbol of the asset to get the validator for.

            +
          • validatorId: string

            The unique id of the validator to fetch details for.

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns Promise<((axios?, basePath?) => AxiosPromise<Validator>)>

          Summary

          Get a validator belonging to the CDP project

          +

          Throws

      • listValidators:function
        • List validators belonging to the user for a given network and asset.

          +

          Parameters

          • networkId: string

            The ID of the blockchain network.

            +
          • assetId: string

            The symbol of the asset to get the validators for.

            +
          • Optional status: ValidatorStatus

            A filter to list validators based on a status.

            +
          • Optional limit: number

            A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 50.

            +
          • Optional page: string

            A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns Promise<((axios?, basePath?) => AxiosPromise<ValidatorList>)>

          Summary

          List validators belonging to the CDP project

          +

          Throws

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.TradesApiAxiosParamCreator.html b/docs/functions/client_api.TradesApiAxiosParamCreator.html index bba5f7e7..e34ecb94 100644 --- a/docs/functions/client_api.TradesApiAxiosParamCreator.html +++ b/docs/functions/client_api.TradesApiAxiosParamCreator.html @@ -23,4 +23,4 @@

    Throws

    Returns Promise<RequestArgs>

    Export

    \ No newline at end of file +

    Returns Promise<RequestArgs>

    Export

    \ No newline at end of file diff --git a/docs/functions/client_api.TradesApiFactory.html b/docs/functions/client_api.TradesApiFactory.html index 38a3579f..2782b317 100644 --- a/docs/functions/client_api.TradesApiFactory.html +++ b/docs/functions/client_api.TradesApiFactory.html @@ -3,24 +3,24 @@

    Parameters

    Returns AxiosPromise<Trade>

    Summary

    Broadcast a trade

    -

    Throws

  • createTrade:function
  • createTrade:function
  • getTrade:function
  • getTrade:function
  • listTrades:function
  • listTrades:function
  • Export

    \ No newline at end of file +

    Throws

    Export

    \ No newline at end of file diff --git a/docs/functions/client_api.TradesApiFp.html b/docs/functions/client_api.TradesApiFp.html index 9e7e0ab3..822b913b 100644 --- a/docs/functions/client_api.TradesApiFp.html +++ b/docs/functions/client_api.TradesApiFp.html @@ -5,22 +5,22 @@
  • tradeId: string

    The ID of the trade to broadcast

  • broadcastTradeRequest: BroadcastTradeRequest
  • Optional options: RawAxiosRequestConfig

    Override http request option.

  • Returns Promise<((axios?, basePath?) => AxiosPromise<Trade>)>

    Summary

    Broadcast a trade

    -

    Throws

  • createTrade:function
  • createTrade:function
  • getTrade:function
  • getTrade:function
  • listTrades:function
  • listTrades:function
  • Export

    \ No newline at end of file +

    Throws

    Export

    \ No newline at end of file diff --git a/docs/functions/client_api.TransactionHistoryApiAxiosParamCreator.html b/docs/functions/client_api.TransactionHistoryApiAxiosParamCreator.html new file mode 100644 index 00000000..e61f8c88 --- /dev/null +++ b/docs/functions/client_api.TransactionHistoryApiAxiosParamCreator.html @@ -0,0 +1,9 @@ +TransactionHistoryApiAxiosParamCreator | @coinbase/coinbase-sdk

    Function TransactionHistoryApiAxiosParamCreator

    • TransactionHistoryApi - axios parameter creator

      +

      Parameters

      Returns {
          listAddressTransactions: ((networkId, addressId, limit?, page?, options?) => Promise<RequestArgs>);
      }

      • listAddressTransactions: ((networkId, addressId, limit?, page?, options?) => Promise<RequestArgs>)

        List all transactions that interact with the address.

        +

        Summary

        List transactions for an address.

        +

        Throws

          • (networkId, addressId, limit?, page?, options?): Promise<RequestArgs>
          • Parameters

            • networkId: string

              The ID of the blockchain network

              +
            • addressId: string

              The ID of the address to fetch the transactions for.

              +
            • Optional limit: number

              A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

              +
            • Optional page: string

              A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

              +
            • Optional options: RawAxiosRequestConfig = {}

              Override http request option.

              +

            Returns Promise<RequestArgs>

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.TransactionHistoryApiFactory.html b/docs/functions/client_api.TransactionHistoryApiFactory.html new file mode 100644 index 00000000..4700e1a7 --- /dev/null +++ b/docs/functions/client_api.TransactionHistoryApiFactory.html @@ -0,0 +1,9 @@ +TransactionHistoryApiFactory | @coinbase/coinbase-sdk
    • TransactionHistoryApi - factory interface

      +

      Parameters

      • Optional configuration: Configuration
      • Optional basePath: string
      • Optional axios: AxiosInstance

      Returns {
          listAddressTransactions(networkId, addressId, limit?, page?, options?): AxiosPromise<AddressTransactionList>;
      }

      • listAddressTransactions:function
        • List all transactions that interact with the address.

          +

          Parameters

          • networkId: string

            The ID of the blockchain network

            +
          • addressId: string

            The ID of the address to fetch the transactions for.

            +
          • Optional limit: number

            A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

            +
          • Optional page: string

            A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns AxiosPromise<AddressTransactionList>

          Summary

          List transactions for an address.

          +

          Throws

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.TransactionHistoryApiFp.html b/docs/functions/client_api.TransactionHistoryApiFp.html new file mode 100644 index 00000000..2e0dd274 --- /dev/null +++ b/docs/functions/client_api.TransactionHistoryApiFp.html @@ -0,0 +1,9 @@ +TransactionHistoryApiFp | @coinbase/coinbase-sdk
    • TransactionHistoryApi - functional programming interface

      +

      Parameters

      Returns {
          listAddressTransactions(networkId, addressId, limit?, page?, options?): Promise<((axios?, basePath?) => AxiosPromise<AddressTransactionList>)>;
      }

      • listAddressTransactions:function
        • List all transactions that interact with the address.

          +

          Parameters

          • networkId: string

            The ID of the blockchain network

            +
          • addressId: string

            The ID of the address to fetch the transactions for.

            +
          • Optional limit: number

            A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

            +
          • Optional page: string

            A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns Promise<((axios?, basePath?) => AxiosPromise<AddressTransactionList>)>

          Summary

          List transactions for an address.

          +

          Throws

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.TransfersApiAxiosParamCreator.html b/docs/functions/client_api.TransfersApiAxiosParamCreator.html index be8bc7b3..610a893a 100644 --- a/docs/functions/client_api.TransfersApiAxiosParamCreator.html +++ b/docs/functions/client_api.TransfersApiAxiosParamCreator.html @@ -23,4 +23,4 @@

    Throws

    Returns Promise<RequestArgs>

    Export

    \ No newline at end of file +

    Returns Promise<RequestArgs>

    Export

    \ No newline at end of file diff --git a/docs/functions/client_api.TransfersApiFactory.html b/docs/functions/client_api.TransfersApiFactory.html index ee16fe3f..8a606eb3 100644 --- a/docs/functions/client_api.TransfersApiFactory.html +++ b/docs/functions/client_api.TransfersApiFactory.html @@ -3,24 +3,24 @@

    Parameters

    Returns AxiosPromise<Transfer>

    Summary

    Broadcast a transfer

    -

    Throws

  • createTransfer:function
  • createTransfer:function
  • getTransfer:function
  • getTransfer:function
  • listTransfers:function
  • listTransfers:function
  • Export

    \ No newline at end of file +

    Throws

    Export

    \ No newline at end of file diff --git a/docs/functions/client_api.TransfersApiFp.html b/docs/functions/client_api.TransfersApiFp.html index 23d017c1..fbbfd8b0 100644 --- a/docs/functions/client_api.TransfersApiFp.html +++ b/docs/functions/client_api.TransfersApiFp.html @@ -5,22 +5,22 @@
  • transferId: string

    The ID of the transfer to broadcast

  • broadcastTransferRequest: BroadcastTransferRequest
  • Optional options: RawAxiosRequestConfig

    Override http request option.

  • Returns Promise<((axios?, basePath?) => AxiosPromise<Transfer>)>

    Summary

    Broadcast a transfer

    -

    Throws

  • createTransfer:function
  • createTransfer:function
  • getTransfer:function
  • getTransfer:function
  • listTransfers:function
  • listTransfers:function
  • Export

    \ No newline at end of file +

    Throws

    Export

    \ No newline at end of file diff --git a/docs/functions/client_api.UsersApiAxiosParamCreator.html b/docs/functions/client_api.UsersApiAxiosParamCreator.html index d13f0c5c..e0eca370 100644 --- a/docs/functions/client_api.UsersApiAxiosParamCreator.html +++ b/docs/functions/client_api.UsersApiAxiosParamCreator.html @@ -2,4 +2,4 @@

    Parameters

    Returns {
        getCurrentUser: ((options?) => Promise<RequestArgs>);
    }

    Export

    \ No newline at end of file +

    Returns Promise<RequestArgs>

    Export

    \ No newline at end of file diff --git a/docs/functions/client_api.UsersApiFactory.html b/docs/functions/client_api.UsersApiFactory.html index 2d52aea6..364119c6 100644 --- a/docs/functions/client_api.UsersApiFactory.html +++ b/docs/functions/client_api.UsersApiFactory.html @@ -1,5 +1,5 @@ UsersApiFactory | @coinbase/coinbase-sdk
    • UsersApi - factory interface

      Parameters

      • Optional configuration: Configuration
      • Optional basePath: string
      • Optional axios: AxiosInstance

      Returns {
          getCurrentUser(options?): AxiosPromise<User>;
      }

      • getCurrentUser:function
        • Get current user

          -

          Parameters

          • Optional options: any

            Override http request option.

            +

            Parameters

            • Optional options: RawAxiosRequestConfig

              Override http request option.

            Returns AxiosPromise<User>

            Summary

            Get current user

            -

            Throws

        Export

    \ No newline at end of file +

    Throws

    Export

    \ No newline at end of file diff --git a/docs/functions/client_api.UsersApiFp.html b/docs/functions/client_api.UsersApiFp.html index 36aff8e6..13ffe400 100644 --- a/docs/functions/client_api.UsersApiFp.html +++ b/docs/functions/client_api.UsersApiFp.html @@ -2,4 +2,4 @@

    Parameters

    Returns {
        getCurrentUser(options?): Promise<((axios?, basePath?) => AxiosPromise<User>)>;
    }

    Export

    \ No newline at end of file +

    Throws

    Export

    \ No newline at end of file diff --git a/docs/functions/client_api.WalletsApiAxiosParamCreator.html b/docs/functions/client_api.WalletsApiAxiosParamCreator.html index 8013cf9d..e7f7be22 100644 --- a/docs/functions/client_api.WalletsApiAxiosParamCreator.html +++ b/docs/functions/client_api.WalletsApiAxiosParamCreator.html @@ -20,4 +20,4 @@

    Throws

    Export

    \ No newline at end of file +

    Returns Promise<RequestArgs>

    Export

    \ No newline at end of file diff --git a/docs/functions/client_api.WalletsApiFactory.html b/docs/functions/client_api.WalletsApiFactory.html index 30908086..d136d888 100644 --- a/docs/functions/client_api.WalletsApiFactory.html +++ b/docs/functions/client_api.WalletsApiFactory.html @@ -1,23 +1,23 @@ WalletsApiFactory | @coinbase/coinbase-sdk
    • WalletsApi - factory interface

      Parameters

      • Optional configuration: Configuration
      • Optional basePath: string
      • Optional axios: AxiosInstance

      Returns {
          createWallet(createWalletRequest?, options?): AxiosPromise<Wallet>;
          getWallet(walletId, options?): AxiosPromise<Wallet>;
          getWalletBalance(walletId, assetId, options?): AxiosPromise<Balance>;
          listWalletBalances(walletId, options?): AxiosPromise<AddressBalanceList>;
          listWallets(limit?, page?, options?): AxiosPromise<WalletList>;
      }

      • createWallet:function
        • Create a new wallet scoped to the user.

          -

          Parameters

        • getWallet:function
        • getWallet:function
          • Get wallet

            Parameters

            • walletId: string

              The ID of the wallet to fetch

              -
            • Optional options: any

              Override http request option.

              +
            • Optional options: RawAxiosRequestConfig

              Override http request option.

            Returns AxiosPromise<Wallet>

            Summary

            Get wallet by ID

            -

            Throws

        • getWalletBalance:function
          • Get the aggregated balance of an asset across all of the addresses in the wallet.

            +

            Throws

        • getWalletBalance:function
          • Get the aggregated balance of an asset across all of the addresses in the wallet.

            Parameters

            • walletId: string

              The ID of the wallet to fetch the balance for

            • assetId: string

              The symbol of the asset to fetch the balance for

              -
            • Optional options: any

              Override http request option.

              +
            • Optional options: RawAxiosRequestConfig

              Override http request option.

            Returns AxiosPromise<Balance>

            Summary

            Get the balance of an asset in the wallet

            -

            Throws

        • listWalletBalances:function
        • listWalletBalances:function
          • List the balances of all of the addresses in the wallet aggregated by asset.

            Parameters

            • walletId: string

              The ID of the wallet to fetch the balances for

              -
            • Optional options: any

              Override http request option.

              +
            • Optional options: RawAxiosRequestConfig

              Override http request option.

            Returns AxiosPromise<AddressBalanceList>

            Summary

            List wallet balances

            -

            Throws

        • listWallets:function
        • listWallets:function
          • List wallets belonging to the user.

            Parameters

            • Optional limit: number

              A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

            • Optional page: string

              A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

              -
            • Optional options: any

              Override http request option.

              +
            • Optional options: RawAxiosRequestConfig

              Override http request option.

            Returns AxiosPromise<WalletList>

            Summary

            List wallets

            -

            Throws

        Export

    \ No newline at end of file +

    Throws

    Export

    \ No newline at end of file diff --git a/docs/functions/client_api.WalletsApiFp.html b/docs/functions/client_api.WalletsApiFp.html index d5c30df2..3007b679 100644 --- a/docs/functions/client_api.WalletsApiFp.html +++ b/docs/functions/client_api.WalletsApiFp.html @@ -2,22 +2,22 @@

    Parameters

    Returns {
        createWallet(createWalletRequest?, options?): Promise<((axios?, basePath?) => AxiosPromise<Wallet>)>;
        getWallet(walletId, options?): Promise<((axios?, basePath?) => AxiosPromise<Wallet>)>;
        getWalletBalance(walletId, assetId, options?): Promise<((axios?, basePath?) => AxiosPromise<Balance>)>;
        listWalletBalances(walletId, options?): Promise<((axios?, basePath?) => AxiosPromise<AddressBalanceList>)>;
        listWallets(limit?, page?, options?): Promise<((axios?, basePath?) => AxiosPromise<WalletList>)>;
    }

    Export

    \ No newline at end of file +

    Throws

    Export

    \ No newline at end of file diff --git a/docs/functions/client_api.WebhooksApiAxiosParamCreator.html b/docs/functions/client_api.WebhooksApiAxiosParamCreator.html new file mode 100644 index 00000000..a1726095 --- /dev/null +++ b/docs/functions/client_api.WebhooksApiAxiosParamCreator.html @@ -0,0 +1,22 @@ +WebhooksApiAxiosParamCreator | @coinbase/coinbase-sdk
    • WebhooksApi - axios parameter creator

      +

      Parameters

      Returns {
          createWalletWebhook: ((walletId, createWalletWebhookRequest?, options?) => Promise<RequestArgs>);
          createWebhook: ((createWebhookRequest?, options?) => Promise<RequestArgs>);
          deleteWebhook: ((webhookId, options?) => Promise<RequestArgs>);
          listWebhooks: ((limit?, page?, options?) => Promise<RequestArgs>);
          updateWebhook: ((webhookId, updateWebhookRequest?, options?) => Promise<RequestArgs>);
      }

      • createWalletWebhook: ((walletId, createWalletWebhookRequest?, options?) => Promise<RequestArgs>)

        Create a new webhook scoped to a wallet

        +

        Summary

        Create a new webhook scoped to a wallet

        +

        Throws

          • (walletId, createWalletWebhookRequest?, options?): Promise<RequestArgs>
          • Parameters

            • walletId: string

              The ID of the wallet to create the webhook for.

              +
            • Optional createWalletWebhookRequest: CreateWalletWebhookRequest
            • Optional options: RawAxiosRequestConfig = {}

              Override http request option.

              +

            Returns Promise<RequestArgs>

      • createWebhook: ((createWebhookRequest?, options?) => Promise<RequestArgs>)

        Create a new webhook

        +

        Summary

        Create a new webhook

        +

        Throws

          • (createWebhookRequest?, options?): Promise<RequestArgs>
          • Parameters

            • Optional createWebhookRequest: CreateWebhookRequest
            • Optional options: RawAxiosRequestConfig = {}

              Override http request option.

              +

            Returns Promise<RequestArgs>

      • deleteWebhook: ((webhookId, options?) => Promise<RequestArgs>)

        Delete a webhook

        +

        Summary

        Delete a webhook

        +

        Throws

          • (webhookId, options?): Promise<RequestArgs>
          • Parameters

            • webhookId: string

              The Webhook uuid that needs to be deleted

              +
            • Optional options: RawAxiosRequestConfig = {}

              Override http request option.

              +

            Returns Promise<RequestArgs>

      • listWebhooks: ((limit?, page?, options?) => Promise<RequestArgs>)

        List webhooks, optionally filtered by event type.

        +

        Summary

        List webhooks

        +

        Throws

          • (limit?, page?, options?): Promise<RequestArgs>
          • Parameters

            • Optional limit: number

              A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

              +
            • Optional page: string

              A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

              +
            • Optional options: RawAxiosRequestConfig = {}

              Override http request option.

              +

            Returns Promise<RequestArgs>

      • updateWebhook: ((webhookId, updateWebhookRequest?, options?) => Promise<RequestArgs>)

        Update a webhook

        +

        Summary

        Update a webhook

        +

        Throws

          • (webhookId, updateWebhookRequest?, options?): Promise<RequestArgs>
          • Parameters

            • webhookId: string

              The Webhook id that needs to be updated

              +
            • Optional updateWebhookRequest: UpdateWebhookRequest
            • Optional options: RawAxiosRequestConfig = {}

              Override http request option.

              +

            Returns Promise<RequestArgs>

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.WebhooksApiFactory.html b/docs/functions/client_api.WebhooksApiFactory.html new file mode 100644 index 00000000..53edb774 --- /dev/null +++ b/docs/functions/client_api.WebhooksApiFactory.html @@ -0,0 +1,22 @@ +WebhooksApiFactory | @coinbase/coinbase-sdk
    • WebhooksApi - factory interface

      +

      Parameters

      • Optional configuration: Configuration
      • Optional basePath: string
      • Optional axios: AxiosInstance

      Returns {
          createWalletWebhook(walletId, createWalletWebhookRequest?, options?): AxiosPromise<Webhook>;
          createWebhook(createWebhookRequest?, options?): AxiosPromise<Webhook>;
          deleteWebhook(webhookId, options?): AxiosPromise<void>;
          listWebhooks(limit?, page?, options?): AxiosPromise<WebhookList>;
          updateWebhook(webhookId, updateWebhookRequest?, options?): AxiosPromise<Webhook>;
      }

      • createWalletWebhook:function
        • Create a new webhook scoped to a wallet

          +

          Parameters

          • walletId: string

            The ID of the wallet to create the webhook for.

            +
          • Optional createWalletWebhookRequest: CreateWalletWebhookRequest
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns AxiosPromise<Webhook>

          Summary

          Create a new webhook scoped to a wallet

          +

          Throws

      • createWebhook:function
        • Create a new webhook

          +

          Parameters

          • Optional createWebhookRequest: CreateWebhookRequest
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns AxiosPromise<Webhook>

          Summary

          Create a new webhook

          +

          Throws

      • deleteWebhook:function
        • Delete a webhook

          +

          Parameters

          • webhookId: string

            The Webhook uuid that needs to be deleted

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns AxiosPromise<void>

          Summary

          Delete a webhook

          +

          Throws

      • listWebhooks:function
        • List webhooks, optionally filtered by event type.

          +

          Parameters

          • Optional limit: number

            A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

            +
          • Optional page: string

            A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns AxiosPromise<WebhookList>

          Summary

          List webhooks

          +

          Throws

      • updateWebhook:function
        • Update a webhook

          +

          Parameters

          • webhookId: string

            The Webhook id that needs to be updated

            +
          • Optional updateWebhookRequest: UpdateWebhookRequest
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns AxiosPromise<Webhook>

          Summary

          Update a webhook

          +

          Throws

      Export

    \ No newline at end of file diff --git a/docs/functions/client_api.WebhooksApiFp.html b/docs/functions/client_api.WebhooksApiFp.html new file mode 100644 index 00000000..018ad0b9 --- /dev/null +++ b/docs/functions/client_api.WebhooksApiFp.html @@ -0,0 +1,22 @@ +WebhooksApiFp | @coinbase/coinbase-sdk
    • WebhooksApi - functional programming interface

      +

      Parameters

      Returns {
          createWalletWebhook(walletId, createWalletWebhookRequest?, options?): Promise<((axios?, basePath?) => AxiosPromise<Webhook>)>;
          createWebhook(createWebhookRequest?, options?): Promise<((axios?, basePath?) => AxiosPromise<Webhook>)>;
          deleteWebhook(webhookId, options?): Promise<((axios?, basePath?) => AxiosPromise<void>)>;
          listWebhooks(limit?, page?, options?): Promise<((axios?, basePath?) => AxiosPromise<WebhookList>)>;
          updateWebhook(webhookId, updateWebhookRequest?, options?): Promise<((axios?, basePath?) => AxiosPromise<Webhook>)>;
      }

      • createWalletWebhook:function
        • Create a new webhook scoped to a wallet

          +

          Parameters

          • walletId: string

            The ID of the wallet to create the webhook for.

            +
          • Optional createWalletWebhookRequest: CreateWalletWebhookRequest
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns Promise<((axios?, basePath?) => AxiosPromise<Webhook>)>

          Summary

          Create a new webhook scoped to a wallet

          +

          Throws

      • createWebhook:function
        • Create a new webhook

          +

          Parameters

          • Optional createWebhookRequest: CreateWebhookRequest
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns Promise<((axios?, basePath?) => AxiosPromise<Webhook>)>

          Summary

          Create a new webhook

          +

          Throws

      • deleteWebhook:function
        • Delete a webhook

          +

          Parameters

          • webhookId: string

            The Webhook uuid that needs to be deleted

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns Promise<((axios?, basePath?) => AxiosPromise<void>)>

          Summary

          Delete a webhook

          +

          Throws

      • listWebhooks:function
        • List webhooks, optionally filtered by event type.

          +

          Parameters

          • Optional limit: number

            A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

            +
          • Optional page: string

            A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

            +
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns Promise<((axios?, basePath?) => AxiosPromise<WebhookList>)>

          Summary

          List webhooks

          +

          Throws

      • updateWebhook:function
        • Update a webhook

          +

          Parameters

          • webhookId: string

            The Webhook id that needs to be updated

            +
          • Optional updateWebhookRequest: UpdateWebhookRequest
          • Optional options: RawAxiosRequestConfig

            Override http request option.

            +

          Returns Promise<((axios?, basePath?) => AxiosPromise<Webhook>)>

          Summary

          Update a webhook

          +

          Throws

      Export

    \ No newline at end of file diff --git a/docs/functions/client_common.assertParamExists.html b/docs/functions/client_common.assertParamExists.html index d7413014..8936e650 100644 --- a/docs/functions/client_common.assertParamExists.html +++ b/docs/functions/client_common.assertParamExists.html @@ -1 +1 @@ -assertParamExists | @coinbase/coinbase-sdk
    • Parameters

      • functionName: string
      • paramName: string
      • paramValue: unknown

      Returns void

      Throws

      Export

    \ No newline at end of file +assertParamExists | @coinbase/coinbase-sdk
    • Parameters

      • functionName: string
      • paramName: string
      • paramValue: unknown

      Returns void

      Throws

      Export

    \ No newline at end of file diff --git a/docs/functions/client_common.createRequestFunction.html b/docs/functions/client_common.createRequestFunction.html index 231f6e26..a4507206 100644 --- a/docs/functions/client_common.createRequestFunction.html +++ b/docs/functions/client_common.createRequestFunction.html @@ -1 +1 @@ -createRequestFunction | @coinbase/coinbase-sdk
    • Parameters

      Returns (<T, R>(axios?, basePath?) => Promise<R>)

        • <T, R>(axios?, basePath?): Promise<R>
        • Type Parameters

          • T = unknown
          • R = AxiosResponse<T, any>

          Parameters

          • axios: AxiosInstance = globalAxios
          • basePath: string = BASE_PATH

          Returns Promise<R>

      Export

    \ No newline at end of file +createRequestFunction | @coinbase/coinbase-sdk
    • Parameters

      Returns (<T, R>(axios?, basePath?) => Promise<R>)

        • <T, R>(axios?, basePath?): Promise<R>
        • Type Parameters

          • T = unknown
          • R = AxiosResponse<T, any>

          Parameters

          • axios: AxiosInstance = globalAxios
          • basePath: string = BASE_PATH

          Returns Promise<R>

      Export

    \ No newline at end of file diff --git a/docs/functions/client_common.serializeDataIfNeeded.html b/docs/functions/client_common.serializeDataIfNeeded.html index 72a6fb69..2881072a 100644 --- a/docs/functions/client_common.serializeDataIfNeeded.html +++ b/docs/functions/client_common.serializeDataIfNeeded.html @@ -1 +1 @@ -serializeDataIfNeeded | @coinbase/coinbase-sdk
    • Parameters

      • value: any
      • requestOptions: any
      • Optional configuration: Configuration

      Returns any

      Export

    \ No newline at end of file +serializeDataIfNeeded | @coinbase/coinbase-sdk
    • Parameters

      • value: any
      • requestOptions: any
      • Optional configuration: Configuration

      Returns any

      Export

    \ No newline at end of file diff --git a/docs/functions/client_common.setApiKeyToObject.html b/docs/functions/client_common.setApiKeyToObject.html index 769769e4..e145643d 100644 --- a/docs/functions/client_common.setApiKeyToObject.html +++ b/docs/functions/client_common.setApiKeyToObject.html @@ -1 +1 @@ -setApiKeyToObject | @coinbase/coinbase-sdk
    • Parameters

      • object: any
      • keyParamName: string
      • Optional configuration: Configuration

      Returns Promise<void>

      Export

    \ No newline at end of file +setApiKeyToObject | @coinbase/coinbase-sdk
    • Parameters

      • object: any
      • keyParamName: string
      • Optional configuration: Configuration

      Returns Promise<void>

      Export

    \ No newline at end of file diff --git a/docs/functions/client_common.setBasicAuthToObject.html b/docs/functions/client_common.setBasicAuthToObject.html index 91700077..84e05364 100644 --- a/docs/functions/client_common.setBasicAuthToObject.html +++ b/docs/functions/client_common.setBasicAuthToObject.html @@ -1 +1 @@ -setBasicAuthToObject | @coinbase/coinbase-sdk
    \ No newline at end of file +setBasicAuthToObject | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/functions/client_common.setBearerAuthToObject.html b/docs/functions/client_common.setBearerAuthToObject.html index dd80d927..cfca1007 100644 --- a/docs/functions/client_common.setBearerAuthToObject.html +++ b/docs/functions/client_common.setBearerAuthToObject.html @@ -1 +1 @@ -setBearerAuthToObject | @coinbase/coinbase-sdk
    \ No newline at end of file +setBearerAuthToObject | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/functions/client_common.setOAuthToObject.html b/docs/functions/client_common.setOAuthToObject.html index 6163334e..1abc9748 100644 --- a/docs/functions/client_common.setOAuthToObject.html +++ b/docs/functions/client_common.setOAuthToObject.html @@ -1 +1 @@ -setOAuthToObject | @coinbase/coinbase-sdk
    • Parameters

      • object: any
      • name: string
      • scopes: string[]
      • Optional configuration: Configuration

      Returns Promise<void>

      Export

    \ No newline at end of file +setOAuthToObject | @coinbase/coinbase-sdk
    • Parameters

      • object: any
      • name: string
      • scopes: string[]
      • Optional configuration: Configuration

      Returns Promise<void>

      Export

    \ No newline at end of file diff --git a/docs/functions/client_common.setSearchParams.html b/docs/functions/client_common.setSearchParams.html index 9da703b7..7f167570 100644 --- a/docs/functions/client_common.setSearchParams.html +++ b/docs/functions/client_common.setSearchParams.html @@ -1 +1 @@ -setSearchParams | @coinbase/coinbase-sdk
    • Parameters

      • url: URL
      • Rest ...objects: any[]

      Returns void

      Export

    \ No newline at end of file +setSearchParams | @coinbase/coinbase-sdk
    • Parameters

      • url: URL
      • Rest ...objects: any[]

      Returns void

      Export

    \ No newline at end of file diff --git a/docs/functions/client_common.toPathString.html b/docs/functions/client_common.toPathString.html index d3bc0804..6426569b 100644 --- a/docs/functions/client_common.toPathString.html +++ b/docs/functions/client_common.toPathString.html @@ -1 +1 @@ -toPathString | @coinbase/coinbase-sdk
    \ No newline at end of file +toPathString | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/functions/coinbase_hash.hashMessage.html b/docs/functions/coinbase_hash.hashMessage.html new file mode 100644 index 00000000..7ad38939 --- /dev/null +++ b/docs/functions/coinbase_hash.hashMessage.html @@ -0,0 +1,5 @@ +hashMessage | @coinbase/coinbase-sdk
    • Computes the EIP-191 personal-sign message digest to sign.

      +

      Parameters

      • message: string | Uint8Array

        The message to hash.

        +

      Returns string

      The EIP-191 hash of the message as a string.

      +

      Throws

      if the message cannot be hashed.

      +
    \ No newline at end of file diff --git a/docs/functions/coinbase_hash.hashTypedDataMessage.html b/docs/functions/coinbase_hash.hashTypedDataMessage.html new file mode 100644 index 00000000..37868ed0 --- /dev/null +++ b/docs/functions/coinbase_hash.hashTypedDataMessage.html @@ -0,0 +1,7 @@ +hashTypedDataMessage | @coinbase/coinbase-sdk
    • Computes the hash of the EIP-712 compliant typed data message.

      +

      Parameters

      • domain: TypedDataDomain

        The domain parameters for the EIP-712 message, including the name, version, chainId, and verifying contract.

        +
      • types: Record<string, TypedDataField[]>

        The types definitions for the EIP-712 message, represented as a record of type names to their fields.

        +
      • value: Record<string, any>

        The actual data object to hash, conforming to the types defined.

        +

      Returns string

      The EIP-712 hash of the typed data as a hex-encoded string.

      +

      Throws

      if the typed data cannot be hashed.

      +
    \ No newline at end of file diff --git a/docs/functions/coinbase_read_contract.readContract.html b/docs/functions/coinbase_read_contract.readContract.html new file mode 100644 index 00000000..efa48667 --- /dev/null +++ b/docs/functions/coinbase_read_contract.readContract.html @@ -0,0 +1,12 @@ +readContract | @coinbase/coinbase-sdk
    • Reads data from a smart contract using the Coinbase API.

      +

      Type Parameters

      • TAbi extends undefined | Abi

        The ABI type.

        +
      • TFunctionName extends string

        The contract function name type.

        +
      • TArgs extends Record<string, any>

        The function arguments type.

        +

      Parameters

      • params: {
            abi?: TAbi;
            args: TArgs;
            contractAddress: `0x${string}`;
            method: TFunctionName;
            networkId: string;
        }

        The parameters for reading the contract.

        +
        • Optional abi?: TAbi

          The contract ABI (optional).

          +
        • args: TArgs

          The arguments for the contract method.

          +
        • contractAddress: `0x${string}`

          The contract address (as a hexadecimal string).

          +
        • method: TFunctionName

          The contract method to call.

          +
        • networkId: string

          The network ID.

          +

      Returns Promise<TAbi extends Abi
          ? ContractFunctionReturnType<TAbi, Extract<TFunctionName, ContractFunctionName<TAbi, "view" | "pure">>, TArgs>
          : any>

      The result of the contract call.

      +
    \ No newline at end of file diff --git a/docs/functions/coinbase_types.isMnemonicSeedPhrase.html b/docs/functions/coinbase_types.isMnemonicSeedPhrase.html new file mode 100644 index 00000000..8a6d89ff --- /dev/null +++ b/docs/functions/coinbase_types.isMnemonicSeedPhrase.html @@ -0,0 +1,4 @@ +isMnemonicSeedPhrase | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/functions/coinbase_types.isWalletData.html b/docs/functions/coinbase_types.isWalletData.html new file mode 100644 index 00000000..04376735 --- /dev/null +++ b/docs/functions/coinbase_types.isWalletData.html @@ -0,0 +1,10 @@ +isWalletData | @coinbase/coinbase-sdk
    • Type guard to check if data matches the appropriate WalletData format. +WalletData must have:

      +
        +
      • exactly one of (walletId or wallet_id)
      • +
      • at most one of (networkId or network_id)
      • +
      • a seed
      • +
      +

      Parameters

      • data: unknown

        The data to check

        +

      Returns data is WalletData

      True if data matches the appropriate WalletData format

      +
    \ No newline at end of file diff --git a/docs/functions/coinbase_utils.convertStringToHex.html b/docs/functions/coinbase_utils.convertStringToHex.html index 4dd5ce74..22f85a0d 100644 --- a/docs/functions/coinbase_utils.convertStringToHex.html +++ b/docs/functions/coinbase_utils.convertStringToHex.html @@ -1,4 +1,4 @@ convertStringToHex | @coinbase/coinbase-sdk
    • Converts a Uint8Array to a hex string.

      Parameters

      • key: Uint8Array

        The key to convert.

      Returns string

      The converted hex string.

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/functions/coinbase_utils.delay.html b/docs/functions/coinbase_utils.delay.html index fc00f407..85e91d1d 100644 --- a/docs/functions/coinbase_utils.delay.html +++ b/docs/functions/coinbase_utils.delay.html @@ -1,4 +1,4 @@ delay | @coinbase/coinbase-sdk
    • Delays the execution of the function by the specified number of seconds.

      Parameters

      • seconds: number

        The number of seconds to delay the execution.

      Returns Promise<void>

      A promise that resolves after the specified number of seconds.

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/functions/coinbase_utils.formatDate.html b/docs/functions/coinbase_utils.formatDate.html new file mode 100644 index 00000000..39f7f518 --- /dev/null +++ b/docs/functions/coinbase_utils.formatDate.html @@ -0,0 +1,4 @@ +formatDate | @coinbase/coinbase-sdk
    • Formats the input date to 'YYYY-MM-DD'

      +

      Parameters

      • date: Date

        The date to format.

        +

      Returns string

      a formated date of 'YYYY-MM-DD'

      +
    \ No newline at end of file diff --git a/docs/functions/coinbase_utils.getWeekBackDate.html b/docs/functions/coinbase_utils.getWeekBackDate.html new file mode 100644 index 00000000..9456a5d0 --- /dev/null +++ b/docs/functions/coinbase_utils.getWeekBackDate.html @@ -0,0 +1,4 @@ +getWeekBackDate | @coinbase/coinbase-sdk
    • Takes a date and subtracts a week from it. (7 days)

      +

      Parameters

      • date: Date

        The date to be formatted.

        +

      Returns string

      a formatted date that is one week ago.

      +
    \ No newline at end of file diff --git a/docs/functions/coinbase_utils.logApiResponse.html b/docs/functions/coinbase_utils.logApiResponse.html index 157409cc..07895766 100644 --- a/docs/functions/coinbase_utils.logApiResponse.html +++ b/docs/functions/coinbase_utils.logApiResponse.html @@ -2,4 +2,4 @@

    Parameters

    Returns AxiosResponse<any, any>

    The Axios response object.

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/functions/coinbase_utils.parseUnsignedPayload.html b/docs/functions/coinbase_utils.parseUnsignedPayload.html index 6ceae87e..9f056165 100644 --- a/docs/functions/coinbase_utils.parseUnsignedPayload.html +++ b/docs/functions/coinbase_utils.parseUnsignedPayload.html @@ -2,4 +2,4 @@

    Parameters

    Returns Record<string, any>

    The parsed JSON object.

    Throws

    If the Unsigned Payload is invalid.

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/functions/coinbase_utils.registerAxiosInterceptors.html b/docs/functions/coinbase_utils.registerAxiosInterceptors.html index b22852c3..86f9625a 100644 --- a/docs/functions/coinbase_utils.registerAxiosInterceptors.html +++ b/docs/functions/coinbase_utils.registerAxiosInterceptors.html @@ -2,4 +2,4 @@

    Parameters

    Returns void

    \ No newline at end of file +

    Returns void

    \ No newline at end of file diff --git a/docs/functions/utils_chain.createNetwork.html b/docs/functions/utils_chain.createNetwork.html new file mode 100644 index 00000000..69e3acbd --- /dev/null +++ b/docs/functions/utils_chain.createNetwork.html @@ -0,0 +1,4 @@ +createNetwork | @coinbase/coinbase-sdk
    • Creates a network configuration for a given chain ID

      +

      Parameters

      • chainId: 8453 | 84532

        The chain ID to create a network configuration for

        +

      Returns Network

      The network configuration

      +
    \ No newline at end of file diff --git a/docs/functions/utils_wait.wait.html b/docs/functions/utils_wait.wait.html new file mode 100644 index 00000000..796c520b --- /dev/null +++ b/docs/functions/utils_wait.wait.html @@ -0,0 +1,10 @@ +wait | @coinbase/coinbase-sdk
    • Polls a resource until a terminal condition is met or timeout occurs.

      +

      Type Parameters

      • T
      • K = T

      Parameters

      • reload: (() => Promise<T>)

        Function that fetches the latest state of the resource

        +
          • (): Promise<T>
          • Returns Promise<T>

      • isTerminal: ((obj) => boolean)

        Function that determines if the current state is terminal

        +
          • (obj): boolean
          • Parameters

            • obj: T

            Returns boolean

      • transform: ((obj) => K) = ...

        Function that transforms the resource into a new type

        +
          • (obj): K
          • Parameters

            • obj: T

            Returns K

      • options: WaitOptions = {}

        Configuration options for polling behavior

        +

      Returns Promise<K>

      The resource in its terminal state

      +

      Throws

      If the operation exceeds the timeout duration

      +

      Example

      const result = await wait(
      () => fetchOrderStatus(orderId),
      (status) => status === 'completed',
      (status) => status === 'completed' ? { status } : undefined,
      { timeoutSeconds: 30 }
      ); +
      +
    \ No newline at end of file diff --git a/docs/functions/wallets_createSmartWallet.createSmartWallet.html b/docs/functions/wallets_createSmartWallet.createSmartWallet.html new file mode 100644 index 00000000..ffa76529 --- /dev/null +++ b/docs/functions/wallets_createSmartWallet.createSmartWallet.html @@ -0,0 +1,7 @@ +createSmartWallet | @coinbase/coinbase-sdk
    • Parameters

      Returns Promise<SmartWallet>

      A promise that resolves to the newly created smart wallet instance

      +

      Description

      Creates a new smart wallet using the Coinbase API

      +

      Throws

      If the Coinbase API client is not initialized

      +

      See https://viem.sh/docs/accounts/local/privateKeyToAccount for using a Viem LocalAccount with SmartWallet

      +

      Example

      import { generatePrivateKey, privateKeyToAccount } from "viem/accounts";
      import { createSmartWallet } from "@coinbase/coinbase-sdk";
      import { Coinbase } from "@coinbase/coinbase-sdk";

      Coinbase.configureFromJson({filePath: "~/.apikeys/prod.json"});

      const privateKey = generatePrivateKey();
      const owner = privateKeyToAccount(privateKey);
      const wallet = await createSmartWallet({
      signer: owner
      }); +
      +
    \ No newline at end of file diff --git a/docs/functions/wallets_toSmartWallet.toSmartWallet.html b/docs/functions/wallets_toSmartWallet.toSmartWallet.html new file mode 100644 index 00000000..82067267 --- /dev/null +++ b/docs/functions/wallets_toSmartWallet.toSmartWallet.html @@ -0,0 +1,9 @@ +toSmartWallet | @coinbase/coinbase-sdk
    • Creates a SmartWallet instance from an existing smart wallet address and signer. +Use this to interact with previously deployed smart wallets, rather than creating new ones.

      +

      The signer must be the original owner of the smart wallet.

      +

      Parameters

      Returns SmartWallet

      A configured SmartWallet instance ready for transaction submission

      +

      Example

      import { toSmartWallet } from "@coinbase/coinbase-sdk";

      // Connect to an existing smart wallet
      const wallet = toSmartWallet({
      smartWalletAddress: "0x1234567890123456789012345678901234567890",
      signer: localAccount
      });

      // Use on a specific network
      const networkWallet = wallet.useNetwork({
      chainId: 8453, // Base Mainnet
      paymasterUrl: "https://paymaster.example.com"
      }); +
      +

      Throws

      If the signer is not an original owner of the wallet

      +
    \ No newline at end of file diff --git a/docs/hierarchy.html b/docs/hierarchy.html index 5e8c6e35..63b67480 100644 --- a/docs/hierarchy.html +++ b/docs/hierarchy.html @@ -1 +1 @@ -@coinbase/coinbase-sdk
    \ No newline at end of file +@coinbase/coinbase-sdk

    @coinbase/coinbase-sdk

    Class Hierarchy

    \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 45a5eee5..f3c9e0ff 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,13 +1,10 @@ -@coinbase/coinbase-sdk

    @coinbase/coinbase-sdk

    Coinbase Node.js SDK

    The Coinbase Node.js SDK enables the simple integration of crypto into your app. By calling Coinbase's Platform APIs, the SDK allows you to provision crypto wallets, send crypto into/out of those wallets, track wallet balances, and trade crypto from one asset into another.

    -

    The SDK currently supports Customer-custodied Wallets on the Base Sepolia test network.

    -

    NOTE: The Coinbase SDK is currently in Alpha. The SDK:

    -
      -
    • may make backwards-incompatible changes between releases
    • -
    • should not be used on Mainnet (i.e. with real funds)
    • -
    -

    Currently, the SDK is intended for use on testnet for quick bootstrapping of crypto wallets at hackathons, code academies, and other development settings.

    +@coinbase/coinbase-sdk

    @coinbase/coinbase-sdk

    Coinbase Node.js SDK

    npm version +npm weekly downloads

    +

    The Coinbase Node.js SDK enables the simple integration of crypto into your app. By calling Coinbase's Platform APIs, the SDK allows you to provision crypto wallets, send crypto into/out of those wallets, track wallet balances, and trade crypto from one asset into another.

    +

    The SDK supports various verbs on Developer-custodied Wallets across multiple networks, as documented here.

    +

    Note: As the SDK provides new capabilities and improves the developer experience, updates may occasionally include breaking changes. These will be documented in the CHANGELOG.md file.

    Documentation

    Requirements

    The Coinbase server-side SDK requires Node.js version 18 or higher and npm version 9.7.2 or higher. To view your currently installed versions of Node.js, run the following from the command-line:

    node -v
    npm -v @@ -17,38 +14,38 @@
    nvm install node # "node" is an alias for the latest version
    nvm use node

    Installation

    Optional: Initialize the npm

    -

    This command initializes a new npm project with default settings and configures it to use ES modules by setting the type field to "module" in the package.json file.

    +

    This command initializes a new npm project with default settings and configures it to use ES modules by setting the type field to "module" in the package.json file.

    npm init -y; npm pkg set type="module"
     

    You can import the SDK as follows

    npm install @coinbase/coinbase-sdk
     

    or

    -
    yarn install @coinbase/coinbase-sdk
    +
    yarn add @coinbase/coinbase-sdk
     

    Usage

    Initialization

    You can import the SDK as follows:

    CommonJs:

    -
    const { Coinbase } = require("@coinbase/coinbase-sdk");
    +
    const { Coinbase, Wallet } = require("@coinbase/coinbase-sdk");
     

    ES modules:

    -
    import { Coinbase } from "@coinbase/coinbase-sdk";
    +
    import { Coinbase, Wallet } from "@coinbase/coinbase-sdk";
     

    To start, create a CDP API Key. Then, initialize the Platform SDK by passing your API Key name and API Key's private key via the Coinbase constructor:

    -
    const apiKeyName = "Copy your API Key name here.";

    const privateKey = "Copy your API Key's private key here.";

    const coinbase = new Coinbase({ apiKeyName: apiKeyName, privateKey: privateKey }); +
    const apiKeyName = "Copy your API Key name here.";

    const privateKey = "Copy your API Key's private key here.";

    Coinbase.configure({ apiKeyName: apiKeyName, privateKey: privateKey });

    If you are using a CDP Server-Signer to manage your private keys, enable it with the constuctor option:

    -
    const coinbase = new Coinbase({ apiKeyName: apiKeyName, privateKey: apiKeyPrivateKey, useServerSigner: true })
    +
    Coinbase.configure({ apiKeyName: apiKeyName, privateKey: apiKeyPrivateKey, useServerSigner: true })
     

    Another way to initialize the SDK is by sourcing the API key from the json file that contains your API key, downloaded from CDP portal.

    -
    const coinbase = Coinbase.configureFromJson({ filePath: "path/to/your/api-key.json" });
    +
    Coinbase.configureFromJson({ filePath: "path/to/your/api-key.json" });
     
    -

    This will allow you to authenticate with the Platform APIs and get access to the default User.

    +

    This will allow you to authenticate with the Platform APIs.

    CommonJs:

    -
    const { Coinbase } = require("@coinbase/coinbase-sdk");
    const coinbase = Coinbase.configureFromJson("path/to/your/api-key.json");
    coinbase.getDefaultUser().then(user => {
    console.log(user);
    }); +
    const { Coinbase, Wallet } = require("@coinbase/coinbase-sdk");
    Coinbase.configureFromJson("path/to/your/api-key.json");

    // List all Wallets for the CDP Project.
    Wallet.listWallets().then(resp => {
    console.log(resp.data);
    });

    Or using ES modules and async/await:

    -
    import { Coinbase } from "@coinbase/coinbase-sdk";
    const coinbase = Coinbase.configureFromJson("path/to/your/api-key.json");
    const user = await coinbase.getDefaultUser();
    console.log(user); +
    import { Coinbase, Wallet } from "@coinbase/coinbase-sdk";
    Coinbase.configureFromJson("path/to/your/api-key.json");

    // List all Wallets for the CDP Project.
    const resp = await Wallet.listWallets();
    console.log(resp.data);
    -

    Wallets, Addresses, and Transfers

    Now, create a Wallet from the User. Wallets are created with a single default Address.

    -
    // Create a Wallet with one Address by default.
    const wallet = await user.createWallet(); +

    Wallets, Addresses, and Transfers

    Now, create a Wallet which will default to the Base Sepolia testnet network (if not specified).

    +
    // Create a Wallet with one Address by default.
    const wallet = await Wallet.create();

    Next, view the default Address of your Wallet. You will need this default Address in order to fund the Wallet for your first Transfer.

    // A Wallet has a default Address.
    const address = await wallet.getDefaultAddress();
    console.log(`Address: ${address}`); @@ -57,9 +54,15 @@

    For development purposes, we provide a faucet method to fund your address with ETH on Base Sepolia testnet. We allow one faucet claim per address in a 24 hour window.

    // Create a faucet request that returns you a Faucet transaction that can be used to track the tx hash.
    const faucetTransaction = await wallet.faucet();
    console.log(`Faucet transaction: ${faucetTransaction}`);
    -
    // Create a new Wallet to transfer funds to.
    // Then, we can transfer 0.00001 ETH out of the Wallet to another Wallet.
    const anotherWallet = await user.createWallet();
    const transfer = await wallet.createTransfer({ amount: 0.00001, assetId: Coinbase.assets.Eth, destination: anotherWallet }); +
    // Create a new Wallet to transfer funds to.
    // Then, we can transfer 0.00001 ETH out of the Wallet to another Wallet.
    const anotherWallet = await Wallet.create();
    let transfer = await wallet.createTransfer({ amount: 0.00001, assetId: Coinbase.assets.Eth, destination: anotherWallet });
    transfer = await transfer.wait(); +
    +

    Gasless USDC Transfers

    To transfer USDC without needing to hold ETH for gas, you can use the createTransfer method with the gasless option set to true.

    +
    let transfer = await wallet.createTransfer({ amount: 0.00001, assetId: Coinbase.assets.Usdc, destination: anotherWallet, gasless: true });
    transfer = await transfer.wait(); +
    +

    By default, gasless transfers are batched with other transfers, and might take longer to submit. If you want to opt out of batching, you can set the skipBatching option to true, which will submit the transaction immediately.

    +
    let transfer = await wallet.createTransfer({
    amount: 0.00001,
    assetId: Coinbase.assets.Usdc,
    destination: anotherWallet,
    gasless: true,
    skipBatching: true
    });
    transfer = await transfer.wait();
    -

    Trading Funds

    // Create a Wallet on `base-mainnet` to trade assets with.
    let mainnetWallet = await user.createWallet({ networkId: Coinbase.networks.BaseMainnet });

    console.log(`Wallet successfully created: ${mainnetWallet}`);

    // Fund your Wallet's default Address with ETH from an external source.

    // Trade 0.00001 ETH to USDC
    let trade = await wallet.createTrade(0.00001, Coinbase.assets.Eth, Coinbase.assets.Usdc);

    console.log(`Second trade successfully completed: ${trade}`); +

    Trading Funds

    // Create a Wallet on `base-mainnet` to trade assets with.
    let mainnetWallet = await Wallet.create({ networkId: Coinbase.networks.BaseMainnet });

    console.log(`Wallet successfully created: ${mainnetWallet}`);

    // Fund your Wallet's default Address with ETH from an external source.

    // Trade 0.00001 ETH to USDC
    let trade = await wallet.createTrade({ amount: 0.00001, fromAssetId: Coinbase.assets.Eth, toAssetId: Coinbase.assets.Usdc });
    trade = await trade.wait();

    console.log(`Trade successfully completed: ${trade}`);

    Re-Instantiating Wallets

    The SDK creates Wallets with developer managed keys, which means you are responsible for securely storing the keys required to re-instantiate Wallets. The below code walks you through how to export a Wallet and store it in a secure location.

    // Export the data required to re-instantiate the Wallet.
    const data = wallet.export(); @@ -68,40 +71,16 @@
    // At this point, you should implement your own "store" method to securely persist
    // the data required to re-instantiate the Wallet at a later time.
    await store(data);

    For convenience during testing, we provide a saveSeed method that stores the wallet's seed in your local file system. This is an insecure method of storing wallet seeds and should only be used for development purposes.

    -
    wallet.saveSeed(wallet);
    +
    const seedFilePath = "";
    wallet.saveSeedToFile(seedFilePath);

    To encrypt the saved data, set encrypt to true. Note that your CDP API key also serves as the encryption key for the data persisted locally. To re-instantiate wallets with encrypted data, ensure that your SDK is configured with the same API key when invoking saveSeed and loadSeed.

    -
    wallet.saveSeed(wallet, true);
    +
    wallet.saveSeedToFile(seedFilePath, true);
     

    The below code demonstrates how to re-instantiate a Wallet from the data export.

    -
    // The Wallet can be re-instantiated using the exported data.
    const importedWallet = await user.importWallet(data); +
    // The Wallet can be re-instantiated using the exported data.
    const importedWallet = await Wallet.import(data);

    To import Wallets that were persisted to your local file system using saveSeed, use the below code.

    -
    // The Wallet can be re-instantiated using the exported data.
    const w = await user.getWallet(w.getId());
    w.loadSeed(filePath); -
    -

    Development

    Node.js Version

    Developing in this repository requires Node.js 18 or higher.

    -

    Set-up

    Clone the repo by running:

    -
    git clone git@github.com:coinbase/coinbase-sdk-nodejs.git
    -
    -

    To install all dependencies, run:

    -
    npm install
    -
    -

    Linting

    To autocorrect all lint errors, run:

    -
    npm run lint-fix
    -
    -

    To detect all lint errors, run:

    -
    npm run lint
    -
    -

    Testing

    To run all tests, run:

    -
    npm test
    -
    -

    To run a specific test, run (for example):

    -
    npx jest ./src/coinbase/tests/wallet_test.ts
    -
    -

    To run e2e tests, run:

    -
    npm run test:dry-run && NAME="placeholder" PRIVATE_KEY="placeholder" WALLET_DATA="placeholder" && npm run test:e2e
    -
    -

    Generating Documentation

    To generate documentation from the TypeDoc comments, run:

    -
    npm run docs
    +
    const userWallet = await Wallet.fetch(wallet.getId());
    await userWallet.loadSeedFromFile(seedFilePath);
    -
    \ No newline at end of file +

    Acknowledgments

    This project includes code from viem licensed under MIT.

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.Address.html b/docs/interfaces/client_api.Address.html index 77ffceea..3587559e 100644 --- a/docs/interfaces/client_api.Address.html +++ b/docs/interfaces/client_api.Address.html @@ -1,14 +1,17 @@ Address | @coinbase/coinbase-sdk

    Export

    Address

    -
    interface Address {
        address_id: string;
        network_id: string;
        public_key: string;
        wallet_id: string;
    }

    Properties

    interface Address {
        address_id: string;
        index: number;
        network_id: string;
        public_key: string;
        wallet_id: string;
    }

    Properties

    address_id: string

    The onchain address derived on the server-side.

    Memberof

    Address

    -
    network_id: string

    The ID of the blockchain network

    +
    index: number

    The index of the address in the wallet.

    Memberof

    Address

    -
    public_key: string

    The public key from which the address is derived.

    +
    network_id: string

    The ID of the blockchain network

    Memberof

    Address

    -
    wallet_id: string

    The ID of the wallet that owns the address

    +
    public_key: string

    The public key from which the address is derived.

    Memberof

    Address

    -
    \ No newline at end of file +
    wallet_id: string

    The ID of the wallet that owns the address

    +

    Memberof

    Address

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.AddressBalanceList.html b/docs/interfaces/client_api.AddressBalanceList.html index 20a1984e..e2e787d2 100644 --- a/docs/interfaces/client_api.AddressBalanceList.html +++ b/docs/interfaces/client_api.AddressBalanceList.html @@ -1,13 +1,13 @@ AddressBalanceList | @coinbase/coinbase-sdk

    Export

    AddressBalanceList

    -
    interface AddressBalanceList {
        data: Balance[];
        has_more: boolean;
        next_page: string;
        total_count: number;
    }

    Properties

    interface AddressBalanceList {
        data: Balance[];
        has_more: boolean;
        next_page: string;
        total_count: number;
    }

    Properties

    data: Balance[]

    Memberof

    AddressBalanceList

    -
    has_more: boolean

    True if this list has another page of items after this one that can be fetched.

    +
    has_more: boolean

    True if this list has another page of items after this one that can be fetched.

    Memberof

    AddressBalanceList

    -
    next_page: string

    The page token to be used to fetch the next page.

    +
    next_page: string

    The page token to be used to fetch the next page.

    Memberof

    AddressBalanceList

    -
    total_count: number

    The total number of balances for the wallet.

    +
    total_count: number

    The total number of balances for the wallet.

    Memberof

    AddressBalanceList

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.AddressHistoricalBalanceList.html b/docs/interfaces/client_api.AddressHistoricalBalanceList.html new file mode 100644 index 00000000..97df4dcc --- /dev/null +++ b/docs/interfaces/client_api.AddressHistoricalBalanceList.html @@ -0,0 +1,10 @@ +AddressHistoricalBalanceList | @coinbase/coinbase-sdk

    Export

    AddressHistoricalBalanceList

    +
    interface AddressHistoricalBalanceList {
        data: HistoricalBalance[];
        has_more: boolean;
        next_page: string;
    }

    Properties

    Properties

    Memberof

    AddressHistoricalBalanceList

    +
    has_more: boolean

    True if this list has another page of items after this one that can be fetched.

    +

    Memberof

    AddressHistoricalBalanceList

    +
    next_page: string

    The page token to be used to fetch the next page.

    +

    Memberof

    AddressHistoricalBalanceList

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.AddressList.html b/docs/interfaces/client_api.AddressList.html index 15e23307..7faae452 100644 --- a/docs/interfaces/client_api.AddressList.html +++ b/docs/interfaces/client_api.AddressList.html @@ -1,13 +1,13 @@ AddressList | @coinbase/coinbase-sdk

    Export

    AddressList

    -
    interface AddressList {
        data: Address[];
        has_more: boolean;
        next_page: string;
        total_count: number;
    }

    Properties

    interface AddressList {
        data: Address[];
        has_more: boolean;
        next_page: string;
        total_count: number;
    }

    Properties

    data: Address[]

    Memberof

    AddressList

    -
    has_more: boolean

    True if this list has another page of items after this one that can be fetched.

    +
    has_more: boolean

    True if this list has another page of items after this one that can be fetched.

    Memberof

    AddressList

    -
    next_page: string

    The page token to be used to fetch the next page.

    +
    next_page: string

    The page token to be used to fetch the next page.

    Memberof

    AddressList

    -
    total_count: number

    The total number of addresses for the wallet.

    +
    total_count: number

    The total number of addresses for the wallet.

    Memberof

    AddressList

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.AddressReputation.html b/docs/interfaces/client_api.AddressReputation.html new file mode 100644 index 00000000..d7beafec --- /dev/null +++ b/docs/interfaces/client_api.AddressReputation.html @@ -0,0 +1,8 @@ +AddressReputation | @coinbase/coinbase-sdk

    The reputation score with metadata of a blockchain address.

    +

    Export

    AddressReputation

    +
    interface AddressReputation {
        metadata: AddressReputationMetadata;
        score: number;
    }

    Properties

    Properties

    Memberof

    AddressReputation

    +
    score: number

    The score of a wallet address, ranging from -100 to 100. A negative score indicates a bad reputation, while a positive score indicates a good reputation.

    +

    Memberof

    AddressReputation

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.AddressReputationMetadata.html b/docs/interfaces/client_api.AddressReputationMetadata.html new file mode 100644 index 00000000..d914d3a9 --- /dev/null +++ b/docs/interfaces/client_api.AddressReputationMetadata.html @@ -0,0 +1,33 @@ +AddressReputationMetadata | @coinbase/coinbase-sdk

    The metadata for the reputation score of onchain address.

    +

    Export

    AddressReputationMetadata

    +
    interface AddressReputationMetadata {
        activity_period_days: number;
        bridge_transactions_performed: number;
        current_active_streak: number;
        ens_contract_interactions: number;
        lend_borrow_stake_transactions: number;
        longest_active_streak: number;
        smart_contract_deployments: number;
        token_swaps_performed: number;
        total_transactions: number;
        unique_days_active: number;
    }

    Properties

    activity_period_days: number

    The total number of days the address has been active.

    +

    Memberof

    AddressReputationMetadata

    +
    bridge_transactions_performed: number

    The number of bridge transactions performed by the address.

    +

    Memberof

    AddressReputationMetadata

    +
    current_active_streak: number

    The current streak of consecutive active days.

    +

    Memberof

    AddressReputationMetadata

    +
    ens_contract_interactions: number

    The number of interactions with ENS contracts.

    +

    Memberof

    AddressReputationMetadata

    +
    lend_borrow_stake_transactions: number

    The number of lend, borrow, or stake transactions performed by the address.

    +

    Memberof

    AddressReputationMetadata

    +
    longest_active_streak: number

    The longest streak of consecutive active days.

    +

    Memberof

    AddressReputationMetadata

    +
    smart_contract_deployments: number

    The number of smart contracts deployed by the address.

    +

    Memberof

    AddressReputationMetadata

    +
    token_swaps_performed: number

    The number of token swaps performed by the address.

    +

    Memberof

    AddressReputationMetadata

    +
    total_transactions: number

    The total number of transactions performed by the address.

    +

    Memberof

    AddressReputationMetadata

    +
    unique_days_active: number

    The number of unique days the address was active.

    +

    Memberof

    AddressReputationMetadata

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.AddressTransactionList.html b/docs/interfaces/client_api.AddressTransactionList.html new file mode 100644 index 00000000..525c640c --- /dev/null +++ b/docs/interfaces/client_api.AddressTransactionList.html @@ -0,0 +1,10 @@ +AddressTransactionList | @coinbase/coinbase-sdk

    Export

    AddressTransactionList

    +
    interface AddressTransactionList {
        data: Transaction[];
        has_more: boolean;
        next_page: string;
    }

    Properties

    Properties

    data: Transaction[]

    Memberof

    AddressTransactionList

    +
    has_more: boolean

    True if this list has another page of items after this one that can be fetched.

    +

    Memberof

    AddressTransactionList

    +
    next_page: string

    The page token to be used to fetch the next page.

    +

    Memberof

    AddressTransactionList

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.AddressesApiInterface.html b/docs/interfaces/client_api.AddressesApiInterface.html index 2a577c81..0491ab9e 100644 --- a/docs/interfaces/client_api.AddressesApiInterface.html +++ b/docs/interfaces/client_api.AddressesApiInterface.html @@ -1,47 +1,72 @@ AddressesApiInterface | @coinbase/coinbase-sdk

    AddressesApi - interface

    Export

    AddressesApi

    -
    interface AddressesApiInterface {
        createAddress(walletId, createAddressRequest?, options?): AxiosPromise<Address>;
        getAddress(walletId, addressId, options?): AxiosPromise<Address>;
        getAddressBalance(walletId, addressId, assetId, options?): AxiosPromise<Balance>;
        listAddressBalances(walletId, addressId, page?, options?): AxiosPromise<AddressBalanceList>;
        listAddresses(walletId, limit?, page?, options?): AxiosPromise<AddressList>;
        requestFaucetFunds(walletId, addressId, options?): AxiosPromise<FaucetTransaction>;
    }

    Implemented by

    Methods

    interface AddressesApiInterface {
        createAddress(walletId, createAddressRequest?, options?): AxiosPromise<Address>;
        createPayloadSignature(walletId, addressId, createPayloadSignatureRequest?, options?): AxiosPromise<PayloadSignature>;
        getAddress(walletId, addressId, options?): AxiosPromise<Address>;
        getAddressBalance(walletId, addressId, assetId, options?): AxiosPromise<Balance>;
        getPayloadSignature(walletId, addressId, payloadSignatureId, options?): AxiosPromise<PayloadSignature>;
        listAddressBalances(walletId, addressId, page?, options?): AxiosPromise<AddressBalanceList>;
        listAddresses(walletId, limit?, page?, options?): AxiosPromise<AddressList>;
        listPayloadSignatures(walletId, addressId, limit?, page?, options?): AxiosPromise<PayloadSignatureList>;
        requestFaucetFunds(walletId, addressId, assetId?, options?): AxiosPromise<FaucetTransaction>;
    }

    Implemented by

    Methods

    • Create a new address scoped to the wallet.

      Parameters

      • walletId: string

        The ID of the wallet to create the address in.

      • Optional createAddressRequest: CreateAddressRequest
      • Optional options: RawAxiosRequestConfig

        Override http request option.

      Returns AxiosPromise<Address>

      Summary

      Create a new address

      Throws

      Memberof

      AddressesApiInterface

      -
    • Create a new payload signature with an address.

      +

      Parameters

      • walletId: string

        The ID of the wallet the address belongs to.

        +
      • addressId: string

        The onchain address of the address to sign the payload with.

        +
      • Optional createPayloadSignatureRequest: CreatePayloadSignatureRequest
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<PayloadSignature>

      Summary

      Create a new payload signature.

      +

      Throws

      Memberof

      AddressesApiInterface

      +
    • Get address

      Parameters

      • walletId: string

        The ID of the wallet the address belongs to.

      • addressId: string

        The onchain address of the address that is being fetched.

      • Optional options: RawAxiosRequestConfig

        Override http request option.

      Returns AxiosPromise<Address>

      Summary

      Get address by onchain address

      Throws

      Memberof

      AddressesApiInterface

      -
    • Get address balance

      Parameters

      • walletId: string

        The ID of the wallet to fetch the balance for

      • addressId: string

        The onchain address of the address that is being fetched.

      • assetId: string

        The symbol of the asset to fetch the balance for

      • Optional options: RawAxiosRequestConfig

        Override http request option.

      Returns AxiosPromise<Balance>

      Summary

      Get address balance for asset

      Throws

      Memberof

      AddressesApiInterface

      -
    • Get payload signature.

      +

      Parameters

      • walletId: string

        The ID of the wallet the address belongs to.

        +
      • addressId: string

        The onchain address of the address that signed the payload.

        +
      • payloadSignatureId: string

        The ID of the payload signature to fetch.

        +
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<PayloadSignature>

      Summary

      Get payload signature.

      +

      Throws

      Memberof

      AddressesApiInterface

      +
    • Get address balances

      Parameters

      • walletId: string

        The ID of the wallet to fetch the balances for

      • addressId: string

        The onchain address of the address that is being fetched.

      • Optional page: string

        A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

      • Optional options: RawAxiosRequestConfig

        Override http request option.

      Returns AxiosPromise<AddressBalanceList>

      Summary

      Get all balances for address

      Throws

      Memberof

      AddressesApiInterface

      -
    • List addresses in the wallet.

      Parameters

      • walletId: string

        The ID of the wallet whose addresses to fetch

      • Optional limit: number

        A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

      • Optional page: string

        A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

      • Optional options: RawAxiosRequestConfig

        Override http request option.

      Returns AxiosPromise<AddressList>

      Summary

      List addresses in a wallet.

      Throws

      Memberof

      AddressesApiInterface

      -
    • List payload signatures for an address.

      +

      Parameters

      • walletId: string

        The ID of the wallet the address belongs to.

        +
      • addressId: string

        The onchain address of the address whose payload signatures to fetch.

        +
      • Optional limit: number

        A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

        +
      • Optional page: string

        A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

        +
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<PayloadSignatureList>

      Summary

      List payload signatures for an address.

      +

      Throws

      Memberof

      AddressesApiInterface

      +
    • Request faucet funds to be sent to onchain address.

      Parameters

      • walletId: string

        The ID of the wallet the address belongs to.

      • addressId: string

        The onchain address of the address that is being fetched.

        +
      • Optional assetId: string

        The ID of the asset to transfer from the faucet.

      • Optional options: RawAxiosRequestConfig

        Override http request option.

      Returns AxiosPromise<FaucetTransaction>

      Summary

      Request faucet funds for onchain address.

      -

      Throws

      Memberof

      AddressesApiInterface

      -
    \ No newline at end of file +

    Deprecated

    Throws

    Memberof

    AddressesApiInterface

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.Asset.html b/docs/interfaces/client_api.Asset.html index be229af7..96d760b7 100644 --- a/docs/interfaces/client_api.Asset.html +++ b/docs/interfaces/client_api.Asset.html @@ -1,15 +1,15 @@ Asset | @coinbase/coinbase-sdk

    An asset onchain scoped to a particular network, e.g. ETH on base-sepolia, or the USDC ERC20 Token on ethereum-mainnet.

    Export

    Asset

    -
    interface Asset {
        asset_id: string;
        contract_address?: string;
        decimals?: number;
        network_id: string;
    }

    Properties

    interface Asset {
        asset_id: string;
        contract_address?: string;
        decimals?: number;
        network_id: string;
    }

    Properties

    asset_id: string

    The ID for the asset on the network

    Memberof

    Asset

    -
    contract_address?: string

    The optional contract address for the asset. This will be specified for smart contract-based assets, for example ERC20s.

    +
    contract_address?: string

    The optional contract address for the asset. This will be specified for smart contract-based assets, for example ERC20s.

    Memberof

    Asset

    -
    decimals?: number

    The number of decimals the asset supports. This is used to convert from atomic units to base units.

    +
    decimals?: number

    The number of decimals the asset supports. This is used to convert from atomic units to base units.

    Memberof

    Asset

    -
    network_id: string

    The ID of the blockchain network

    +
    network_id: string

    The ID of the blockchain network

    Memberof

    Asset

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.AssetsApiInterface.html b/docs/interfaces/client_api.AssetsApiInterface.html index 2d5cb27d..c90c66be 100644 --- a/docs/interfaces/client_api.AssetsApiInterface.html +++ b/docs/interfaces/client_api.AssetsApiInterface.html @@ -1,10 +1,10 @@ AssetsApiInterface | @coinbase/coinbase-sdk

    AssetsApi - interface

    Export

    AssetsApi

    -
    interface AssetsApiInterface {
        getAsset(networkId, assetId, options?): AxiosPromise<Asset>;
    }

    Implemented by

    Methods

    interface AssetsApiInterface {
        getAsset(networkId, assetId, options?): AxiosPromise<Asset>;
    }

    Implemented by

    Methods

    Methods

    • Get the asset for the specified asset ID.

      Parameters

      • networkId: string

        The ID of the blockchain network

        -
      • assetId: string

        The ID of the asset to fetch

        +
      • assetId: string

        The ID of the asset to fetch. This could be a symbol or an ERC20 contract address.

      • Optional options: RawAxiosRequestConfig

        Override http request option.

      Returns AxiosPromise<Asset>

      Summary

      Get the asset for the specified asset ID.

      Throws

      Memberof

      AssetsApiInterface

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.Balance.html b/docs/interfaces/client_api.Balance.html index 772794aa..865c6eca 100644 --- a/docs/interfaces/client_api.Balance.html +++ b/docs/interfaces/client_api.Balance.html @@ -1,8 +1,8 @@ Balance | @coinbase/coinbase-sdk

    The balance of an asset onchain

    Export

    Balance

    -
    interface Balance {
        amount: string;
        asset: Asset;
    }

    Properties

    interface Balance {
        amount: string;
        asset: Asset;
    }

    Properties

    Properties

    amount: string

    The amount in the atomic units of the asset

    Memberof

    Balance

    -
    asset: Asset

    Memberof

    Balance

    -
    \ No newline at end of file +
    asset: Asset

    Memberof

    Balance

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.BalanceHistoryApiInterface.html b/docs/interfaces/client_api.BalanceHistoryApiInterface.html new file mode 100644 index 00000000..adf43f1e --- /dev/null +++ b/docs/interfaces/client_api.BalanceHistoryApiInterface.html @@ -0,0 +1,13 @@ +BalanceHistoryApiInterface | @coinbase/coinbase-sdk

    BalanceHistoryApi - interface

    +

    Export

    BalanceHistoryApi

    +
    interface BalanceHistoryApiInterface {
        listAddressHistoricalBalance(networkId, addressId, assetId, limit?, page?, options?): AxiosPromise<AddressHistoricalBalanceList>;
    }

    Implemented by

    Methods

    • List the historical balance of an asset in a specific address.

      +

      Parameters

      • networkId: string

        The ID of the blockchain network

        +
      • addressId: string

        The ID of the address to fetch the historical balance for.

        +
      • assetId: string

        The symbol of the asset to fetch the historical balance for.

        +
      • Optional limit: number

        A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

        +
      • Optional page: string

        A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

        +
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<AddressHistoricalBalanceList>

      Summary

      Get address balance history for asset

      +

      Throws

      Memberof

      BalanceHistoryApiInterface

      +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.BroadcastContractInvocationRequest.html b/docs/interfaces/client_api.BroadcastContractInvocationRequest.html new file mode 100644 index 00000000..c85a6219 --- /dev/null +++ b/docs/interfaces/client_api.BroadcastContractInvocationRequest.html @@ -0,0 +1,5 @@ +BroadcastContractInvocationRequest | @coinbase/coinbase-sdk

    Interface BroadcastContractInvocationRequest

    Export

    BroadcastContractInvocationRequest

    +
    interface BroadcastContractInvocationRequest {
        signed_payload: string;
    }

    Properties

    Properties

    signed_payload: string

    The hex-encoded signed payload of the contract invocation

    +

    Memberof

    BroadcastContractInvocationRequest

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.BroadcastExternalTransaction200Response.html b/docs/interfaces/client_api.BroadcastExternalTransaction200Response.html new file mode 100644 index 00000000..7d567ba6 --- /dev/null +++ b/docs/interfaces/client_api.BroadcastExternalTransaction200Response.html @@ -0,0 +1,9 @@ +BroadcastExternalTransaction200Response | @coinbase/coinbase-sdk

    Interface BroadcastExternalTransaction200Response

    External Transaction Broadcast Response

    +

    Export

    BroadcastExternalTransaction200Response

    +
    interface BroadcastExternalTransaction200Response {
        transaction_hash: string;
        transaction_link?: string;
    }

    Properties

    transaction_hash: string

    The transaction hash

    +

    Memberof

    BroadcastExternalTransaction200Response

    +
    transaction_link?: string

    The link to view the transaction on a block explorer. This is optional and may not be present for all transactions.

    +

    Memberof

    BroadcastExternalTransaction200Response

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.BroadcastExternalTransactionRequest.html b/docs/interfaces/client_api.BroadcastExternalTransactionRequest.html new file mode 100644 index 00000000..ec372b77 --- /dev/null +++ b/docs/interfaces/client_api.BroadcastExternalTransactionRequest.html @@ -0,0 +1,5 @@ +BroadcastExternalTransactionRequest | @coinbase/coinbase-sdk

    Interface BroadcastExternalTransactionRequest

    Export

    BroadcastExternalTransactionRequest

    +
    interface BroadcastExternalTransactionRequest {
        signed_payload: string;
    }

    Properties

    Properties

    signed_payload: string

    The hex-encoded signed payload of the external address transaction.

    +

    Memberof

    BroadcastExternalTransactionRequest

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.BroadcastExternalTransferRequest.html b/docs/interfaces/client_api.BroadcastExternalTransferRequest.html new file mode 100644 index 00000000..87a2cf19 --- /dev/null +++ b/docs/interfaces/client_api.BroadcastExternalTransferRequest.html @@ -0,0 +1,5 @@ +BroadcastExternalTransferRequest | @coinbase/coinbase-sdk

    Export

    BroadcastExternalTransferRequest

    +
    interface BroadcastExternalTransferRequest {
        signed_payload: string;
    }

    Properties

    Properties

    signed_payload: string

    The hex-encoded signed payload of the external transfer

    +

    Memberof

    BroadcastExternalTransferRequest

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.BroadcastStakingOperationRequest.html b/docs/interfaces/client_api.BroadcastStakingOperationRequest.html new file mode 100644 index 00000000..cdc9a12e --- /dev/null +++ b/docs/interfaces/client_api.BroadcastStakingOperationRequest.html @@ -0,0 +1,8 @@ +BroadcastStakingOperationRequest | @coinbase/coinbase-sdk

    Export

    BroadcastStakingOperationRequest

    +
    interface BroadcastStakingOperationRequest {
        signed_payload: string;
        transaction_index: number;
    }

    Properties

    signed_payload: string

    The hex-encoded signed payload of the staking operation.

    +

    Memberof

    BroadcastStakingOperationRequest

    +
    transaction_index: number

    The index in the transaction array of the staking operation.

    +

    Memberof

    BroadcastStakingOperationRequest

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.BroadcastTradeRequest.html b/docs/interfaces/client_api.BroadcastTradeRequest.html index 6f3f821e..217210e5 100644 --- a/docs/interfaces/client_api.BroadcastTradeRequest.html +++ b/docs/interfaces/client_api.BroadcastTradeRequest.html @@ -1,8 +1,8 @@ BroadcastTradeRequest | @coinbase/coinbase-sdk

    Export

    BroadcastTradeRequest

    -
    interface BroadcastTradeRequest {
        approve_transaction_signed_payload?: string;
        signed_payload: string;
    }

    Properties

    interface BroadcastTradeRequest {
        approve_transaction_signed_payload?: string;
        signed_payload: string;
    }

    Properties

    approve_transaction_signed_payload?: string

    The hex-encoded signed payload of the approval transaction

    Memberof

    BroadcastTradeRequest

    -
    signed_payload: string

    The hex-encoded signed payload of the trade

    +
    signed_payload: string

    The hex-encoded signed payload of the trade

    Memberof

    BroadcastTradeRequest

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.BroadcastTransferRequest.html b/docs/interfaces/client_api.BroadcastTransferRequest.html index 9be97de7..41311ccc 100644 --- a/docs/interfaces/client_api.BroadcastTransferRequest.html +++ b/docs/interfaces/client_api.BroadcastTransferRequest.html @@ -1,5 +1,5 @@ BroadcastTransferRequest | @coinbase/coinbase-sdk

    Export

    BroadcastTransferRequest

    -
    interface BroadcastTransferRequest {
        signed_payload: string;
    }

    Properties

    interface BroadcastTransferRequest {
        signed_payload: string;
    }

    Properties

    Properties

    signed_payload: string

    The hex-encoded signed payload of the transfer

    Memberof

    BroadcastTransferRequest

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.BroadcastUserOperationRequest.html b/docs/interfaces/client_api.BroadcastUserOperationRequest.html new file mode 100644 index 00000000..cbce0613 --- /dev/null +++ b/docs/interfaces/client_api.BroadcastUserOperationRequest.html @@ -0,0 +1,5 @@ +BroadcastUserOperationRequest | @coinbase/coinbase-sdk

    Export

    BroadcastUserOperationRequest

    +
    interface BroadcastUserOperationRequest {
        signature: string;
    }

    Properties

    Properties

    signature: string

    The hex-encoded signature of the user operation.

    +

    Memberof

    BroadcastUserOperationRequest

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.BuildStakingOperationRequest.html b/docs/interfaces/client_api.BuildStakingOperationRequest.html index 2492ffaa..8e44aaf8 100644 --- a/docs/interfaces/client_api.BuildStakingOperationRequest.html +++ b/docs/interfaces/client_api.BuildStakingOperationRequest.html @@ -1,16 +1,17 @@ BuildStakingOperationRequest | @coinbase/coinbase-sdk

    Export

    BuildStakingOperationRequest

    -
    interface BuildStakingOperationRequest {
        action: string;
        address_id: string;
        asset_id: string;
        network_id: string;
        options: {
            [key: string]: string;
        };
    }

    Properties

    interface BuildStakingOperationRequest {
        action: string;
        address_id: string;
        asset_id: string;
        network_id: string;
        options: {
            [key: string]: string;
        };
    }

    Properties

    action: string

    The type of staking operation

    Memberof

    BuildStakingOperationRequest

    -
    address_id: string

    The onchain address from which the staking transaction originates and is responsible for signing the transaction.

    +
    address_id: string

    The onchain address from which the staking transaction originates and is responsible for signing the transaction.

    Memberof

    BuildStakingOperationRequest

    -
    asset_id: string

    The ID of the asset being staked

    +
    asset_id: string

    The ID of the asset being staked

    Memberof

    BuildStakingOperationRequest

    -
    network_id: string

    The ID of the blockchain network

    +
    network_id: string

    The ID of the blockchain network

    Memberof

    BuildStakingOperationRequest

    -
    options: {
        [key: string]: string;
    }

    Type declaration

    • [key: string]: string

    Memberof

    BuildStakingOperationRequest

    -
    \ No newline at end of file +
    options: {
        [key: string]: string;
    }

    Additional options for the staking operation.

    +

    Type declaration

    • [key: string]: string

    Memberof

    BuildStakingOperationRequest

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.Call.html b/docs/interfaces/client_api.Call.html new file mode 100644 index 00000000..35ce9aeb --- /dev/null +++ b/docs/interfaces/client_api.Call.html @@ -0,0 +1,12 @@ +Call | @coinbase/coinbase-sdk

    An action that will be bundled into a user operation.

    +

    Export

    Call

    +
    interface Call {
        data: string;
        to: string;
        value: string;
    }

    Properties

    Properties

    data: string

    The hex-encoded data to send with the call.

    +

    Memberof

    Call

    +
    to: string

    The address the call is interacting with.

    +

    Memberof

    Call

    +
    value: string

    The string-encoded integer value to send with the call.

    +

    Memberof

    Call

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.CompileSmartContractRequest.html b/docs/interfaces/client_api.CompileSmartContractRequest.html new file mode 100644 index 00000000..5cf45fd4 --- /dev/null +++ b/docs/interfaces/client_api.CompileSmartContractRequest.html @@ -0,0 +1,11 @@ +CompileSmartContractRequest | @coinbase/coinbase-sdk

    Export

    CompileSmartContractRequest

    +
    interface CompileSmartContractRequest {
        contract_name: string;
        solidity_compiler_version: string;
        solidity_input_json: string;
    }

    Properties

    contract_name: string

    The name of the contract to compile.

    +

    Memberof

    CompileSmartContractRequest

    +
    solidity_compiler_version: string

    The version of the Solidity compiler to use.

    +

    Memberof

    CompileSmartContractRequest

    +
    solidity_input_json: string

    The JSON input containing the Solidity code, dependencies, and compiler settings.

    +

    Memberof

    CompileSmartContractRequest

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.CompiledSmartContract.html b/docs/interfaces/client_api.CompiledSmartContract.html new file mode 100644 index 00000000..7ad7dd53 --- /dev/null +++ b/docs/interfaces/client_api.CompiledSmartContract.html @@ -0,0 +1,18 @@ +CompiledSmartContract | @coinbase/coinbase-sdk

    Represents a compiled smart contract that can be deployed onchain

    +

    Export

    CompiledSmartContract

    +
    interface CompiledSmartContract {
        abi?: string;
        compiled_smart_contract_id?: string;
        contract_creation_bytecode?: string;
        contract_name?: string;
        solidity_input_json?: string;
    }

    Properties

    abi?: string

    The JSON-encoded ABI of the contract

    +

    Memberof

    CompiledSmartContract

    +
    compiled_smart_contract_id?: string

    The unique identifier of the compiled smart contract.

    +

    Memberof

    CompiledSmartContract

    +
    contract_creation_bytecode?: string

    The contract creation bytecode which will be used with constructor arguments to deploy the contract

    +

    Memberof

    CompiledSmartContract

    +
    contract_name?: string

    The name of the smart contract to deploy

    +

    Memberof

    CompiledSmartContract

    +
    solidity_input_json?: string

    The JSON-encoded input for the Solidity compiler

    +

    Memberof

    CompiledSmartContract

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.ContractEvent.html b/docs/interfaces/client_api.ContractEvent.html new file mode 100644 index 00000000..277e0326 --- /dev/null +++ b/docs/interfaces/client_api.ContractEvent.html @@ -0,0 +1,42 @@ +ContractEvent | @coinbase/coinbase-sdk

    Represents a single decoded event emitted by a smart contract

    +

    Export

    ContractEvent

    +
    interface ContractEvent {
        block_height: number;
        block_time: string;
        contract_address: string;
        contract_name: string;
        data: string;
        event_index: number;
        event_name: string;
        four_bytes: string;
        network_id: string;
        protocol_name: string;
        sig: string;
        tx_hash: string;
        tx_index: number;
    }

    Properties

    block_height: number

    The block number in which the event was emitted

    +

    Memberof

    ContractEvent

    +
    block_time: string

    The timestamp of the block in which the event was emitted

    +

    Memberof

    ContractEvent

    +
    contract_address: string

    The EVM address of the smart contract

    +

    Memberof

    ContractEvent

    +
    contract_name: string

    The name of the specific contract within the project

    +

    Memberof

    ContractEvent

    +
    data: string

    The event data in a stringified format

    +

    Memberof

    ContractEvent

    +
    event_index: number

    The index of the event within the transaction

    +

    Memberof

    ContractEvent

    +
    event_name: string

    The name of the event emitted by the contract

    +

    Memberof

    ContractEvent

    +
    four_bytes: string

    The first four bytes of the Keccak hash of the event signature

    +

    Memberof

    ContractEvent

    +
    network_id: string

    The name of the blockchain network

    +

    Memberof

    ContractEvent

    +
    protocol_name: string

    The name of the blockchain project or protocol

    +

    Memberof

    ContractEvent

    +
    sig: string

    The signature of the event, including parameter types

    +

    Memberof

    ContractEvent

    +
    tx_hash: string

    The transaction hash in which the event was emitted

    +

    Memberof

    ContractEvent

    +
    tx_index: number

    The index of the transaction within the block

    +

    Memberof

    ContractEvent

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.ContractEventList.html b/docs/interfaces/client_api.ContractEventList.html new file mode 100644 index 00000000..328398f4 --- /dev/null +++ b/docs/interfaces/client_api.ContractEventList.html @@ -0,0 +1,12 @@ +ContractEventList | @coinbase/coinbase-sdk

    A list of contract events with pagination information

    +

    Export

    ContractEventList

    +
    interface ContractEventList {
        data: ContractEvent[];
        has_more: boolean;
        next_page: string;
    }

    Properties

    Properties

    An array of ContractEvent objects

    +

    Memberof

    ContractEventList

    +
    has_more: boolean

    True if this list has another page of items after this one that can be fetched

    +

    Memberof

    ContractEventList

    +
    next_page: string

    The page token to be used to fetch the next page

    +

    Memberof

    ContractEventList

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.ContractEventsApiInterface.html b/docs/interfaces/client_api.ContractEventsApiInterface.html new file mode 100644 index 00000000..14891706 --- /dev/null +++ b/docs/interfaces/client_api.ContractEventsApiInterface.html @@ -0,0 +1,16 @@ +ContractEventsApiInterface | @coinbase/coinbase-sdk

    ContractEventsApi - interface

    +

    Export

    ContractEventsApi

    +
    interface ContractEventsApiInterface {
        listContractEvents(networkId, protocolName, contractAddress, contractName, eventName, fromBlockHeight, toBlockHeight, nextPage?, options?): AxiosPromise<ContractEventList>;
    }

    Implemented by

    Methods

    • Retrieve events for a specific contract

      +

      Parameters

      • networkId: string

        Unique identifier for the blockchain network

        +
      • protocolName: string

        Case-sensitive name of the blockchain protocol

        +
      • contractAddress: string

        EVM address of the smart contract (42 characters, including &#39;0x&#39;, in lowercase)

        +
      • contractName: string

        Case-sensitive name of the specific contract within the project

        +
      • eventName: string

        Case-sensitive name of the event to filter for in the contract&#39;s logs

        +
      • fromBlockHeight: number

        Lower bound of the block range to query (inclusive)

        +
      • toBlockHeight: number

        Upper bound of the block range to query (inclusive)

        +
      • Optional nextPage: string

        Pagination token for retrieving the next set of results

        +
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<ContractEventList>

      Summary

      List contract events

      +

      Throws

      Memberof

      ContractEventsApiInterface

      +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.ContractInvocation.html b/docs/interfaces/client_api.ContractInvocation.html new file mode 100644 index 00000000..3f3f38d1 --- /dev/null +++ b/docs/interfaces/client_api.ContractInvocation.html @@ -0,0 +1,32 @@ +ContractInvocation | @coinbase/coinbase-sdk

    A contract invocation onchain.

    +

    Export

    ContractInvocation

    +
    interface ContractInvocation {
        abi?: string;
        address_id: string;
        amount: string;
        args: string;
        contract_address: string;
        contract_invocation_id: string;
        method: string;
        network_id: string;
        transaction: Transaction;
        wallet_id: string;
    }

    Properties

    abi?: string

    The JSON-encoded ABI of the contract.

    +

    Memberof

    ContractInvocation

    +
    address_id: string

    The onchain address of the address invoking the contract.

    +

    Memberof

    ContractInvocation

    +
    amount: string

    The amount to send to the contract for a payable method

    +

    Memberof

    ContractInvocation

    +
    args: string

    The JSON-encoded arguments to pass to the contract method. The keys should be the argument names and the values should be the argument values.

    +

    Memberof

    ContractInvocation

    +
    contract_address: string

    The onchain address of the contract.

    +

    Memberof

    ContractInvocation

    +
    contract_invocation_id: string

    The ID of the contract invocation.

    +

    Memberof

    ContractInvocation

    +
    method: string

    The method to be invoked on the contract.

    +

    Memberof

    ContractInvocation

    +
    network_id: string

    The ID of the blockchain network.

    +

    Memberof

    ContractInvocation

    +
    transaction: Transaction

    Memberof

    ContractInvocation

    +
    wallet_id: string

    The ID of the wallet that owns the address.

    +

    Memberof

    ContractInvocation

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.ContractInvocationList.html b/docs/interfaces/client_api.ContractInvocationList.html new file mode 100644 index 00000000..ec9ab342 --- /dev/null +++ b/docs/interfaces/client_api.ContractInvocationList.html @@ -0,0 +1,13 @@ +ContractInvocationList | @coinbase/coinbase-sdk

    Export

    ContractInvocationList

    +
    interface ContractInvocationList {
        data: ContractInvocation[];
        has_more: boolean;
        next_page: string;
        total_count: number;
    }

    Properties

    Memberof

    ContractInvocationList

    +
    has_more: boolean

    True if this list has another page of items after this one that can be fetched.

    +

    Memberof

    ContractInvocationList

    +
    next_page: string

    The page token to be used to fetch the next page.

    +

    Memberof

    ContractInvocationList

    +
    total_count: number

    The total number of contract invocations for the address in the wallet.

    +

    Memberof

    ContractInvocationList

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.ContractInvocationsApiInterface.html b/docs/interfaces/client_api.ContractInvocationsApiInterface.html new file mode 100644 index 00000000..6d870a74 --- /dev/null +++ b/docs/interfaces/client_api.ContractInvocationsApiInterface.html @@ -0,0 +1,35 @@ +ContractInvocationsApiInterface | @coinbase/coinbase-sdk

    ContractInvocationsApi - interface

    +

    Export

    ContractInvocationsApi

    +
    interface ContractInvocationsApiInterface {
        broadcastContractInvocation(walletId, addressId, contractInvocationId, broadcastContractInvocationRequest, options?): AxiosPromise<ContractInvocation>;
        createContractInvocation(walletId, addressId, createContractInvocationRequest, options?): AxiosPromise<ContractInvocation>;
        getContractInvocation(walletId, addressId, contractInvocationId, options?): AxiosPromise<ContractInvocation>;
        listContractInvocations(walletId, addressId, limit?, page?, options?): AxiosPromise<ContractInvocationList>;
    }

    Implemented by

    Methods

    • Broadcast a contract invocation.

      +

      Parameters

      • walletId: string

        The ID of the wallet the address belongs to.

        +
      • addressId: string

        The ID of the address the contract invocation belongs to.

        +
      • contractInvocationId: string

        The ID of the contract invocation to broadcast.

        +
      • broadcastContractInvocationRequest: BroadcastContractInvocationRequest
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<ContractInvocation>

      Summary

      Broadcast a contract invocation.

      +

      Throws

      Memberof

      ContractInvocationsApiInterface

      +
    • Create a new contract invocation.

      +

      Parameters

      • walletId: string

        The ID of the wallet the source address belongs to.

        +
      • addressId: string

        The ID of the address to invoke the contract from.

        +
      • createContractInvocationRequest: CreateContractInvocationRequest
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<ContractInvocation>

      Summary

      Create a new contract invocation for an address.

      +

      Throws

      Memberof

      ContractInvocationsApiInterface

      +
    • Get a contract invocation by ID.

      +

      Parameters

      • walletId: string

        The ID of the wallet the address belongs to.

        +
      • addressId: string

        The ID of the address the contract invocation belongs to.

        +
      • contractInvocationId: string

        The ID of the contract invocation to fetch.

        +
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<ContractInvocation>

      Summary

      Get a contract invocation by ID.

      +

      Throws

      Memberof

      ContractInvocationsApiInterface

      +
    • List contract invocations for an address.

      +

      Parameters

      • walletId: string

        The ID of the wallet the address belongs to.

        +
      • addressId: string

        The ID of the address to list contract invocations for.

        +
      • Optional limit: number

        A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

        +
      • Optional page: string

        A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

        +
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<ContractInvocationList>

      Summary

      List contract invocations for an address.

      +

      Throws

      Memberof

      ContractInvocationsApiInterface

      +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.CreateAddressRequest.html b/docs/interfaces/client_api.CreateAddressRequest.html index 7128bb67..2b4481b6 100644 --- a/docs/interfaces/client_api.CreateAddressRequest.html +++ b/docs/interfaces/client_api.CreateAddressRequest.html @@ -1,8 +1,11 @@ CreateAddressRequest | @coinbase/coinbase-sdk

    Export

    CreateAddressRequest

    -
    interface CreateAddressRequest {
        attestation?: string;
        public_key?: string;
    }

    Properties

    interface CreateAddressRequest {
        address_index?: number;
        attestation?: string;
        public_key?: string;
    }

    Properties

    attestation?: string

    An attestation signed by the private key that is associated with the wallet. The attestation will be a hex-encoded signature of a json payload with fields wallet_id and public_key, signed by the private key associated with the public_key set in the request.

    +

    Properties

    address_index?: number

    The index of the address within the wallet.

    Memberof

    CreateAddressRequest

    -
    public_key?: string

    The public key from which the address will be derived.

    +
    attestation?: string

    An attestation signed by the private key that is associated with the wallet. The attestation will be a hex-encoded signature of a json payload with fields wallet_id and public_key, signed by the private key associated with the public_key set in the request.

    Memberof

    CreateAddressRequest

    -
    \ No newline at end of file +
    public_key?: string

    The public key from which the address will be derived.

    +

    Memberof

    CreateAddressRequest

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.CreateContractInvocationRequest.html b/docs/interfaces/client_api.CreateContractInvocationRequest.html new file mode 100644 index 00000000..be29f065 --- /dev/null +++ b/docs/interfaces/client_api.CreateContractInvocationRequest.html @@ -0,0 +1,17 @@ +CreateContractInvocationRequest | @coinbase/coinbase-sdk

    Export

    CreateContractInvocationRequest

    +
    interface CreateContractInvocationRequest {
        abi?: string;
        amount?: string;
        args: string;
        contract_address: string;
        method: string;
    }

    Properties

    abi?: string

    The JSON-encoded ABI of the contract.

    +

    Memberof

    CreateContractInvocationRequest

    +
    amount?: string

    The amount in atomic units of the native asset to send to the contract for a payable method

    +

    Memberof

    CreateContractInvocationRequest

    +
    args: string

    The JSON-encoded arguments to pass to the contract method. The keys should be the argument names and the values should be the argument values.

    +

    Memberof

    CreateContractInvocationRequest

    +
    contract_address: string

    The address of the contract to invoke.

    +

    Memberof

    CreateContractInvocationRequest

    +
    method: string

    The method to invoke on the contract.

    +

    Memberof

    CreateContractInvocationRequest

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.CreateExternalTransferRequest.html b/docs/interfaces/client_api.CreateExternalTransferRequest.html new file mode 100644 index 00000000..8fbb5881 --- /dev/null +++ b/docs/interfaces/client_api.CreateExternalTransferRequest.html @@ -0,0 +1,17 @@ +CreateExternalTransferRequest | @coinbase/coinbase-sdk

    Export

    CreateExternalTransferRequest

    +
    interface CreateExternalTransferRequest {
        amount: string;
        asset_id: string;
        destination: string;
        gasless: boolean;
        skip_batching?: boolean;
    }

    Properties

    amount: string

    The amount to transfer

    +

    Memberof

    CreateExternalTransferRequest

    +
    asset_id: string

    The ID of the asset to transfer. Can be an asset symbol or a token contract address.

    +

    Memberof

    CreateExternalTransferRequest

    +
    destination: string

    The destination address, which can be a 0x address, Basename, or ENS name

    +

    Memberof

    CreateExternalTransferRequest

    +
    gasless: boolean

    Whether the transfer uses sponsored gas

    +

    Memberof

    CreateExternalTransferRequest

    +
    skip_batching?: boolean

    When true, the transfer will be submitted immediately. Otherwise, the transfer will be batched. Defaults to false. Note: Requires the gasless option to be set to true.

    +

    Memberof

    CreateExternalTransferRequest

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.CreateFundOperationRequest.html b/docs/interfaces/client_api.CreateFundOperationRequest.html new file mode 100644 index 00000000..534bde20 --- /dev/null +++ b/docs/interfaces/client_api.CreateFundOperationRequest.html @@ -0,0 +1,11 @@ +CreateFundOperationRequest | @coinbase/coinbase-sdk

    Export

    CreateFundOperationRequest

    +
    interface CreateFundOperationRequest {
        amount: string;
        asset_id: string;
        fund_quote_id?: string;
    }

    Properties

    amount: string

    The amount of the asset to fund the address with in atomic units.

    +

    Memberof

    CreateFundOperationRequest

    +
    asset_id: string

    The ID of the asset to fund the address with. Can be an asset symbol or a token contract address.

    +

    Memberof

    CreateFundOperationRequest

    +
    fund_quote_id?: string

    The Optional ID of the fund quote to fund the address with. If omitted we will generate a quote and immediately execute it.

    +

    Memberof

    CreateFundOperationRequest

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.CreateFundQuoteRequest.html b/docs/interfaces/client_api.CreateFundQuoteRequest.html new file mode 100644 index 00000000..d906a503 --- /dev/null +++ b/docs/interfaces/client_api.CreateFundQuoteRequest.html @@ -0,0 +1,8 @@ +CreateFundQuoteRequest | @coinbase/coinbase-sdk

    Export

    CreateFundQuoteRequest

    +
    interface CreateFundQuoteRequest {
        amount: string;
        asset_id: string;
    }

    Properties

    Properties

    amount: string

    The amount of the asset to fund the address with in atomic units.

    +

    Memberof

    CreateFundQuoteRequest

    +
    asset_id: string

    The ID of the asset to fund the address with. Can be an asset symbol alias or a token contract address.

    +

    Memberof

    CreateFundQuoteRequest

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.CreatePayloadSignatureRequest.html b/docs/interfaces/client_api.CreatePayloadSignatureRequest.html new file mode 100644 index 00000000..3e94864a --- /dev/null +++ b/docs/interfaces/client_api.CreatePayloadSignatureRequest.html @@ -0,0 +1,8 @@ +CreatePayloadSignatureRequest | @coinbase/coinbase-sdk

    Export

    CreatePayloadSignatureRequest

    +
    interface CreatePayloadSignatureRequest {
        signature?: string;
        unsigned_payload: string;
    }

    Properties

    signature?: string

    The signature of the payload.

    +

    Memberof

    CreatePayloadSignatureRequest

    +
    unsigned_payload: string

    The unsigned payload.

    +

    Memberof

    CreatePayloadSignatureRequest

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.CreateServerSignerRequest.html b/docs/interfaces/client_api.CreateServerSignerRequest.html index fcad76c0..f4af47cd 100644 --- a/docs/interfaces/client_api.CreateServerSignerRequest.html +++ b/docs/interfaces/client_api.CreateServerSignerRequest.html @@ -1,8 +1,11 @@ CreateServerSignerRequest | @coinbase/coinbase-sdk

    Export

    CreateServerSignerRequest

    -
    interface CreateServerSignerRequest {
        enrollment_data: string;
        server_signer_id: string;
    }

    Properties

    enrollment_data: string

    The enrollment data of the server signer. This will be the base64 encoded server-signer-id.

    +
    interface CreateServerSignerRequest {
        enrollment_data: string;
        is_mpc: boolean;
        server_signer_id?: string;
    }

    Properties

    enrollment_data: string

    The enrollment data of the server signer. This will be the base64 encoded server-signer-id for the 1 of 1 server signer.

    Memberof

    CreateServerSignerRequest

    -
    server_signer_id: string

    The ID of the server signer

    +
    is_mpc: boolean

    Whether the Server-Signer uses MPC.

    Memberof

    CreateServerSignerRequest

    -
    \ No newline at end of file +
    server_signer_id?: string

    The ID of the server signer for the 1 of 1 server signer.

    +

    Memberof

    CreateServerSignerRequest

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.CreateSmartContractRequest.html b/docs/interfaces/client_api.CreateSmartContractRequest.html new file mode 100644 index 00000000..97a30885 --- /dev/null +++ b/docs/interfaces/client_api.CreateSmartContractRequest.html @@ -0,0 +1,9 @@ +CreateSmartContractRequest | @coinbase/coinbase-sdk

    Export

    CreateSmartContractRequest

    +
    interface CreateSmartContractRequest {
        compiled_smart_contract_id?: string;
        options: SmartContractOptions;
        type: SmartContractType;
    }

    Properties

    compiled_smart_contract_id?: string

    The optional UUID of the compiled smart contract to deploy. This field is only required when SmartContractType is set to custom.

    +

    Memberof

    CreateSmartContractRequest

    +

    Memberof

    CreateSmartContractRequest

    +

    Memberof

    CreateSmartContractRequest

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.CreateSmartWalletRequest.html b/docs/interfaces/client_api.CreateSmartWalletRequest.html new file mode 100644 index 00000000..cb80588a --- /dev/null +++ b/docs/interfaces/client_api.CreateSmartWalletRequest.html @@ -0,0 +1,5 @@ +CreateSmartWalletRequest | @coinbase/coinbase-sdk

    Export

    CreateSmartWalletRequest

    +
    interface CreateSmartWalletRequest {
        owner: string;
    }

    Properties

    Properties

    owner: string

    The address of the owner of the smart wallet.

    +

    Memberof

    CreateSmartWalletRequest

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.CreateStakingOperationRequest.html b/docs/interfaces/client_api.CreateStakingOperationRequest.html new file mode 100644 index 00000000..f7409dc4 --- /dev/null +++ b/docs/interfaces/client_api.CreateStakingOperationRequest.html @@ -0,0 +1,14 @@ +CreateStakingOperationRequest | @coinbase/coinbase-sdk

    Export

    CreateStakingOperationRequest

    +
    interface CreateStakingOperationRequest {
        action: string;
        asset_id: string;
        network_id: string;
        options: {
            [key: string]: string;
        };
    }

    Properties

    action: string

    The type of staking operation.

    +

    Memberof

    CreateStakingOperationRequest

    +
    asset_id: string

    The ID of the asset being staked.

    +

    Memberof

    CreateStakingOperationRequest

    +
    network_id: string

    The ID of the blockchain network.

    +

    Memberof

    CreateStakingOperationRequest

    +
    options: {
        [key: string]: string;
    }

    Additional options for the staking operation.

    +

    Type declaration

    • [key: string]: string

    Memberof

    CreateStakingOperationRequest

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.CreateTradeRequest.html b/docs/interfaces/client_api.CreateTradeRequest.html index 45b9cd5f..91896881 100644 --- a/docs/interfaces/client_api.CreateTradeRequest.html +++ b/docs/interfaces/client_api.CreateTradeRequest.html @@ -1,11 +1,11 @@ CreateTradeRequest | @coinbase/coinbase-sdk

    Export

    CreateTradeRequest

    -
    interface CreateTradeRequest {
        amount: string;
        from_asset_id: string;
        to_asset_id: string;
    }

    Properties

    interface CreateTradeRequest {
        amount: string;
        from_asset_id: string;
        to_asset_id: string;
    }

    Properties

    amount: string

    The amount to trade

    Memberof

    CreateTradeRequest

    -
    from_asset_id: string

    The ID of the asset to trade

    +
    from_asset_id: string

    The ID of the asset to trade

    Memberof

    CreateTradeRequest

    -
    to_asset_id: string

    The ID of the asset to receive from the trade

    +
    to_asset_id: string

    The ID of the asset to receive from the trade

    Memberof

    CreateTradeRequest

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.CreateTransferRequest.html b/docs/interfaces/client_api.CreateTransferRequest.html index d3c9e381..bbc4d8aa 100644 --- a/docs/interfaces/client_api.CreateTransferRequest.html +++ b/docs/interfaces/client_api.CreateTransferRequest.html @@ -1,14 +1,20 @@ CreateTransferRequest | @coinbase/coinbase-sdk

    Export

    CreateTransferRequest

    -
    interface CreateTransferRequest {
        amount: string;
        asset_id: string;
        destination: string;
        network_id: string;
    }

    Properties

    interface CreateTransferRequest {
        amount: string;
        asset_id: string;
        destination: string;
        gasless?: boolean;
        network_id: string;
        skip_batching?: boolean;
    }

    Properties

    amount: string

    The amount to transfer

    Memberof

    CreateTransferRequest

    -
    asset_id: string

    The ID of the asset to transfer

    +
    asset_id: string

    The ID of the asset to transfer. Can be an asset symbol or a token contract address.

    Memberof

    CreateTransferRequest

    -
    destination: string

    The destination address

    +
    destination: string

    The destination address, which can be a 0x address, Basename, or ENS name

    Memberof

    CreateTransferRequest

    -
    network_id: string

    The ID of the blockchain network

    +
    gasless?: boolean

    Whether the transfer uses sponsored gas

    Memberof

    CreateTransferRequest

    -
    \ No newline at end of file +
    network_id: string

    The ID of the blockchain network

    +

    Memberof

    CreateTransferRequest

    +
    skip_batching?: boolean

    When true, the transfer will be submitted immediately. Otherwise, the transfer will be batched. Defaults to false

    +

    Memberof

    CreateTransferRequest

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.CreateUserOperationRequest.html b/docs/interfaces/client_api.CreateUserOperationRequest.html new file mode 100644 index 00000000..cfc4c74f --- /dev/null +++ b/docs/interfaces/client_api.CreateUserOperationRequest.html @@ -0,0 +1,8 @@ +CreateUserOperationRequest | @coinbase/coinbase-sdk

    Export

    CreateUserOperationRequest

    +
    interface CreateUserOperationRequest {
        calls: Call[];
        paymaster_url?: string;
    }

    Properties

    Properties

    calls: Call[]

    The list of calls to make from the smart wallet.

    +

    Memberof

    CreateUserOperationRequest

    +
    paymaster_url?: string

    The URL of the paymaster to use for the user operation.

    +

    Memberof

    CreateUserOperationRequest

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.CreateWalletRequest.html b/docs/interfaces/client_api.CreateWalletRequest.html index bcd0d151..faa9d894 100644 --- a/docs/interfaces/client_api.CreateWalletRequest.html +++ b/docs/interfaces/client_api.CreateWalletRequest.html @@ -1,4 +1,4 @@ CreateWalletRequest | @coinbase/coinbase-sdk

    Export

    CreateWalletRequest

    -
    interface CreateWalletRequest {
        wallet: CreateWalletRequestWallet;
    }

    Properties

    interface CreateWalletRequest {
        wallet: CreateWalletRequestWallet;
    }

    Properties

    Properties

    Memberof

    CreateWalletRequest

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.CreateWalletRequestWallet.html b/docs/interfaces/client_api.CreateWalletRequestWallet.html index d82dc207..a983f53b 100644 --- a/docs/interfaces/client_api.CreateWalletRequestWallet.html +++ b/docs/interfaces/client_api.CreateWalletRequestWallet.html @@ -1,9 +1,9 @@ CreateWalletRequestWallet | @coinbase/coinbase-sdk

    Parameters for configuring a wallet

    Export

    CreateWalletRequestWallet

    -
    interface CreateWalletRequestWallet {
        network_id: string;
        use_server_signer?: boolean;
    }

    Properties

    interface CreateWalletRequestWallet {
        network_id: string;
        use_server_signer?: boolean;
    }

    Properties

    network_id: string

    The ID of the blockchain network

    Memberof

    CreateWalletRequestWallet

    -
    use_server_signer?: boolean

    Whether the wallet should use the project's server signer or if the addresses in the wallets will belong to a private key the developer manages. Defaults to false.

    +
    use_server_signer?: boolean

    Whether the wallet should use the project's server signer or if the addresses in the wallets will belong to a private key the developer manages. Defaults to false.

    Memberof

    CreateWalletRequestWallet

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.CreateWalletWebhookRequest.html b/docs/interfaces/client_api.CreateWalletWebhookRequest.html new file mode 100644 index 00000000..5b461e50 --- /dev/null +++ b/docs/interfaces/client_api.CreateWalletWebhookRequest.html @@ -0,0 +1,8 @@ +CreateWalletWebhookRequest | @coinbase/coinbase-sdk

    Export

    CreateWalletWebhookRequest

    +
    interface CreateWalletWebhookRequest {
        notification_uri: string;
        signature_header?: string;
    }

    Properties

    notification_uri: string

    The URL to which the notifications will be sent.

    +

    Memberof

    CreateWalletWebhookRequest

    +
    signature_header?: string

    The custom header to be used for x-webhook-signature header on callbacks, so developers can verify the requests are coming from Coinbase.

    +

    Memberof

    CreateWalletWebhookRequest

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.CreateWebhookRequest.html b/docs/interfaces/client_api.CreateWebhookRequest.html new file mode 100644 index 00000000..300b89fa --- /dev/null +++ b/docs/interfaces/client_api.CreateWebhookRequest.html @@ -0,0 +1,18 @@ +CreateWebhookRequest | @coinbase/coinbase-sdk

    Export

    CreateWebhookRequest

    +
    interface CreateWebhookRequest {
        event_filters?: WebhookEventFilter[];
        event_type: WebhookEventType;
        event_type_filter?: WebhookEventTypeFilter;
        network_id: string;
        notification_uri: string;
        signature_header?: string;
    }

    Properties

    event_filters?: WebhookEventFilter[]

    Webhook will monitor all events that matches any one of the event filters.

    +

    Memberof

    CreateWebhookRequest

    +
    event_type: WebhookEventType

    Memberof

    CreateWebhookRequest

    +
    event_type_filter?: WebhookEventTypeFilter

    Memberof

    CreateWebhookRequest

    +
    network_id: string

    The ID of the blockchain network

    +

    Memberof

    CreateWebhookRequest

    +
    notification_uri: string

    The URL to which the notifications will be sent

    +

    Memberof

    CreateWebhookRequest

    +
    signature_header?: string

    The custom header to be used for x-webhook-signature header on callbacks, so developers can verify the requests are coming from Coinbase.

    +

    Memberof

    CreateWebhookRequest

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.CryptoAmount.html b/docs/interfaces/client_api.CryptoAmount.html new file mode 100644 index 00000000..f125d941 --- /dev/null +++ b/docs/interfaces/client_api.CryptoAmount.html @@ -0,0 +1,8 @@ +CryptoAmount | @coinbase/coinbase-sdk

    An amount in cryptocurrency

    +

    Export

    CryptoAmount

    +
    interface CryptoAmount {
        amount: string;
        asset: Asset;
    }

    Properties

    Properties

    amount: string

    The amount of the crypto in atomic units

    +

    Memberof

    CryptoAmount

    +
    asset: Asset

    Memberof

    CryptoAmount

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.DeploySmartContractRequest.html b/docs/interfaces/client_api.DeploySmartContractRequest.html new file mode 100644 index 00000000..53c19b1f --- /dev/null +++ b/docs/interfaces/client_api.DeploySmartContractRequest.html @@ -0,0 +1,5 @@ +DeploySmartContractRequest | @coinbase/coinbase-sdk

    Export

    DeploySmartContractRequest

    +
    interface DeploySmartContractRequest {
        signed_payload: string;
    }

    Properties

    Properties

    signed_payload: string

    The hex-encoded signed payload of the contract deployment transaction.

    +

    Memberof

    DeploySmartContractRequest

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.ERC20TransferEvent.html b/docs/interfaces/client_api.ERC20TransferEvent.html new file mode 100644 index 00000000..70d722e3 --- /dev/null +++ b/docs/interfaces/client_api.ERC20TransferEvent.html @@ -0,0 +1,42 @@ +ERC20TransferEvent | @coinbase/coinbase-sdk

    Represents an event triggered by an ERC-20 token transfer on the blockchain. Contains information about the transaction, block, and involved addresses.

    +

    Export

    ERC20TransferEvent

    +
    interface ERC20TransferEvent {
        blockHash?: string;
        blockNumber?: number;
        blockTime?: string;
        contractAddress?: string;
        eventType?: string;
        from?: string;
        logIndex?: number;
        network?: string;
        to?: string;
        transactionHash?: string;
        transactionIndex?: number;
        value?: string;
        webhookId?: string;
    }

    Properties

    blockHash?: string

    Hash of the block containing the transaction.

    +

    Memberof

    ERC20TransferEvent

    +
    blockNumber?: number

    Number of the block containing the transaction.

    +

    Memberof

    ERC20TransferEvent

    +
    blockTime?: string

    Timestamp when the block was mined.

    +

    Memberof

    ERC20TransferEvent

    +
    contractAddress?: string

    Address of the ERC-20 token contract.

    +

    Memberof

    ERC20TransferEvent

    +
    eventType?: string

    Type of event, in this case, an ERC-20 token transfer.

    +

    Memberof

    ERC20TransferEvent

    +
    from?: string

    Address of the sender in the token transfer.

    +

    Memberof

    ERC20TransferEvent

    +
    logIndex?: number

    Position of the event log within the transaction.

    +

    Memberof

    ERC20TransferEvent

    +
    network?: string

    Blockchain network where the event occurred.

    +

    Memberof

    ERC20TransferEvent

    +
    to?: string

    Address of the recipient in the token transfer.

    +

    Memberof

    ERC20TransferEvent

    +
    transactionHash?: string

    Hash of the transaction that triggered the event.

    +

    Memberof

    ERC20TransferEvent

    +
    transactionIndex?: number

    Position of the transaction within the block.

    +

    Memberof

    ERC20TransferEvent

    +
    value?: string

    Amount of tokens transferred, typically in the smallest unit (e.g., wei for Ethereum).

    +

    Memberof

    ERC20TransferEvent

    +
    webhookId?: string

    Unique identifier for the webhook that triggered this event.

    +

    Memberof

    ERC20TransferEvent

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.ERC721TransferEvent.html b/docs/interfaces/client_api.ERC721TransferEvent.html new file mode 100644 index 00000000..2be19ddb --- /dev/null +++ b/docs/interfaces/client_api.ERC721TransferEvent.html @@ -0,0 +1,42 @@ +ERC721TransferEvent | @coinbase/coinbase-sdk

    Represents an event triggered by an ERC-721 token transfer on the blockchain. Contains information about the transaction, block, and involved addresses.

    +

    Export

    ERC721TransferEvent

    +
    interface ERC721TransferEvent {
        blockHash?: string;
        blockNumber?: number;
        blockTime?: string;
        contractAddress?: string;
        eventType?: string;
        from?: string;
        logIndex?: number;
        network?: string;
        to?: string;
        tokenId?: string;
        transactionHash?: string;
        transactionIndex?: number;
        webhookId?: string;
    }

    Properties

    blockHash?: string

    Hash of the block containing the transaction.

    +

    Memberof

    ERC721TransferEvent

    +
    blockNumber?: number

    Number of the block containing the transaction.

    +

    Memberof

    ERC721TransferEvent

    +
    blockTime?: string

    Timestamp when the block was mined.

    +

    Memberof

    ERC721TransferEvent

    +
    contractAddress?: string

    Address of the ERC-721 token contract.

    +

    Memberof

    ERC721TransferEvent

    +
    eventType?: string

    Type of event, in this case, an ERC-721 token transfer.

    +

    Memberof

    ERC721TransferEvent

    +
    from?: string

    Address of the sender in the token transfer.

    +

    Memberof

    ERC721TransferEvent

    +
    logIndex?: number

    Position of the event log within the transaction.

    +

    Memberof

    ERC721TransferEvent

    +
    network?: string

    Blockchain network where the event occurred.

    +

    Memberof

    ERC721TransferEvent

    +
    to?: string

    Address of the recipient in the token transfer.

    +

    Memberof

    ERC721TransferEvent

    +
    tokenId?: string

    Unique identifier of the NFT being transferred.

    +

    Memberof

    ERC721TransferEvent

    +
    transactionHash?: string

    Hash of the transaction that triggered the event.

    +

    Memberof

    ERC721TransferEvent

    +
    transactionIndex?: number

    Position of the transaction within the block.

    +

    Memberof

    ERC721TransferEvent

    +
    webhookId?: string

    Unique identifier for the webhook that triggered this event.

    +

    Memberof

    ERC721TransferEvent

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.EthereumTokenTransfer.html b/docs/interfaces/client_api.EthereumTokenTransfer.html new file mode 100644 index 00000000..37838c34 --- /dev/null +++ b/docs/interfaces/client_api.EthereumTokenTransfer.html @@ -0,0 +1,18 @@ +EthereumTokenTransfer | @coinbase/coinbase-sdk

    Export

    EthereumTokenTransfer

    +
    interface EthereumTokenTransfer {
        contract_address: string;
        from_address: string;
        log_index: number;
        to_address: string;
        token_id?: string;
        token_transfer_type: TokenTransferType;
        value?: string;
    }

    Properties

    contract_address: string

    Memberof

    EthereumTokenTransfer

    +
    from_address: string

    Memberof

    EthereumTokenTransfer

    +
    log_index: number

    Memberof

    EthereumTokenTransfer

    +
    to_address: string

    Memberof

    EthereumTokenTransfer

    +
    token_id?: string

    The ID of ERC721 or ERC1155 token being transferred.

    +

    Memberof

    EthereumTokenTransfer

    +
    token_transfer_type: TokenTransferType

    Memberof

    EthereumTokenTransfer

    +
    value?: string

    The value of the transaction in atomic units of the token being transfer for ERC20 or ERC1155 contracts.

    +

    Memberof

    EthereumTokenTransfer

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.EthereumTransaction.html b/docs/interfaces/client_api.EthereumTransaction.html new file mode 100644 index 00000000..a910499a --- /dev/null +++ b/docs/interfaces/client_api.EthereumTransaction.html @@ -0,0 +1,58 @@ +EthereumTransaction | @coinbase/coinbase-sdk

    Export

    EthereumTransaction

    +
    interface EthereumTransaction {
        block_timestamp?: string;
        flattened_traces?: EthereumTransactionFlattenedTrace[];
        from: string;
        gas?: number;
        gas_price?: number;
        hash?: string;
        index?: number;
        input?: string;
        max_fee_per_gas?: number;
        max_priority_fee_per_gas?: number;
        mint?: string;
        nonce?: number;
        priority_fee_per_gas?: number;
        receipt?: TransactionReceipt;
        rlp_encoded_tx?: string;
        to: string;
        token_transfers?: EthereumTokenTransfer[];
        transaction_access_list?: EthereumTransactionAccessList;
        type?: number;
        value?: string;
    }

    Properties

    block_timestamp?: string

    The timestamp of the block in which the event was emitted

    +

    Memberof

    EthereumTransaction

    +

    Memberof

    EthereumTransaction

    +
    from: string

    The onchain address of the sender.

    +

    Memberof

    EthereumTransaction

    +
    gas?: number

    The amount of gas spent in the transaction.

    +

    Memberof

    EthereumTransaction

    +
    gas_price?: number

    The price per gas spent in the transaction in atomic units of the native asset.

    +

    Memberof

    EthereumTransaction

    +
    hash?: string

    The hash of the transaction as a hexadecimal string, prefixed with 0x.

    +

    Memberof

    EthereumTransaction

    +
    index?: number

    The index of the transaction in the block.

    +

    Memberof

    EthereumTransaction

    +
    input?: string

    The input data of the transaction.

    +

    Memberof

    EthereumTransaction

    +
    max_fee_per_gas?: number

    The max fee per gas as defined in EIP-1559. https://eips.ethereum.org/EIPS/eip-1559 for more details.

    +

    Memberof

    EthereumTransaction

    +
    max_priority_fee_per_gas?: number

    The max priority fee per gas as defined in EIP-1559. https://eips.ethereum.org/EIPS/eip-1559 for more details.

    +

    Memberof

    EthereumTransaction

    +
    mint?: string

    This is for handling optimism rollup specific EIP-2718 transaction type field.

    +

    Memberof

    EthereumTransaction

    +
    nonce?: number

    The nonce of the transaction in the source address.

    +

    Memberof

    EthereumTransaction

    +
    priority_fee_per_gas?: number

    The confirmed priority fee per gas as defined in EIP-1559. https://eips.ethereum.org/EIPS/eip-1559 for more details.

    +

    Memberof

    EthereumTransaction

    +

    Memberof

    EthereumTransaction

    +
    rlp_encoded_tx?: string

    RLP encoded transaction as a hex string (prefixed with 0x) for native compatibility with popular eth clients such as etherjs, viem etc.

    +

    Memberof

    EthereumTransaction

    +
    to: string

    The onchain address of the receiver.

    +

    Memberof

    EthereumTransaction

    +
    token_transfers?: EthereumTokenTransfer[]

    Memberof

    EthereumTransaction

    +
    transaction_access_list?: EthereumTransactionAccessList

    Memberof

    EthereumTransaction

    +
    type?: number

    The EIP-2718 transaction type. See https://eips.ethereum.org/EIPS/eip-2718 for more details.

    +

    Memberof

    EthereumTransaction

    +
    value?: string

    The value of the transaction in atomic units of the native asset.

    +

    Memberof

    EthereumTransaction

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.EthereumTransactionAccess.html b/docs/interfaces/client_api.EthereumTransactionAccess.html new file mode 100644 index 00000000..ca1ef79c --- /dev/null +++ b/docs/interfaces/client_api.EthereumTransactionAccess.html @@ -0,0 +1,6 @@ +EthereumTransactionAccess | @coinbase/coinbase-sdk

    Export

    EthereumTransactionAccess

    +
    interface EthereumTransactionAccess {
        address?: string;
        storage_keys?: string[];
    }

    Properties

    Properties

    address?: string

    Memberof

    EthereumTransactionAccess

    +
    storage_keys?: string[]

    Memberof

    EthereumTransactionAccess

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.EthereumTransactionAccessList.html b/docs/interfaces/client_api.EthereumTransactionAccessList.html new file mode 100644 index 00000000..13636a74 --- /dev/null +++ b/docs/interfaces/client_api.EthereumTransactionAccessList.html @@ -0,0 +1,4 @@ +EthereumTransactionAccessList | @coinbase/coinbase-sdk

    Export

    EthereumTransactionAccessList

    +
    interface EthereumTransactionAccessList {
        access_list?: EthereumTransactionAccess[];
    }

    Properties

    Properties

    Memberof

    EthereumTransactionAccessList

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.EthereumTransactionFlattenedTrace.html b/docs/interfaces/client_api.EthereumTransactionFlattenedTrace.html new file mode 100644 index 00000000..527f80bc --- /dev/null +++ b/docs/interfaces/client_api.EthereumTransactionFlattenedTrace.html @@ -0,0 +1,40 @@ +EthereumTransactionFlattenedTrace | @coinbase/coinbase-sdk

    Export

    EthereumTransactionFlattenedTrace

    +
    interface EthereumTransactionFlattenedTrace {
        block_hash?: string;
        block_number?: number;
        call_type?: string;
        error?: string;
        from?: string;
        gas?: number;
        gas_used?: number;
        input?: string;
        output?: string;
        status?: number;
        sub_traces?: number;
        to?: string;
        trace_address?: number[];
        trace_id?: string;
        trace_type?: string;
        transaction_hash?: string;
        transaction_index?: number;
        type?: string;
        value?: string;
    }

    Properties

    block_hash?: string

    Memberof

    EthereumTransactionFlattenedTrace

    +
    block_number?: number

    Memberof

    EthereumTransactionFlattenedTrace

    +
    call_type?: string

    Memberof

    EthereumTransactionFlattenedTrace

    +
    error?: string

    Memberof

    EthereumTransactionFlattenedTrace

    +
    from?: string

    Memberof

    EthereumTransactionFlattenedTrace

    +
    gas?: number

    Memberof

    EthereumTransactionFlattenedTrace

    +
    gas_used?: number

    Memberof

    EthereumTransactionFlattenedTrace

    +
    input?: string

    Memberof

    EthereumTransactionFlattenedTrace

    +
    output?: string

    Memberof

    EthereumTransactionFlattenedTrace

    +
    status?: number

    Memberof

    EthereumTransactionFlattenedTrace

    +
    sub_traces?: number

    Memberof

    EthereumTransactionFlattenedTrace

    +
    to?: string

    Memberof

    EthereumTransactionFlattenedTrace

    +
    trace_address?: number[]

    Memberof

    EthereumTransactionFlattenedTrace

    +
    trace_id?: string

    Memberof

    EthereumTransactionFlattenedTrace

    +
    trace_type?: string

    Memberof

    EthereumTransactionFlattenedTrace

    +
    transaction_hash?: string

    Memberof

    EthereumTransactionFlattenedTrace

    +
    transaction_index?: number

    Memberof

    EthereumTransactionFlattenedTrace

    +
    type?: string

    Memberof

    EthereumTransactionFlattenedTrace

    +
    value?: string

    Memberof

    EthereumTransactionFlattenedTrace

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.EthereumValidatorMetadata.html b/docs/interfaces/client_api.EthereumValidatorMetadata.html new file mode 100644 index 00000000..bcd41171 --- /dev/null +++ b/docs/interfaces/client_api.EthereumValidatorMetadata.html @@ -0,0 +1,37 @@ +EthereumValidatorMetadata | @coinbase/coinbase-sdk

    An Ethereum validator.

    +

    Export

    EthereumValidatorMetadata

    +
    interface EthereumValidatorMetadata {
        activationEpoch: string;
        balance: Balance;
        effective_balance: Balance;
        exitEpoch: string;
        fee_recipient_address: string;
        forwarded_fee_recipient_address?: string;
        index: string;
        public_key: string;
        slashed: boolean;
        withdrawableEpoch: string;
        withdrawal_address: string;
        withdrawal_credentials: string;
    }

    Properties

    activationEpoch: string

    The epoch at which the validator was activated.

    +

    Memberof

    EthereumValidatorMetadata

    +
    balance: Balance

    Memberof

    EthereumValidatorMetadata

    +
    effective_balance: Balance

    Memberof

    EthereumValidatorMetadata

    +
    exitEpoch: string

    The epoch at which the validator exited.

    +

    Memberof

    EthereumValidatorMetadata

    +
    fee_recipient_address: string

    The address for execution layer rewards (MEV & tx fees). If using a reward splitter plan, this is a smart contract address that splits rewards based on defined commissions and send a portion to the forwarded_fee_recipient_address.

    +

    Memberof

    EthereumValidatorMetadata

    +
    forwarded_fee_recipient_address?: string

    If using a reward splitter plan, this address receives a defined percentage of the total execution layer rewards.

    +

    Memberof

    EthereumValidatorMetadata

    +
    index: string

    The index of the validator in the validator set.

    +

    Memberof

    EthereumValidatorMetadata

    +
    public_key: string

    The public key of the validator.

    +

    Memberof

    EthereumValidatorMetadata

    +
    slashed: boolean

    Whether the validator has been slashed.

    +

    Memberof

    EthereumValidatorMetadata

    +
    withdrawableEpoch: string

    The epoch at which the validator can withdraw.

    +

    Memberof

    EthereumValidatorMetadata

    +
    withdrawal_address: string

    The 20-byte address to which the validator's rewards are sent.

    +

    Memberof

    EthereumValidatorMetadata

    +
    withdrawal_credentials: string

    The 32-byte field that determines where and how a validator’s staked ETH and rewards can be withdrawn.

    +

    Memberof

    EthereumValidatorMetadata

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.ExternalAddressesApiInterface.html b/docs/interfaces/client_api.ExternalAddressesApiInterface.html index 2b913cfe..d182159f 100644 --- a/docs/interfaces/client_api.ExternalAddressesApiInterface.html +++ b/docs/interfaces/client_api.ExternalAddressesApiInterface.html @@ -1,26 +1,66 @@ ExternalAddressesApiInterface | @coinbase/coinbase-sdk

    ExternalAddressesApi - interface

    Export

    ExternalAddressesApi

    -
    interface ExternalAddressesApiInterface {
        getExternalAddressBalance(networkId, addressId, assetId, options?): AxiosPromise<Balance>;
        listExternalAddressBalances(networkId, addressId, page?, options?): AxiosPromise<AddressBalanceList>;
        requestExternalFaucetFunds(networkId, addressId, options?): AxiosPromise<FaucetTransaction>;
    }

    Implemented by

    Methods

    interface ExternalAddressesApiInterface {
        broadcastExternalTransaction(networkId, addressId, broadcastExternalTransactionRequest, options?): AxiosPromise<BroadcastExternalTransaction200Response>;
        broadcastExternalTransfer(networkId, addressId, transferId, broadcastExternalTransferRequest, options?): AxiosPromise<Transfer>;
        createExternalTransfer(networkId, addressId, createExternalTransferRequest, options?): AxiosPromise<Transfer>;
        getExternalAddressBalance(networkId, addressId, assetId, options?): AxiosPromise<Balance>;
        getExternalTransfer(networkId, addressId, transferId, options?): AxiosPromise<Transfer>;
        getFaucetTransaction(networkId, addressId, txHash, options?): AxiosPromise<FaucetTransaction>;
        listExternalAddressBalances(networkId, addressId, page?, options?): AxiosPromise<AddressBalanceList>;
        requestExternalFaucetFunds(networkId, addressId, assetId?, skipWait?, options?): AxiosPromise<FaucetTransaction>;
    }

    Implemented by

    Methods

    • Get the balance of an asset in an external address

      +

    Methods

    • Broadcast an arbitrary transaction to the node constructed and signed by an external address.

      +

      Parameters

      • networkId: string

        The ID of the network the external address belongs to.

        +
      • addressId: string

        The onchain address of the transaction sender.

        +
      • broadcastExternalTransactionRequest: BroadcastExternalTransactionRequest
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<BroadcastExternalTransaction200Response>

      Summary

      Broadcast an arbitrary transaction.

      +

      Throws

      Memberof

      ExternalAddressesApiInterface

      +
    • Broadcast an external address's transfer with a signed payload

      +

      Parameters

      • networkId: string

        The ID of the network the address belongs to

        +
      • addressId: string

        The ID of the address the transfer belongs to

        +
      • transferId: string

        The ID of the transfer to broadcast

        +
      • broadcastExternalTransferRequest: BroadcastExternalTransferRequest
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<Transfer>

      Summary

      Broadcast an external address' transfer

      +

      Throws

      Memberof

      ExternalAddressesApiInterface

      +
    • Create a new transfer between addresses.

      +

      Parameters

      • networkId: string

        The ID of the network the address is on

        +
      • addressId: string

        The ID of the address to transfer from

        +
      • createExternalTransferRequest: CreateExternalTransferRequest
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<Transfer>

      Summary

      Create a new transfer

      +

      Throws

      Memberof

      ExternalAddressesApiInterface

      +
    • Get the balance of an asset in an external address

      Parameters

      • networkId: string

        The ID of the blockchain network

      • addressId: string

        The ID of the address to fetch the balance for

      • assetId: string

        The ID of the asset to fetch the balance for

      • Optional options: RawAxiosRequestConfig

        Override http request option.

      Returns AxiosPromise<Balance>

      Summary

      Get the balance of an asset in an external address

      Throws

      Memberof

      ExternalAddressesApiInterface

      -
    • Get an external address' transfer by ID

      +

      Parameters

      • networkId: string

        The ID of the network the address is on

        +
      • addressId: string

        The ID of the address the transfer belongs to

        +
      • transferId: string

        The ID of the transfer to fetch

        +
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<Transfer>

      Summary

      Get a external address' transfer

      +

      Throws

      Memberof

      ExternalAddressesApiInterface

      +
    • Get the status of a faucet transaction

      +

      Parameters

      • networkId: string

        The ID of the blockchain network

        +
      • addressId: string

        The ID of the address to fetch the faucet transaction for

        +
      • txHash: string

        The hash of the faucet transaction

        +
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<FaucetTransaction>

      Summary

      Get the status of a faucet transaction

      +

      Throws

      Memberof

      ExternalAddressesApiInterface

      +
    • List all of the balances of an external address

      Parameters

      • networkId: string

        The ID of the blockchain network

      • addressId: string

        The ID of the address to fetch the balance for

      • Optional page: string

        A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

      • Optional options: RawAxiosRequestConfig

        Override http request option.

      Returns AxiosPromise<AddressBalanceList>

      Summary

      Get the balances of an external address

      Throws

      Memberof

      ExternalAddressesApiInterface

      -
    • Request faucet funds to be sent to external address.

      Parameters

      • networkId: string

        The ID of the wallet the address belongs to.

      • addressId: string

        The onchain address of the address that is being fetched.

        +
      • Optional assetId: string

        The ID of the asset to transfer from the faucet.

        +
      • Optional skipWait: boolean

        Whether to skip waiting for the transaction to be mined. This will become the default behavior in the future.

      • Optional options: RawAxiosRequestConfig

        Override http request option.

      Returns AxiosPromise<FaucetTransaction>

      Summary

      Request faucet funds for external address.

      Throws

      Memberof

      ExternalAddressesApiInterface

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.FaucetTransaction.html b/docs/interfaces/client_api.FaucetTransaction.html index 64035fbf..69b2d8de 100644 --- a/docs/interfaces/client_api.FaucetTransaction.html +++ b/docs/interfaces/client_api.FaucetTransaction.html @@ -1,9 +1,11 @@ FaucetTransaction | @coinbase/coinbase-sdk

    The faucet transaction

    Export

    FaucetTransaction

    -
    interface FaucetTransaction {
        transaction_hash: string;
        transaction_link: string;
    }

    Properties

    interface FaucetTransaction {
        transaction: Transaction;
        transaction_hash: string;
        transaction_link: string;
    }

    Properties

    transaction_hash: string

    The transaction hash of the transaction the faucet created.

    +

    Properties

    transaction: Transaction

    Memberof

    FaucetTransaction

    +
    transaction_hash: string

    The transaction hash of the transaction the faucet created.

    Memberof

    FaucetTransaction

    -
    transaction_link: string

    Link to the transaction on the blockchain explorer.

    +
    transaction_link: string

    Link to the transaction on the blockchain explorer.

    Memberof

    FaucetTransaction

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.FeatureSet.html b/docs/interfaces/client_api.FeatureSet.html new file mode 100644 index 00000000..cd061e77 --- /dev/null +++ b/docs/interfaces/client_api.FeatureSet.html @@ -0,0 +1,20 @@ +FeatureSet | @coinbase/coinbase-sdk

    Export

    FeatureSet

    +
    interface FeatureSet {
        faucet: boolean;
        gasless_send: boolean;
        server_signer: boolean;
        stake: boolean;
        trade: boolean;
        transfer: boolean;
    }

    Properties

    faucet: boolean

    Whether the network supports a faucet

    +

    Memberof

    FeatureSet

    +
    gasless_send: boolean

    Whether the network supports gasless sends

    +

    Memberof

    FeatureSet

    +
    server_signer: boolean

    Whether the network supports Server-Signers

    +

    Memberof

    FeatureSet

    +
    stake: boolean

    Whether the network supports staking

    +

    Memberof

    FeatureSet

    +
    trade: boolean

    Whether the network supports trading

    +

    Memberof

    FeatureSet

    +
    transfer: boolean

    Whether the network supports transfers

    +

    Memberof

    FeatureSet

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.FetchHistoricalStakingBalances200Response.html b/docs/interfaces/client_api.FetchHistoricalStakingBalances200Response.html new file mode 100644 index 00000000..edfe15f0 --- /dev/null +++ b/docs/interfaces/client_api.FetchHistoricalStakingBalances200Response.html @@ -0,0 +1,10 @@ +FetchHistoricalStakingBalances200Response | @coinbase/coinbase-sdk

    Interface FetchHistoricalStakingBalances200Response

    Export

    FetchHistoricalStakingBalances200Response

    +
    interface FetchHistoricalStakingBalances200Response {
        data: StakingBalance[];
        has_more: boolean;
        next_page: string;
    }

    Properties

    Properties

    Memberof

    FetchHistoricalStakingBalances200Response

    +
    has_more: boolean

    True if this list has another page of items after this one that can be fetched.

    +

    Memberof

    FetchHistoricalStakingBalances200Response

    +
    next_page: string

    The page token to be used to fetch the next page.

    +

    Memberof

    FetchHistoricalStakingBalances200Response

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.FetchStakingRewards200Response.html b/docs/interfaces/client_api.FetchStakingRewards200Response.html index bb3b72d4..5d0ddb84 100644 --- a/docs/interfaces/client_api.FetchStakingRewards200Response.html +++ b/docs/interfaces/client_api.FetchStakingRewards200Response.html @@ -1,10 +1,10 @@ FetchStakingRewards200Response | @coinbase/coinbase-sdk

    Export

    FetchStakingRewards200Response

    -
    interface FetchStakingRewards200Response {
        data: StakingReward[];
        has_more: boolean;
        next_page: string;
    }

    Properties

    interface FetchStakingRewards200Response {
        data: StakingReward[];
        has_more: boolean;
        next_page: string;
    }

    Properties

    Memberof

    FetchStakingRewards200Response

    -
    has_more: boolean

    True if this list has another page of items after this one that can be fetched.

    +
    has_more: boolean

    True if this list has another page of items after this one that can be fetched.

    Memberof

    FetchStakingRewards200Response

    -
    next_page: string

    The page token to be used to fetch the next page.

    +
    next_page: string

    The page token to be used to fetch the next page.

    Memberof

    FetchStakingRewards200Response

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.FetchStakingRewardsRequest.html b/docs/interfaces/client_api.FetchStakingRewardsRequest.html index 4c4fbc84..0ced24c6 100644 --- a/docs/interfaces/client_api.FetchStakingRewardsRequest.html +++ b/docs/interfaces/client_api.FetchStakingRewardsRequest.html @@ -1,5 +1,5 @@ FetchStakingRewardsRequest | @coinbase/coinbase-sdk

    Export

    FetchStakingRewardsRequest

    -
    interface FetchStakingRewardsRequest {
        address_ids: string[];
        asset_id: string;
        end_time: string;
        format: FetchStakingRewardsRequestFormatEnum;
        network_id: string;
        start_time: string;
    }

    Properties

    interface FetchStakingRewardsRequest {
        address_ids: string[];
        asset_id: string;
        end_time: string;
        format: StakingRewardFormat;
        network_id: string;
        start_time: string;
    }

    Properties

    Properties

    address_ids: string[]

    The onchain addresses for which the staking rewards are being fetched

    Memberof

    FetchStakingRewardsRequest

    -
    asset_id: string

    The ID of the asset for which the staking rewards are being fetched

    +
    asset_id: string

    The ID of the asset for which the staking rewards are being fetched

    Memberof

    FetchStakingRewardsRequest

    -
    end_time: string

    The end time of this reward period

    +
    end_time: string

    The end time of this reward period

    Memberof

    FetchStakingRewardsRequest

    -

    The format in which the rewards are to be fetched i.e native or in equivalent USD

    +

    Memberof

    FetchStakingRewardsRequest

    +
    network_id: string

    The ID of the blockchain network

    Memberof

    FetchStakingRewardsRequest

    -
    network_id: string

    The ID of the blockchain network

    +
    start_time: string

    The start time of this reward period

    Memberof

    FetchStakingRewardsRequest

    -
    start_time: string

    The start time of this reward period

    -

    Memberof

    FetchStakingRewardsRequest

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.FiatAmount.html b/docs/interfaces/client_api.FiatAmount.html new file mode 100644 index 00000000..709fb090 --- /dev/null +++ b/docs/interfaces/client_api.FiatAmount.html @@ -0,0 +1,9 @@ +FiatAmount | @coinbase/coinbase-sdk

    An amount in fiat currency

    +

    Export

    FiatAmount

    +
    interface FiatAmount {
        amount: string;
        currency: string;
    }

    Properties

    Properties

    amount: string

    The amount of the fiat in whole units.

    +

    Memberof

    FiatAmount

    +
    currency: string

    The currency of the fiat

    +

    Memberof

    FiatAmount

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.FundApiInterface.html b/docs/interfaces/client_api.FundApiInterface.html new file mode 100644 index 00000000..10a90a99 --- /dev/null +++ b/docs/interfaces/client_api.FundApiInterface.html @@ -0,0 +1,34 @@ +FundApiInterface | @coinbase/coinbase-sdk

    FundApi - interface

    +

    Export

    FundApi

    +
    interface FundApiInterface {
        createFundOperation(walletId, addressId, createFundOperationRequest, options?): AxiosPromise<FundOperation>;
        createFundQuote(walletId, addressId, createFundQuoteRequest, options?): AxiosPromise<FundQuote>;
        getFundOperation(walletId, addressId, fundOperationId, options?): AxiosPromise<FundOperation>;
        listFundOperations(walletId, addressId, limit?, page?, options?): AxiosPromise<FundOperationList>;
    }

    Implemented by

    Methods

    • Create a new fund operation with an address.

      +

      Parameters

      • walletId: string

        The ID of the wallet the address belongs to.

        +
      • addressId: string

        The onchain address to be funded.

        +
      • createFundOperationRequest: CreateFundOperationRequest
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<FundOperation>

      Summary

      Create a new fund operation.

      +

      Throws

      Memberof

      FundApiInterface

      +
    • Create a new fund operation with an address.

      +

      Parameters

      • walletId: string

        The ID of the wallet the address belongs to.

        +
      • addressId: string

        The onchain address to be funded.

        +
      • createFundQuoteRequest: CreateFundQuoteRequest
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<FundQuote>

      Summary

      Create a Fund Operation quote.

      +

      Throws

      Memberof

      FundApiInterface

      +
    • Get fund operation.

      +

      Parameters

      • walletId: string

        The ID of the wallet the address belongs to.

        +
      • addressId: string

        The onchain address of the address that created the fund operation.

        +
      • fundOperationId: string

        The ID of the fund operation to fetch.

        +
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<FundOperation>

      Summary

      Get fund operation.

      +

      Throws

      Memberof

      FundApiInterface

      +
    • List fund operations for an address.

      +

      Parameters

      • walletId: string

        The ID of the wallet the address belongs to.

        +
      • addressId: string

        The onchain address of the address to list fund operations for.

        +
      • Optional limit: number

        A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

        +
      • Optional page: string

        A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

        +
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<FundOperationList>

      Summary

      List fund operations for an address.

      +

      Throws

      Memberof

      FundApiInterface

      +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.FundOperation.html b/docs/interfaces/client_api.FundOperation.html new file mode 100644 index 00000000..7332f6b5 --- /dev/null +++ b/docs/interfaces/client_api.FundOperation.html @@ -0,0 +1,24 @@ +FundOperation | @coinbase/coinbase-sdk

    An operation to fund a wallet with crypto

    +

    Export

    FundOperation

    +
    interface FundOperation {
        address_id: string;
        crypto_amount: CryptoAmount;
        fees: FundOperationFees;
        fiat_amount: FiatAmount;
        fund_operation_id: string;
        network_id: string;
        status: FundOperationStatusEnum;
        wallet_id: string;
    }

    Properties

    address_id: string

    The ID of the address that will receive the crypto

    +

    Memberof

    FundOperation

    +
    crypto_amount: CryptoAmount

    Memberof

    FundOperation

    +

    Memberof

    FundOperation

    +
    fiat_amount: FiatAmount

    Memberof

    FundOperation

    +
    fund_operation_id: string

    The ID of the fund operation

    +

    Memberof

    FundOperation

    +
    network_id: string

    The ID of the blockchain network

    +

    Memberof

    FundOperation

    +

    The status of the fund operation

    +

    Memberof

    FundOperation

    +
    wallet_id: string

    The ID of the wallet that will receive the crypto

    +

    Memberof

    FundOperation

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.FundOperationFees.html b/docs/interfaces/client_api.FundOperationFees.html new file mode 100644 index 00000000..3e20f6ad --- /dev/null +++ b/docs/interfaces/client_api.FundOperationFees.html @@ -0,0 +1,7 @@ +FundOperationFees | @coinbase/coinbase-sdk

    The fees for a fund operation.

    +

    Export

    FundOperationFees

    +
    interface FundOperationFees {
        buy_fee: FiatAmount;
        transfer_fee: CryptoAmount;
    }

    Properties

    Properties

    buy_fee: FiatAmount

    Memberof

    FundOperationFees

    +
    transfer_fee: CryptoAmount

    Memberof

    FundOperationFees

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.FundOperationList.html b/docs/interfaces/client_api.FundOperationList.html new file mode 100644 index 00000000..178c6664 --- /dev/null +++ b/docs/interfaces/client_api.FundOperationList.html @@ -0,0 +1,14 @@ +FundOperationList | @coinbase/coinbase-sdk

    Paginated list of fund operations

    +

    Export

    FundOperationList

    +
    interface FundOperationList {
        data: FundOperation[];
        has_more: boolean;
        next_page: string;
        total_count: number;
    }

    Properties

    Memberof

    FundOperationList

    +
    has_more: boolean

    True if this list has another page of items after this one that can be fetched.

    +

    Memberof

    FundOperationList

    +
    next_page: string

    The page token to be used to fetch the next page.

    +

    Memberof

    FundOperationList

    +
    total_count: number

    The total number of fund operations

    +

    Memberof

    FundOperationList

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.FundQuote.html b/docs/interfaces/client_api.FundQuote.html new file mode 100644 index 00000000..ca81ed96 --- /dev/null +++ b/docs/interfaces/client_api.FundQuote.html @@ -0,0 +1,24 @@ +FundQuote | @coinbase/coinbase-sdk

    A quote for a fund operation

    +

    Export

    FundQuote

    +
    interface FundQuote {
        address_id: string;
        crypto_amount: CryptoAmount;
        expires_at: string;
        fees: FundOperationFees;
        fiat_amount: FiatAmount;
        fund_quote_id: string;
        network_id: string;
        wallet_id: string;
    }

    Properties

    address_id: string

    The ID of the address that will receive the crypto

    +

    Memberof

    FundQuote

    +
    crypto_amount: CryptoAmount

    Memberof

    FundQuote

    +
    expires_at: string

    The time at which the quote expires

    +

    Memberof

    FundQuote

    +

    Memberof

    FundQuote

    +
    fiat_amount: FiatAmount

    Memberof

    FundQuote

    +
    fund_quote_id: string

    The ID of the fund quote

    +

    Memberof

    FundQuote

    +
    network_id: string

    The ID of the blockchain network

    +

    Memberof

    FundQuote

    +
    wallet_id: string

    The ID of the wallet that will receive the crypto

    +

    Memberof

    FundQuote

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.GetStakingContextRequest.html b/docs/interfaces/client_api.GetStakingContextRequest.html index 92596aa1..268671c2 100644 --- a/docs/interfaces/client_api.GetStakingContextRequest.html +++ b/docs/interfaces/client_api.GetStakingContextRequest.html @@ -1,13 +1,14 @@ GetStakingContextRequest | @coinbase/coinbase-sdk

    Export

    GetStakingContextRequest

    -
    interface GetStakingContextRequest {
        address_id: string;
        asset_id: string;
        network_id: string;
        options: {
            [key: string]: string;
        };
    }

    Properties

    interface GetStakingContextRequest {
        address_id: string;
        asset_id: string;
        network_id: string;
        options: {
            [key: string]: string;
        };
    }

    Properties

    address_id: string

    The onchain address for which the staking context is being fetched

    Memberof

    GetStakingContextRequest

    -
    asset_id: string

    The ID of the asset being staked

    +
    asset_id: string

    The ID of the asset being staked

    Memberof

    GetStakingContextRequest

    -
    network_id: string

    The ID of the blockchain network

    +
    network_id: string

    The ID of the blockchain network

    Memberof

    GetStakingContextRequest

    -
    options: {
        [key: string]: string;
    }

    Type declaration

    • [key: string]: string

    Memberof

    GetStakingContextRequest

    -
    \ No newline at end of file +
    options: {
        [key: string]: string;
    }

    Additional options for getting the staking context. This typically includes network specific fields.

    +

    Type declaration

    • [key: string]: string

    Memberof

    GetStakingContextRequest

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.HistoricalBalance.html b/docs/interfaces/client_api.HistoricalBalance.html new file mode 100644 index 00000000..61f91304 --- /dev/null +++ b/docs/interfaces/client_api.HistoricalBalance.html @@ -0,0 +1,14 @@ +HistoricalBalance | @coinbase/coinbase-sdk

    The balance of an asset onchain at a particular block

    +

    Export

    HistoricalBalance

    +
    interface HistoricalBalance {
        amount: string;
        asset: Asset;
        block_hash: string;
        block_height: string;
    }

    Properties

    amount: string

    The amount in the atomic units of the asset

    +

    Memberof

    HistoricalBalance

    +
    asset: Asset

    Memberof

    HistoricalBalance

    +
    block_hash: string

    The hash of the block at which the balance was recorded

    +

    Memberof

    HistoricalBalance

    +
    block_height: string

    The block height at which the balance was recorded

    +

    Memberof

    HistoricalBalance

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.MPCWalletStakeApiInterface.html b/docs/interfaces/client_api.MPCWalletStakeApiInterface.html new file mode 100644 index 00000000..0d24b77c --- /dev/null +++ b/docs/interfaces/client_api.MPCWalletStakeApiInterface.html @@ -0,0 +1,26 @@ +MPCWalletStakeApiInterface | @coinbase/coinbase-sdk

    MPCWalletStakeApi - interface

    +

    Export

    MPCWalletStakeApi

    +
    interface MPCWalletStakeApiInterface {
        broadcastStakingOperation(walletId, addressId, stakingOperationId, broadcastStakingOperationRequest, options?): AxiosPromise<StakingOperation>;
        createStakingOperation(walletId, addressId, createStakingOperationRequest, options?): AxiosPromise<StakingOperation>;
        getStakingOperation(walletId, addressId, stakingOperationId, options?): AxiosPromise<StakingOperation>;
    }

    Implemented by

    Methods

    • Broadcast a staking operation.

      +

      Parameters

      • walletId: string

        The ID of the wallet the address belongs to.

        +
      • addressId: string

        The ID of the address the staking operation belongs to.

        +
      • stakingOperationId: string

        The ID of the staking operation to broadcast.

        +
      • broadcastStakingOperationRequest: BroadcastStakingOperationRequest
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<StakingOperation>

      Summary

      Broadcast a staking operation

      +

      Throws

      Memberof

      MPCWalletStakeApiInterface

      +
    • Create a new staking operation.

      +

      Parameters

      • walletId: string

        The ID of the wallet the address belongs to.

        +
      • addressId: string

        The ID of the address to create the staking operation for.

        +
      • createStakingOperationRequest: CreateStakingOperationRequest
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<StakingOperation>

      Summary

      Create a new staking operation for an address

      +

      Throws

      Memberof

      MPCWalletStakeApiInterface

      +
    • Get the latest state of a staking operation.

      +

      Parameters

      • walletId: string

        The ID of the wallet the address belongs to

        +
      • addressId: string

        The ID of the address to fetch the staking operation for.

        +
      • stakingOperationId: string

        The ID of the staking operation.

        +
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<StakingOperation>

      Summary

      Get the latest state of a staking operation

      +

      Throws

      Memberof

      MPCWalletStakeApiInterface

      +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.ModelError.html b/docs/interfaces/client_api.ModelError.html index 94fab16d..c03a3fc5 100644 --- a/docs/interfaces/client_api.ModelError.html +++ b/docs/interfaces/client_api.ModelError.html @@ -1,9 +1,12 @@ ModelError | @coinbase/coinbase-sdk

    An error response from the Coinbase Developer Platform API

    Export

    ModelError

    -
    interface ModelError {
        code: string;
        message: string;
    }

    Properties

    interface ModelError {
        code: string;
        correlation_id?: string;
        message: string;
    }

    Properties

    code: string

    A short string representing the reported error. Can be use to handle errors programmatically.

    Memberof

    ModelError

    -
    message: string

    A human-readable message providing more details about the error.

    +
    correlation_id?: string

    A unique identifier for the request that generated the error. This can be used to help debug issues with the API.

    Memberof

    ModelError

    -
    \ No newline at end of file +
    message: string

    A human-readable message providing more details about the error.

    +

    Memberof

    ModelError

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.MultiTokenContractOptions.html b/docs/interfaces/client_api.MultiTokenContractOptions.html new file mode 100644 index 00000000..8183d194 --- /dev/null +++ b/docs/interfaces/client_api.MultiTokenContractOptions.html @@ -0,0 +1,6 @@ +MultiTokenContractOptions | @coinbase/coinbase-sdk

    Options for multi-token contract creation

    +

    Export

    MultiTokenContractOptions

    +
    interface MultiTokenContractOptions {
        uri: string;
    }

    Properties

    uri +

    Properties

    uri: string

    The URI for all token metadata

    +

    Memberof

    MultiTokenContractOptions

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.NFTContractOptions.html b/docs/interfaces/client_api.NFTContractOptions.html new file mode 100644 index 00000000..25550c40 --- /dev/null +++ b/docs/interfaces/client_api.NFTContractOptions.html @@ -0,0 +1,12 @@ +NFTContractOptions | @coinbase/coinbase-sdk

    Options for NFT contract creation

    +

    Export

    NFTContractOptions

    +
    interface NFTContractOptions {
        base_uri: string;
        name: string;
        symbol: string;
    }

    Properties

    Properties

    base_uri: string

    The base URI for the NFT metadata

    +

    Memberof

    NFTContractOptions

    +
    name: string

    The name of the NFT

    +

    Memberof

    NFTContractOptions

    +
    symbol: string

    The symbol of the NFT

    +

    Memberof

    NFTContractOptions

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.Network.html b/docs/interfaces/client_api.Network.html new file mode 100644 index 00000000..40a89adf --- /dev/null +++ b/docs/interfaces/client_api.Network.html @@ -0,0 +1,23 @@ +Network | @coinbase/coinbase-sdk

    Export

    Network

    +
    interface Network {
        address_path_prefix?: string;
        chain_id: number;
        display_name: string;
        feature_set: FeatureSet;
        id: NetworkIdentifier;
        is_testnet: boolean;
        native_asset: Asset;
        protocol_family: NetworkProtocolFamilyEnum;
    }

    Properties

    address_path_prefix?: string

    The BIP44 path prefix for the network

    +

    Memberof

    Network

    +
    chain_id: number

    The chain ID of the blockchain network

    +

    Memberof

    Network

    +
    display_name: string

    The human-readable name of the blockchain network

    +

    Memberof

    Network

    +
    feature_set: FeatureSet

    Memberof

    Network

    +

    Memberof

    Network

    +
    is_testnet: boolean

    Whether the network is a testnet or not

    +

    Memberof

    Network

    +
    native_asset: Asset

    Memberof

    Network

    +
    protocol_family: NetworkProtocolFamilyEnum

    The protocol family of the blockchain network

    +

    Memberof

    Network

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.NetworksApiInterface.html b/docs/interfaces/client_api.NetworksApiInterface.html new file mode 100644 index 00000000..e0580b97 --- /dev/null +++ b/docs/interfaces/client_api.NetworksApiInterface.html @@ -0,0 +1,9 @@ +NetworksApiInterface | @coinbase/coinbase-sdk

    NetworksApi - interface

    +

    Export

    NetworksApi

    +
    interface NetworksApiInterface {
        getNetwork(networkId, options?): AxiosPromise<Network>;
    }

    Implemented by

    Methods

    Methods

    • Get network

      +

      Parameters

      • networkId: string

        The ID of the network to fetch.

        +
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<Network>

      Summary

      Get network by ID

      +

      Throws

      Memberof

      NetworksApiInterface

      +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.OnchainIdentityApiInterface.html b/docs/interfaces/client_api.OnchainIdentityApiInterface.html new file mode 100644 index 00000000..3f82632e --- /dev/null +++ b/docs/interfaces/client_api.OnchainIdentityApiInterface.html @@ -0,0 +1,13 @@ +OnchainIdentityApiInterface | @coinbase/coinbase-sdk

    OnchainIdentityApi - interface

    +

    Export

    OnchainIdentityApi

    +
    interface OnchainIdentityApiInterface {
        resolveIdentityByAddress(networkId, addressId, roles?, limit?, page?, options?): AxiosPromise<OnchainNameList>;
    }

    Implemented by

    Methods

    • Obtains onchain identity for an address on a specific network

      +

      Parameters

      • networkId: string

        The ID of the blockchain network

        +
      • addressId: string

        The ID of the address to fetch the identity for

        +
      • Optional roles: ResolveIdentityByAddressRolesEnum[]

        A filter by role of the names related to this address (managed or owned)

        +
      • Optional limit: number

        A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

        +
      • Optional page: string

        A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

        +
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<OnchainNameList>

      Summary

      Obtains onchain identity for an address on a specific network

      +

      Throws

      Memberof

      OnchainIdentityApiInterface

      +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.OnchainName.html b/docs/interfaces/client_api.OnchainName.html new file mode 100644 index 00000000..cbbd288a --- /dev/null +++ b/docs/interfaces/client_api.OnchainName.html @@ -0,0 +1,33 @@ +OnchainName | @coinbase/coinbase-sdk

    A representation of an onchain stored name from name systems i.e. ENS or Basenames

    +

    Export

    OnchainName

    +
    interface OnchainName {
        avatar?: string;
        domain: string;
        expires_at: string;
        is_primary: boolean;
        manager_address: string;
        network_id: string;
        owner_address: string;
        primary_address?: string;
        text_records?: {
            [key: string]: string;
        };
        token_id: string;
    }

    Properties

    avatar?: string

    The visual representation attached to this name

    +

    Memberof

    OnchainName

    +
    domain: string

    The readable format for the name in complete form

    +

    Memberof

    OnchainName

    +
    expires_at: string

    The expiration date for this name's ownership

    +

    Memberof

    OnchainName

    +
    is_primary: boolean

    Whether this name is the primary name for the owner (This is when the ETH coin address for this name is equal to the primary_address. More info here https://docs.ens.domains/ensip/19)

    +

    Memberof

    OnchainName

    +
    manager_address: string

    The onchain address of the manager of the name

    +

    Memberof

    OnchainName

    +
    network_id: string

    The ID of the blockchain network

    +

    Memberof

    OnchainName

    +
    owner_address: string

    The onchain address of the owner of the name

    +

    Memberof

    OnchainName

    +
    primary_address?: string

    The primary onchain address of the name

    +

    Memberof

    OnchainName

    +
    text_records?: {
        [key: string]: string;
    }

    The metadata attached to this name

    +

    Type declaration

    • [key: string]: string

    Memberof

    OnchainName

    +
    token_id: string

    The ID for the NFT related to this name

    +

    Memberof

    OnchainName

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.OnchainNameList.html b/docs/interfaces/client_api.OnchainNameList.html new file mode 100644 index 00000000..9e115c65 --- /dev/null +++ b/docs/interfaces/client_api.OnchainNameList.html @@ -0,0 +1,15 @@ +OnchainNameList | @coinbase/coinbase-sdk

    A list of onchain events with pagination information

    +

    Export

    OnchainNameList

    +
    interface OnchainNameList {
        data: OnchainName[];
        has_more?: boolean;
        next_page: string;
        total_count?: number;
    }

    Properties

    data: OnchainName[]

    A list of onchain name objects

    +

    Memberof

    OnchainNameList

    +
    has_more?: boolean

    True if this list has another page of items after this one that can be fetched.

    +

    Memberof

    OnchainNameList

    +
    next_page: string

    The page token to be used to fetch the next page.

    +

    Memberof

    OnchainNameList

    +
    total_count?: number

    The total number of payload signatures for the address.

    +

    Memberof

    OnchainNameList

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.PartialEthStakingContext.html b/docs/interfaces/client_api.PartialEthStakingContext.html deleted file mode 100644 index af579661..00000000 --- a/docs/interfaces/client_api.PartialEthStakingContext.html +++ /dev/null @@ -1,12 +0,0 @@ -PartialEthStakingContext | @coinbase/coinbase-sdk

    The partial eth staking context

    -

    Export

    PartialEthStakingContext

    -
    interface PartialEthStakingContext {
        claimable_balance: string;
        stakeable_balance: string;
        unstakeable_balance: string;
    }

    Properties

    claimable_balance: string

    The total unstaked balance that can be claimed in atomic units.

    -

    Memberof

    PartialEthStakingContext

    -
    stakeable_balance: string

    The balance that can be staked. This is typically the wallet balance in atomic units.

    -

    Memberof

    PartialEthStakingContext

    -
    unstakeable_balance: string

    The total staked balance of the wallet that can be unstaked in atomic units.

    -

    Memberof

    PartialEthStakingContext

    -
    \ No newline at end of file diff --git a/docs/interfaces/client_api.PayloadSignature.html b/docs/interfaces/client_api.PayloadSignature.html new file mode 100644 index 00000000..47fd9195 --- /dev/null +++ b/docs/interfaces/client_api.PayloadSignature.html @@ -0,0 +1,21 @@ +PayloadSignature | @coinbase/coinbase-sdk

    A payload signed by an address.

    +

    Export

    PayloadSignature

    +
    interface PayloadSignature {
        address_id: string;
        payload_signature_id: string;
        signature?: string;
        status: PayloadSignatureStatusEnum;
        unsigned_payload: string;
        wallet_id: string;
    }

    Properties

    address_id: string

    The onchain address of the signer.

    +

    Memberof

    PayloadSignature

    +
    payload_signature_id: string

    The ID of the payload signature.

    +

    Memberof

    PayloadSignature

    +
    signature?: string

    The signature of the payload.

    +

    Memberof

    PayloadSignature

    +

    The status of the payload signature.

    +

    Memberof

    PayloadSignature

    +
    unsigned_payload: string

    The unsigned payload. This is the payload that needs to be signed by the signer address.

    +

    Memberof

    PayloadSignature

    +
    wallet_id: string

    The ID of the wallet that owns the address.

    +

    Memberof

    PayloadSignature

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.PayloadSignatureList.html b/docs/interfaces/client_api.PayloadSignatureList.html new file mode 100644 index 00000000..3d187976 --- /dev/null +++ b/docs/interfaces/client_api.PayloadSignatureList.html @@ -0,0 +1,13 @@ +PayloadSignatureList | @coinbase/coinbase-sdk

    Export

    PayloadSignatureList

    +
    interface PayloadSignatureList {
        data: PayloadSignature[];
        has_more: boolean;
        next_page: string;
        total_count: number;
    }

    Properties

    Memberof

    PayloadSignatureList

    +
    has_more: boolean

    True if this list has another page of items after this one that can be fetched.

    +

    Memberof

    PayloadSignatureList

    +
    next_page: string

    The page token to be used to fetch the next page.

    +

    Memberof

    PayloadSignatureList

    +
    total_count: number

    The total number of payload signatures for the address.

    +

    Memberof

    PayloadSignatureList

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.ReadContractRequest.html b/docs/interfaces/client_api.ReadContractRequest.html new file mode 100644 index 00000000..4831bac8 --- /dev/null +++ b/docs/interfaces/client_api.ReadContractRequest.html @@ -0,0 +1,11 @@ +ReadContractRequest | @coinbase/coinbase-sdk

    Export

    ReadContractRequest

    +
    interface ReadContractRequest {
        abi?: string;
        args: string;
        method: string;
    }

    Properties

    Properties

    abi?: string

    The JSON-encoded ABI of the contract method (optional, will use cached ABI if not provided)

    +

    Memberof

    ReadContractRequest

    +
    args: string

    The JSON-encoded arguments to pass to the contract method. The keys should be the argument names and the values should be the argument values.

    +

    Memberof

    ReadContractRequest

    +
    method: string

    The name of the contract method to call

    +

    Memberof

    ReadContractRequest

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.RegisterSmartContractRequest.html b/docs/interfaces/client_api.RegisterSmartContractRequest.html new file mode 100644 index 00000000..02f518e5 --- /dev/null +++ b/docs/interfaces/client_api.RegisterSmartContractRequest.html @@ -0,0 +1,9 @@ +RegisterSmartContractRequest | @coinbase/coinbase-sdk

    Smart Contract data to be registered

    +

    Export

    RegisterSmartContractRequest

    +
    interface RegisterSmartContractRequest {
        abi: string;
        contract_name?: string;
    }

    Properties

    Properties

    abi: string

    ABI of the smart contract

    +

    Memberof

    RegisterSmartContractRequest

    +
    contract_name?: string

    Name of the smart contract

    +

    Memberof

    RegisterSmartContractRequest

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.ReputationApiInterface.html b/docs/interfaces/client_api.ReputationApiInterface.html new file mode 100644 index 00000000..c53516d4 --- /dev/null +++ b/docs/interfaces/client_api.ReputationApiInterface.html @@ -0,0 +1,10 @@ +ReputationApiInterface | @coinbase/coinbase-sdk

    ReputationApi - interface

    +

    Export

    ReputationApi

    +
    interface ReputationApiInterface {
        getAddressReputation(networkId, addressId, options?): AxiosPromise<AddressReputation>;
    }

    Implemented by

    Methods

    • Get the onchain reputation of an external address

      +

      Parameters

      • networkId: string

        The ID of the blockchain network.

        +
      • addressId: string

        The ID of the address to fetch the reputation for.

        +
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<AddressReputation>

      Summary

      Get the onchain reputation of an external address

      +

      Throws

      Memberof

      ReputationApiInterface

      +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.SeedCreationEvent.html b/docs/interfaces/client_api.SeedCreationEvent.html index da78db0e..c50aa45e 100644 --- a/docs/interfaces/client_api.SeedCreationEvent.html +++ b/docs/interfaces/client_api.SeedCreationEvent.html @@ -1,9 +1,9 @@ SeedCreationEvent | @coinbase/coinbase-sdk

    An event representing a seed creation.

    Export

    SeedCreationEvent

    -
    interface SeedCreationEvent {
        wallet_id: string;
        wallet_user_id: string;
    }

    Properties

    interface SeedCreationEvent {
        wallet_id: string;
        wallet_user_id: string;
    }

    Properties

    wallet_id: string

    The ID of the wallet that the server-signer should create the seed for

    Memberof

    SeedCreationEvent

    -
    wallet_user_id: string

    The ID of the user that the wallet belongs to

    +
    wallet_user_id: string

    The ID of the user that the wallet belongs to

    Memberof

    SeedCreationEvent

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.SeedCreationEventResult.html b/docs/interfaces/client_api.SeedCreationEventResult.html index b0dee5a2..1d3b5345 100644 --- a/docs/interfaces/client_api.SeedCreationEventResult.html +++ b/docs/interfaces/client_api.SeedCreationEventResult.html @@ -1,15 +1,15 @@ SeedCreationEventResult | @coinbase/coinbase-sdk

    The result to a SeedCreationEvent.

    Export

    SeedCreationEventResult

    -
    interface SeedCreationEventResult {
        extended_public_key: string;
        seed_id: string;
        wallet_id: string;
        wallet_user_id: string;
    }

    Properties

    interface SeedCreationEventResult {
        extended_public_key: string;
        seed_id: string;
        wallet_id: string;
        wallet_user_id: string;
    }

    Properties

    extended_public_key: string

    The extended public key for the first master key derived from seed.

    Memberof

    SeedCreationEventResult

    -
    seed_id: string

    The ID of the seed in Server-Signer used to generate the extended public key.

    +
    seed_id: string

    The ID of the seed in Server-Signer used to generate the extended public key.

    Memberof

    SeedCreationEventResult

    -
    wallet_id: string

    The ID of the wallet that the seed was created for

    +
    wallet_id: string

    The ID of the wallet that the seed was created for

    Memberof

    SeedCreationEventResult

    -
    wallet_user_id: string

    The ID of the user that the wallet belongs to

    +
    wallet_user_id: string

    The ID of the user that the wallet belongs to

    Memberof

    SeedCreationEventResult

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.ServerSigner.html b/docs/interfaces/client_api.ServerSigner.html index 85b0cf72..c84f348e 100644 --- a/docs/interfaces/client_api.ServerSigner.html +++ b/docs/interfaces/client_api.ServerSigner.html @@ -1,9 +1,12 @@ ServerSigner | @coinbase/coinbase-sdk

    A Server-Signer assigned to sign transactions in a wallet.

    Export

    ServerSigner

    -
    interface ServerSigner {
        server_signer_id: string;
        wallets?: string[];
    }

    Properties

    interface ServerSigner {
        is_mpc: boolean;
        server_signer_id: string;
        wallets?: string[];
    }

    Properties

    server_signer_id: string

    The ID of the server-signer

    +

    Properties

    is_mpc: boolean

    Whether the Server-Signer uses MPC.

    Memberof

    ServerSigner

    -
    wallets?: string[]

    The IDs of the wallets that the server-signer can sign for

    +
    server_signer_id: string

    The ID of the server-signer

    Memberof

    ServerSigner

    -
    \ No newline at end of file +
    wallets?: string[]

    The IDs of the wallets that the server-signer can sign for

    +

    Memberof

    ServerSigner

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.ServerSignerEvent.html b/docs/interfaces/client_api.ServerSignerEvent.html index 58ae49c0..03243382 100644 --- a/docs/interfaces/client_api.ServerSignerEvent.html +++ b/docs/interfaces/client_api.ServerSignerEvent.html @@ -1,8 +1,8 @@ ServerSignerEvent | @coinbase/coinbase-sdk

    An event that is waiting to be processed by a Server-Signer.

    Export

    ServerSignerEvent

    -
    interface ServerSignerEvent {
        event: ServerSignerEventEvent;
        server_signer_id: string;
    }

    Properties

    interface ServerSignerEvent {
        event: ServerSignerEventEvent;
        server_signer_id: string;
    }

    Properties

    Memberof

    ServerSignerEvent

    -
    server_signer_id: string

    The ID of the server-signer that the event is for

    +
    server_signer_id: string

    The ID of the server-signer that the event is for

    Memberof

    ServerSignerEvent

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.ServerSignerEventList.html b/docs/interfaces/client_api.ServerSignerEventList.html index ef85b17a..50d1ff7c 100644 --- a/docs/interfaces/client_api.ServerSignerEventList.html +++ b/docs/interfaces/client_api.ServerSignerEventList.html @@ -1,13 +1,13 @@ ServerSignerEventList | @coinbase/coinbase-sdk

    Export

    ServerSignerEventList

    -
    interface ServerSignerEventList {
        data: ServerSignerEvent[];
        has_more: boolean;
        next_page: string;
        total_count: number;
    }

    Properties

    interface ServerSignerEventList {
        data: ServerSignerEvent[];
        has_more: boolean;
        next_page: string;
        total_count: number;
    }

    Properties

    Memberof

    ServerSignerEventList

    -
    has_more: boolean

    True if this list has another page of items after this one that can be fetched.

    +
    has_more: boolean

    True if this list has another page of items after this one that can be fetched.

    Memberof

    ServerSignerEventList

    -
    next_page: string

    The page token to be used to fetch the next page.

    +
    next_page: string

    The page token to be used to fetch the next page.

    Memberof

    ServerSignerEventList

    -
    total_count: number

    The total number of events for the server signer.

    +
    total_count: number

    The total number of events for the server signer.

    Memberof

    ServerSignerEventList

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.ServerSignerList.html b/docs/interfaces/client_api.ServerSignerList.html index b27a0f54..8178e7d4 100644 --- a/docs/interfaces/client_api.ServerSignerList.html +++ b/docs/interfaces/client_api.ServerSignerList.html @@ -1,13 +1,13 @@ ServerSignerList | @coinbase/coinbase-sdk

    Export

    ServerSignerList

    -
    interface ServerSignerList {
        data: ServerSigner[];
        has_more: boolean;
        next_page: string;
        total_count: number;
    }

    Properties

    interface ServerSignerList {
        data: ServerSigner[];
        has_more: boolean;
        next_page: string;
        total_count: number;
    }

    Properties

    data: ServerSigner[]

    Memberof

    ServerSignerList

    -
    has_more: boolean

    True if this list has another page of items after this one that can be fetched.

    +
    has_more: boolean

    True if this list has another page of items after this one that can be fetched.

    Memberof

    ServerSignerList

    -
    next_page: string

    The page token to be used to fetch the next page.

    +
    next_page: string

    The page token to be used to fetch the next page.

    Memberof

    ServerSignerList

    -
    total_count: number

    The total number of server-signers for the project.

    +
    total_count: number

    The total number of server-signers for the project.

    Memberof

    ServerSignerList

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.ServerSignersApiInterface.html b/docs/interfaces/client_api.ServerSignersApiInterface.html index 6518c0ed..89219439 100644 --- a/docs/interfaces/client_api.ServerSignersApiInterface.html +++ b/docs/interfaces/client_api.ServerSignersApiInterface.html @@ -1,8 +1,8 @@ ServerSignersApiInterface | @coinbase/coinbase-sdk

    ServerSignersApi - interface

    Export

    ServerSignersApi

    -
    interface ServerSignersApiInterface {
        createServerSigner(createServerSignerRequest?, options?): AxiosPromise<ServerSigner>;
        getServerSigner(serverSignerId, options?): AxiosPromise<ServerSigner>;
        listServerSignerEvents(serverSignerId, limit?, page?, options?): AxiosPromise<ServerSignerEventList>;
        listServerSigners(limit?, page?, options?): AxiosPromise<ServerSignerList>;
        submitServerSignerSeedEventResult(serverSignerId, seedCreationEventResult?, options?): AxiosPromise<SeedCreationEventResult>;
        submitServerSignerSignatureEventResult(serverSignerId, signatureCreationEventResult?, options?): AxiosPromise<SignatureCreationEventResult>;
    }

    Implemented by

    Methods

    interface ServerSignersApiInterface {
        createServerSigner(createServerSignerRequest?, options?): AxiosPromise<ServerSigner>;
        getServerSigner(serverSignerId, options?): AxiosPromise<ServerSigner>;
        listServerSignerEvents(serverSignerId, limit?, page?, options?): AxiosPromise<ServerSignerEventList>;
        listServerSigners(limit?, page?, options?): AxiosPromise<ServerSignerList>;
        submitServerSignerSeedEventResult(serverSignerId, seedCreationEventResult?, options?): AxiosPromise<SeedCreationEventResult>;
        submitServerSignerSignatureEventResult(serverSignerId, signatureCreationEventResult?, options?): AxiosPromise<SignatureCreationEventResult>;
    }

    Implemented by

    Methods

    Parameters

    • Optional createServerSignerRequest: CreateServerSignerRequest
    • Optional options: RawAxiosRequestConfig

      Override http request option.

    Returns AxiosPromise<ServerSigner>

    Summary

    Create a new Server-Signer

    Throws

    Memberof

    ServerSignersApiInterface

    -
    • Get a server signer by ID

      Parameters

      • serverSignerId: string

        The ID of the server signer to fetch

      • Optional options: RawAxiosRequestConfig

        Override http request option.

      Returns AxiosPromise<ServerSigner>

      Summary

      Get a server signer by ID

      Throws

      Memberof

      ServerSignersApiInterface

      -
    • List events for a server signer

      Parameters

      • serverSignerId: string

        The ID of the server signer to fetch events for

      • Optional limit: number

        A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

      • Optional page: string

        A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

      • Optional options: RawAxiosRequestConfig

        Override http request option.

      Returns AxiosPromise<ServerSignerEventList>

      Summary

      List events for a server signer

      -

      Throws

      Memberof

      ServerSignersApiInterface

      -
    • List server signers for the current project

      +

      Deprecated

      Throws

      Memberof

      ServerSignersApiInterface

      +
    • List server signers for the current project

      Parameters

      • Optional limit: number

        A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

      • Optional page: string

        A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

      • Optional options: RawAxiosRequestConfig

        Override http request option.

      Returns AxiosPromise<ServerSignerList>

      Summary

      List server signers for the current project

      Throws

      Memberof

      ServerSignersApiInterface

      -
    • Submit the result of a server signer event

      Parameters

      • serverSignerId: string

        The ID of the server signer to submit the event result for

      • Optional seedCreationEventResult: SeedCreationEventResult
      • Optional options: RawAxiosRequestConfig

        Override http request option.

      Returns AxiosPromise<SeedCreationEventResult>

      Summary

      Submit the result of a server signer event

      Throws

      Memberof

      ServerSignersApiInterface

      -
    • Submit the result of a server signer event

      Parameters

      • serverSignerId: string

        The ID of the server signer to submit the event result for

      • Optional signatureCreationEventResult: SignatureCreationEventResult
      • Optional options: RawAxiosRequestConfig

        Override http request option.

      Returns AxiosPromise<SignatureCreationEventResult>

      Summary

      Submit the result of a server signer event

      Throws

      Memberof

      ServerSignersApiInterface

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.SignatureCreationEvent.html b/docs/interfaces/client_api.SignatureCreationEvent.html index 44a30418..97e3cc3b 100644 --- a/docs/interfaces/client_api.SignatureCreationEvent.html +++ b/docs/interfaces/client_api.SignatureCreationEvent.html @@ -1,6 +1,6 @@ SignatureCreationEvent | @coinbase/coinbase-sdk

    An event representing a signature creation.

    Export

    SignatureCreationEvent

    -
    interface SignatureCreationEvent {
        address_id: string;
        address_index: number;
        seed_id: string;
        signing_payload: string;
        transaction_id: string;
        transaction_type: "transfer";
        wallet_id: string;
        wallet_user_id: string;
    }

    Properties

    interface SignatureCreationEvent {
        address_id: string;
        address_index: number;
        seed_id: string;
        signing_payload: string;
        transaction_id: string;
        transaction_type: "transfer";
        wallet_id: string;
        wallet_user_id: string;
    }

    Properties

    address_id: string

    The ID of the address the transfer belongs to

    Memberof

    SignatureCreationEvent

    -
    address_index: number

    The index of the address that the server-signer should sign with

    +
    address_index: number

    The index of the address that the server-signer should sign with

    Memberof

    SignatureCreationEvent

    -
    seed_id: string

    The ID of the seed that the server-signer should create the signature for

    +
    seed_id: string

    The ID of the seed that the server-signer should create the signature for

    Memberof

    SignatureCreationEvent

    -
    signing_payload: string

    The payload that the server-signer should sign

    +
    signing_payload: string

    The payload that the server-signer should sign

    Memberof

    SignatureCreationEvent

    -
    transaction_id: string

    The ID of the transaction that the server-signer should sign

    +
    transaction_id: string

    The ID of the transaction that the server-signer should sign

    Memberof

    SignatureCreationEvent

    -
    transaction_type: "transfer"

    Memberof

    SignatureCreationEvent

    -
    wallet_id: string

    The ID of the wallet the signature is for

    +
    transaction_type: "transfer"

    Memberof

    SignatureCreationEvent

    +
    wallet_id: string

    The ID of the wallet the signature is for

    Memberof

    SignatureCreationEvent

    -
    wallet_user_id: string

    The ID of the user that the wallet belongs to

    +
    wallet_user_id: string

    The ID of the user that the wallet belongs to

    Memberof

    SignatureCreationEvent

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.SignatureCreationEventResult.html b/docs/interfaces/client_api.SignatureCreationEventResult.html index 291647dc..f0f090e9 100644 --- a/docs/interfaces/client_api.SignatureCreationEventResult.html +++ b/docs/interfaces/client_api.SignatureCreationEventResult.html @@ -1,6 +1,6 @@ SignatureCreationEventResult | @coinbase/coinbase-sdk

    The result to a SignatureCreationEvent.

    Export

    SignatureCreationEventResult

    -
    interface SignatureCreationEventResult {
        address_id: string;
        signature: string;
        transaction_id: string;
        transaction_type: "transfer";
        wallet_id: string;
        wallet_user_id: string;
    }

    Properties

    interface SignatureCreationEventResult {
        address_id: string;
        signature: string;
        transaction_id: string;
        transaction_type: "transfer";
        wallet_id: string;
        wallet_user_id: string;
    }

    Properties

    address_id: string

    The ID of the address the transfer belongs to

    Memberof

    SignatureCreationEventResult

    -
    signature: string

    The signature created by the server-signer.

    +
    signature: string

    The signature created by the server-signer.

    Memberof

    SignatureCreationEventResult

    -
    transaction_id: string

    The ID of the transaction that the Server-Signer has signed for

    +
    transaction_id: string

    The ID of the transaction that the Server-Signer has signed for

    Memberof

    SignatureCreationEventResult

    -
    transaction_type: "transfer"

    Memberof

    SignatureCreationEventResult

    -
    wallet_id: string

    The ID of the wallet that the event was created for.

    +
    transaction_type: "transfer"

    Memberof

    SignatureCreationEventResult

    +
    wallet_id: string

    The ID of the wallet that the event was created for.

    Memberof

    SignatureCreationEventResult

    -
    wallet_user_id: string

    The ID of the user that the wallet belongs to

    +
    wallet_user_id: string

    The ID of the user that the wallet belongs to

    Memberof

    SignatureCreationEventResult

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.SignedVoluntaryExitMessageMetadata.html b/docs/interfaces/client_api.SignedVoluntaryExitMessageMetadata.html new file mode 100644 index 00000000..63105932 --- /dev/null +++ b/docs/interfaces/client_api.SignedVoluntaryExitMessageMetadata.html @@ -0,0 +1,12 @@ +SignedVoluntaryExitMessageMetadata | @coinbase/coinbase-sdk

    Interface SignedVoluntaryExitMessageMetadata

    Signed voluntary exit message metadata to be provided to beacon chain to exit a validator.

    +

    Export

    SignedVoluntaryExitMessageMetadata

    +
    interface SignedVoluntaryExitMessageMetadata {
        fork: string;
        signed_voluntary_exit: string;
        validator_pub_key: string;
    }

    Properties

    fork: string

    The current fork version of the Ethereum beacon chain.

    +

    Memberof

    SignedVoluntaryExitMessageMetadata

    +
    signed_voluntary_exit: string

    A base64 encoded version of a json string representing a voluntary exit message.

    +

    Memberof

    SignedVoluntaryExitMessageMetadata

    +
    validator_pub_key: string

    The public key of the validator associated with the exit message.

    +

    Memberof

    SignedVoluntaryExitMessageMetadata

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.SmartContract.html b/docs/interfaces/client_api.SmartContract.html new file mode 100644 index 00000000..ded86c39 --- /dev/null +++ b/docs/interfaces/client_api.SmartContract.html @@ -0,0 +1,36 @@ +SmartContract | @coinbase/coinbase-sdk

    Represents a smart contract on the blockchain

    +

    Export

    SmartContract

    +
    interface SmartContract {
        abi: string;
        compiled_smart_contract_id?: string;
        contract_address: string;
        contract_name: string;
        deployer_address?: string;
        is_external: boolean;
        network_id: string;
        options?: SmartContractOptions;
        smart_contract_id: string;
        transaction?: Transaction;
        type: SmartContractType;
        wallet_id?: string;
    }

    Properties

    abi: string

    The JSON-encoded ABI of the contract

    +

    Memberof

    SmartContract

    +
    compiled_smart_contract_id?: string

    The ID of the compiled smart contract that was used to deploy this contract

    +

    Memberof

    SmartContract

    +
    contract_address: string

    The EVM address of the smart contract

    +

    Memberof

    SmartContract

    +
    contract_name: string

    The name of the smart contract

    +

    Memberof

    SmartContract

    +
    deployer_address?: string

    The EVM address of the account that deployed the smart contract. If this smart contract was deployed externally, this will be omitted.

    +

    Memberof

    SmartContract

    +
    is_external: boolean

    Whether the smart contract was deployed externally. If true, the deployer_address and transaction will be omitted.

    +

    Memberof

    SmartContract

    +
    network_id: string

    The name of the blockchain network

    +

    Memberof

    SmartContract

    +

    Memberof

    SmartContract

    +
    smart_contract_id: string

    The unique identifier of the smart contract.

    +

    Memberof

    SmartContract

    +
    transaction?: Transaction

    Memberof

    SmartContract

    +

    Memberof

    SmartContract

    +
    wallet_id?: string

    The ID of the wallet that deployed the smart contract. If this smart contract was deployed externally, this will be omitted.

    +

    Memberof

    SmartContract

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.SmartContractActivityEvent.html b/docs/interfaces/client_api.SmartContractActivityEvent.html new file mode 100644 index 00000000..2dd1434b --- /dev/null +++ b/docs/interfaces/client_api.SmartContractActivityEvent.html @@ -0,0 +1,57 @@ +SmartContractActivityEvent | @coinbase/coinbase-sdk

    Represents an event triggered by a smart contract activity on the blockchain. Contains information about the function, transaction, block, and involved addresses.

    +

    Export

    SmartContractActivityEvent

    +
    interface SmartContractActivityEvent {
        blockHash?: string;
        blockNumber?: number;
        blockTime?: string;
        contractAddress?: string;
        contractName?: string;
        eventType?: string;
        fourBytes?: string;
        from?: string;
        func?: string;
        logIndex?: number;
        network?: string;
        projectName?: string;
        sig?: string;
        to?: string;
        transactionHash?: string;
        transactionIndex?: number;
        value?: number;
        webhookId?: string;
    }

    Properties

    blockHash?: string

    Hash of the block containing the transaction.

    +

    Memberof

    SmartContractActivityEvent

    +
    blockNumber?: number

    Number of the block containing the transaction.

    +

    Memberof

    SmartContractActivityEvent

    +
    blockTime?: string

    Timestamp when the block was mined.

    +

    Memberof

    SmartContractActivityEvent

    +
    contractAddress?: string

    Address of the smart contract.

    +

    Memberof

    SmartContractActivityEvent

    +
    contractName?: string

    Name of the contract.

    +

    Memberof

    SmartContractActivityEvent

    +
    eventType?: string

    Type of event, in this case, an ERC-721 token transfer.

    +

    Memberof

    SmartContractActivityEvent

    +
    fourBytes?: string

    First 4 bytes of the Transaction, a unique ID.

    +

    Memberof

    SmartContractActivityEvent

    +
    from?: string

    Address of the initiator in the transfer.

    +

    Memberof

    SmartContractActivityEvent

    +
    func?: string

    Name of the function.

    +

    Memberof

    SmartContractActivityEvent

    +
    logIndex?: number

    Position of the event log within the transaction.

    +

    Memberof

    SmartContractActivityEvent

    +
    network?: string

    Blockchain network where the event occurred.

    +

    Memberof

    SmartContractActivityEvent

    +
    projectName?: string

    Name of the project this smart contract belongs to.

    +

    Memberof

    SmartContractActivityEvent

    +
    sig?: string

    Signature of the function.

    +

    Memberof

    SmartContractActivityEvent

    +
    to?: string

    Address of the recipient in the transfer.

    +

    Memberof

    SmartContractActivityEvent

    +
    transactionHash?: string

    Hash of the transaction that triggered the event.

    +

    Memberof

    SmartContractActivityEvent

    +
    transactionIndex?: number

    Position of the transaction within the block.

    +

    Memberof

    SmartContractActivityEvent

    +
    value?: number

    Amount of tokens transferred, typically in the smallest unit (e.g., wei for Ethereum).

    +

    Memberof

    SmartContractActivityEvent

    +
    webhookId?: string

    Unique identifier for the webhook that triggered this event.

    +

    Memberof

    SmartContractActivityEvent

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.SmartContractList.html b/docs/interfaces/client_api.SmartContractList.html new file mode 100644 index 00000000..cd80bba7 --- /dev/null +++ b/docs/interfaces/client_api.SmartContractList.html @@ -0,0 +1,10 @@ +SmartContractList | @coinbase/coinbase-sdk

    Export

    SmartContractList

    +
    interface SmartContractList {
        data: SmartContract[];
        has_more: boolean;
        next_page: string;
    }

    Properties

    Properties

    Memberof

    SmartContractList

    +
    has_more: boolean

    True if this list has another page of items after this one that can be fetched.

    +

    Memberof

    SmartContractList

    +
    next_page: string

    The page token to be used to fetch the next page.

    +

    Memberof

    SmartContractList

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.SmartContractsApiInterface.html b/docs/interfaces/client_api.SmartContractsApiInterface.html new file mode 100644 index 00000000..1a0467cb --- /dev/null +++ b/docs/interfaces/client_api.SmartContractsApiInterface.html @@ -0,0 +1,56 @@ +SmartContractsApiInterface | @coinbase/coinbase-sdk

    SmartContractsApi - interface

    +

    Export

    SmartContractsApi

    +
    interface SmartContractsApiInterface {
        compileSmartContract(compileSmartContractRequest, options?): AxiosPromise<CompiledSmartContract>;
        createSmartContract(walletId, addressId, createSmartContractRequest, options?): AxiosPromise<SmartContract>;
        deploySmartContract(walletId, addressId, smartContractId, deploySmartContractRequest, options?): AxiosPromise<SmartContract>;
        getSmartContract(walletId, addressId, smartContractId, options?): AxiosPromise<SmartContract>;
        listSmartContracts(page?, options?): AxiosPromise<SmartContractList>;
        readContract(networkId, contractAddress, readContractRequest, options?): AxiosPromise<SolidityValue>;
        registerSmartContract(networkId, contractAddress, registerSmartContractRequest?, options?): AxiosPromise<SmartContract>;
        updateSmartContract(networkId, contractAddress, updateSmartContractRequest?, options?): AxiosPromise<SmartContract>;
    }

    Implemented by

    Methods

    • Create a new smart contract

      +

      Parameters

      • walletId: string

        The ID of the wallet the address belongs to.

        +
      • addressId: string

        The ID of the address to deploy the smart contract from.

        +
      • createSmartContractRequest: CreateSmartContractRequest
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<SmartContract>

      Summary

      Create a new smart contract

      +

      Throws

      Memberof

      SmartContractsApiInterface

      +
    • Deploys a smart contract, by broadcasting the transaction to the network.

      +

      Parameters

      • walletId: string

        The ID of the wallet the address belongs to.

        +
      • addressId: string

        The ID of the address to broadcast the transaction from.

        +
      • smartContractId: string

        The UUID of the smart contract to broadcast the transaction to.

        +
      • deploySmartContractRequest: DeploySmartContractRequest
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<SmartContract>

      Summary

      Deploy a smart contract

      +

      Throws

      Memberof

      SmartContractsApiInterface

      +
    • Get a specific smart contract deployed by address.

      +

      Parameters

      • walletId: string

        The ID of the wallet the address belongs to.

        +
      • addressId: string

        The ID of the address to fetch the smart contract for.

        +
      • smartContractId: string

        The UUID of the smart contract to fetch.

        +
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<SmartContract>

      Summary

      Get a specific smart contract deployed by address

      +

      Throws

      Memberof

      SmartContractsApiInterface

      +
    • List smart contracts

      +

      Parameters

      • Optional page: string

        Pagination token for retrieving the next set of results

        +
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<SmartContractList>

      Summary

      List smart contracts

      +

      Throws

      Memberof

      SmartContractsApiInterface

      +
    • Perform a read operation on a smart contract without creating a transaction

      +

      Parameters

      • networkId: string
      • contractAddress: string
      • readContractRequest: ReadContractRequest
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<SolidityValue>

      Summary

      Read data from a smart contract

      +

      Throws

      Memberof

      SmartContractsApiInterface

      +
    • Register a smart contract

      +

      Parameters

      • networkId: string

        The ID of the network to fetch.

        +
      • contractAddress: string

        EVM address of the smart contract (42 characters, including &#39;0x&#39;, in lowercase)

        +
      • Optional registerSmartContractRequest: RegisterSmartContractRequest
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<SmartContract>

      Summary

      Register a smart contract

      +

      Throws

      Memberof

      SmartContractsApiInterface

      +
    • Update a smart contract

      +

      Parameters

      • networkId: string

        The ID of the network to fetch.

        +
      • contractAddress: string

        EVM address of the smart contract (42 characters, including &#39;0x&#39;, in lowercase)

        +
      • Optional updateSmartContractRequest: UpdateSmartContractRequest
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<SmartContract>

      Summary

      Update a smart contract

      +

      Throws

      Memberof

      SmartContractsApiInterface

      +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.SmartWallet.html b/docs/interfaces/client_api.SmartWallet.html new file mode 100644 index 00000000..3bbb2392 --- /dev/null +++ b/docs/interfaces/client_api.SmartWallet.html @@ -0,0 +1,8 @@ +SmartWallet | @coinbase/coinbase-sdk

    Export

    SmartWallet

    +
    interface SmartWallet {
        address: string;
        owners: string[];
    }

    Properties

    Properties

    address: string

    The onchain address of the smart wallet.

    +

    Memberof

    SmartWallet

    +
    owners: string[]

    The list of owner addresses for the smart wallet.

    +

    Memberof

    SmartWallet

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.SmartWalletList.html b/docs/interfaces/client_api.SmartWalletList.html new file mode 100644 index 00000000..a71ea9dc --- /dev/null +++ b/docs/interfaces/client_api.SmartWalletList.html @@ -0,0 +1,14 @@ +SmartWalletList | @coinbase/coinbase-sdk

    Paginated list of smart wallets

    +

    Export

    SmartWalletList

    +
    interface SmartWalletList {
        data: SmartWallet[];
        has_more: boolean;
        next_page: string;
        total_count: number;
    }

    Properties

    data: SmartWallet[]

    Memberof

    SmartWalletList

    +
    has_more: boolean

    True if this list has another page of items after this one that can be fetched.

    +

    Memberof

    SmartWalletList

    +
    next_page: string

    The page token to be used to fetch the next page.

    +

    Memberof

    SmartWalletList

    +
    total_count: number

    The total number of wallets

    +

    Memberof

    SmartWalletList

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.SmartWalletsApiInterface.html b/docs/interfaces/client_api.SmartWalletsApiInterface.html new file mode 100644 index 00000000..8f7ea6dd --- /dev/null +++ b/docs/interfaces/client_api.SmartWalletsApiInterface.html @@ -0,0 +1,42 @@ +SmartWalletsApiInterface | @coinbase/coinbase-sdk

    SmartWalletsApi - interface

    +

    Export

    SmartWalletsApi

    +
    interface SmartWalletsApiInterface {
        broadcastUserOperation(smartWalletAddress, userOpHash, broadcastUserOperationRequest?, options?): AxiosPromise<UserOperation>;
        createSmartWallet(createSmartWalletRequest?, options?): AxiosPromise<SmartWallet>;
        createUserOperation(smartWalletAddress, networkId, createUserOperationRequest?, options?): AxiosPromise<UserOperation>;
        getSmartWallet(smartWalletAddress, options?): AxiosPromise<SmartWallet>;
        getUserOperation(smartWalletAddress, userOpHash, options?): AxiosPromise<UserOperation>;
        listSmartWallets(limit?, page?, options?): AxiosPromise<SmartWalletList>;
    }

    Implemented by

    Methods

    • Broadcast a user operation

      +

      Parameters

      • smartWalletAddress: string

        The address of the smart wallet to broadcast the user operation from.

        +
      • userOpHash: string

        The hash of the user operation to broadcast

        +
      • Optional broadcastUserOperationRequest: BroadcastUserOperationRequest
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<UserOperation>

      Summary

      Broadcast a user operation

      +

      Throws

      Memberof

      SmartWalletsApiInterface

      +
    • Create a new smart wallet, not scoped to a given network.

      +

      Parameters

      • Optional createSmartWalletRequest: CreateSmartWalletRequest
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<SmartWallet>

      Summary

      Create a new smart wallet

      +

      Throws

      Memberof

      SmartWalletsApiInterface

      +
    • Create a new user operation on a smart wallet.

      +

      Parameters

      • smartWalletAddress: string

        The address of the smart wallet to create the user operation on.

        +
      • networkId: string

        The ID of the network to create the user operation on.

        +
      • Optional createUserOperationRequest: CreateUserOperationRequest
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<UserOperation>

      Summary

      Create a new user operation

      +

      Throws

      Memberof

      SmartWalletsApiInterface

      +
    • Get smart wallet

      +

      Parameters

      • smartWalletAddress: string

        The address of that smart wallet to fetch.

        +
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<SmartWallet>

      Summary

      Get smart wallet by address

      +

      Throws

      Memberof

      SmartWalletsApiInterface

      +
    • Get user operation

      +

      Parameters

      • smartWalletAddress: string

        The address of the smart wallet the user operation belongs to.

        +
      • userOpHash: string

        The hash of the user operation to fetch

        +
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<UserOperation>

      Summary

      Get user operation

      +

      Throws

      Memberof

      SmartWalletsApiInterface

      +
    • List smart wallets

      +

      Parameters

      • Optional limit: number

        A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

        +
      • Optional page: string

        A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

        +
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<SmartWalletList>

      Summary

      List smart wallets

      +

      Throws

      Memberof

      SmartWalletsApiInterface

      +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.SolidityValue.html b/docs/interfaces/client_api.SolidityValue.html new file mode 100644 index 00000000..3a4834fb --- /dev/null +++ b/docs/interfaces/client_api.SolidityValue.html @@ -0,0 +1,13 @@ +SolidityValue | @coinbase/coinbase-sdk

    Export

    SolidityValue

    +
    interface SolidityValue {
        name?: string;
        type: SolidityValueTypeEnum;
        value?: string;
        values?: SolidityValue[];
    }

    Properties

    Properties

    name?: string

    The field name for tuple types. Not used for other types.

    +

    Memberof

    SolidityValue

    +

    Memberof

    SolidityValue

    +
    value?: string

    The value as a string for simple types. Not used for complex types (array, tuple).

    +

    Memberof

    SolidityValue

    +
    values?: SolidityValue[]

    For array and tuple types, the components of the value

    +

    Memberof

    SolidityValue

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.SponsoredSend.html b/docs/interfaces/client_api.SponsoredSend.html new file mode 100644 index 00000000..48f6b3fb --- /dev/null +++ b/docs/interfaces/client_api.SponsoredSend.html @@ -0,0 +1,24 @@ +SponsoredSend | @coinbase/coinbase-sdk

    An onchain sponsored gasless send.

    +

    Export

    SponsoredSend

    +
    interface SponsoredSend {
        raw_typed_data: string;
        signature?: string;
        status: SponsoredSendStatusEnum;
        to_address_id: string;
        transaction_hash?: string;
        transaction_link?: string;
        typed_data_hash: string;
    }

    Properties

    raw_typed_data: string

    The raw typed data for the sponsored send

    +

    Memberof

    SponsoredSend

    +
    signature?: string

    The signed hash of the sponsored send typed data.

    +

    Memberof

    SponsoredSend

    +

    The status of the sponsored send

    +

    Memberof

    SponsoredSend

    +
    to_address_id: string

    The onchain address of the recipient

    +

    Memberof

    SponsoredSend

    +
    transaction_hash?: string

    The hash of the onchain sponsored send transaction

    +

    Memberof

    SponsoredSend

    +
    transaction_link?: string

    The link to view the transaction on a block explorer. This is optional and may not be present for all transactions.

    +

    Memberof

    SponsoredSend

    +
    typed_data_hash: string

    The typed data hash for the sponsored send. This is the typed data hash that needs to be signed by the sender.

    +

    Memberof

    SponsoredSend

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.StakeApiInterface.html b/docs/interfaces/client_api.StakeApiInterface.html index c4ad352f..68738490 100644 --- a/docs/interfaces/client_api.StakeApiInterface.html +++ b/docs/interfaces/client_api.StakeApiInterface.html @@ -1,20 +1,58 @@ StakeApiInterface | @coinbase/coinbase-sdk

    StakeApi - interface

    Export

    StakeApi

    -
    interface StakeApiInterface {
        buildStakingOperation(buildStakingOperationRequest, options?): AxiosPromise<StakingOperation>;
        fetchStakingRewards(fetchStakingRewardsRequest, limit?, page?, options?): AxiosPromise<FetchStakingRewards200Response>;
        getStakingContext(getStakingContextRequest, options?): AxiosPromise<StakingContext>;
    }

    Implemented by

    Methods

    interface StakeApiInterface {
        buildStakingOperation(buildStakingOperationRequest, options?): AxiosPromise<StakingOperation>;
        fetchHistoricalStakingBalances(networkId, assetId, addressId, startTime, endTime, limit?, page?, options?): AxiosPromise<FetchHistoricalStakingBalances200Response>;
        fetchStakingRewards(fetchStakingRewardsRequest, limit?, page?, options?): AxiosPromise<FetchStakingRewards200Response>;
        getExternalStakingOperation(networkId, addressId, stakingOperationId, options?): AxiosPromise<StakingOperation>;
        getStakingContext(getStakingContextRequest, options?): AxiosPromise<StakingContext>;
        getValidator(networkId, assetId, validatorId, options?): AxiosPromise<Validator>;
        listValidators(networkId, assetId, status?, limit?, page?, options?): AxiosPromise<ValidatorList>;
    }

    Implemented by

    Methods

    • Fetch historical staking balances for given address.

      +

      Parameters

      • networkId: string

        The ID of the blockchain network.

        +
      • assetId: string

        The ID of the asset for which the historical staking balances are being fetched.

        +
      • addressId: string

        The onchain address for which the historical staking balances are being fetched.

        +
      • startTime: string

        The start time of this historical staking balance period.

        +
      • endTime: string

        The end time of this historical staking balance period.

        +
      • Optional limit: number

        A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 50.

        +
      • Optional page: string

        A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

        +
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<FetchHistoricalStakingBalances200Response>

      Summary

      Fetch historical staking balances

      +

      Throws

      Memberof

      StakeApiInterface

      +
    • Fetch staking rewards for a list of addresses

      Parameters

      • fetchStakingRewardsRequest: FetchStakingRewardsRequest
      • Optional limit: number

        A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 50.

      • Optional page: string

        A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

      • Optional options: RawAxiosRequestConfig

        Override http request option.

      Returns AxiosPromise<FetchStakingRewards200Response>

      Summary

      Fetch staking rewards

      Throws

      Memberof

      StakeApiInterface

      -
    • Get the latest state of a staking operation

      +

      Parameters

      • networkId: string

        The ID of the blockchain network

        +
      • addressId: string

        The ID of the address to fetch the staking operation for

        +
      • stakingOperationId: string

        The ID of the staking operation

        +
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<StakingOperation>

      Summary

      Get the latest state of a staking operation

      +

      Throws

      Memberof

      StakeApiInterface

      +
    • Get staking context for an address

      Parameters

      Returns AxiosPromise<StakingContext>

      Summary

      Get staking context

      Throws

      Memberof

      StakeApiInterface

      -
    \ No newline at end of file +
    • Get a validator belonging to the user for a given network, asset and id.

      +

      Parameters

      • networkId: string

        The ID of the blockchain network.

        +
      • assetId: string

        The symbol of the asset to get the validator for.

        +
      • validatorId: string

        The unique id of the validator to fetch details for.

        +
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<Validator>

      Summary

      Get a validator belonging to the CDP project

      +

      Throws

      Memberof

      StakeApiInterface

      +
    • List validators belonging to the user for a given network and asset.

      +

      Parameters

      • networkId: string

        The ID of the blockchain network.

        +
      • assetId: string

        The symbol of the asset to get the validators for.

        +
      • Optional status: ValidatorStatus

        A filter to list validators based on a status.

        +
      • Optional limit: number

        A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 50.

        +
      • Optional page: string

        A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

        +
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<ValidatorList>

      Summary

      List validators belonging to the CDP project

      +

      Throws

      Memberof

      StakeApiInterface

      +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.StakingBalance.html b/docs/interfaces/client_api.StakingBalance.html new file mode 100644 index 00000000..a3b1cb10 --- /dev/null +++ b/docs/interfaces/client_api.StakingBalance.html @@ -0,0 +1,16 @@ +StakingBalance | @coinbase/coinbase-sdk

    The staking balances for an address.

    +

    Export

    StakingBalance

    +
    interface StakingBalance {
        address: string;
        bonded_stake: Balance;
        date: string;
        participant_type: string;
        unbonded_balance: Balance;
    }

    Properties

    address: string

    The onchain address for which the staking balances are being fetched.

    +

    Memberof

    StakingBalance

    +
    bonded_stake: Balance

    Memberof

    StakingBalance

    +
    date: string

    The timestamp of the staking balance in UTC.

    +

    Memberof

    StakingBalance

    +
    participant_type: string

    The type of staking participation.

    +

    Memberof

    StakingBalance

    +
    unbonded_balance: Balance

    Memberof

    StakingBalance

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.StakingContext.html b/docs/interfaces/client_api.StakingContext.html index 5ce10301..5103d2ad 100644 --- a/docs/interfaces/client_api.StakingContext.html +++ b/docs/interfaces/client_api.StakingContext.html @@ -1,5 +1,5 @@ StakingContext | @coinbase/coinbase-sdk

    Context needed to perform a staking operation

    Export

    StakingContext

    -
    interface StakingContext {
        context: PartialEthStakingContext;
    }

    Properties

    Properties

    Memberof

    StakingContext

    -
    \ No newline at end of file +
    interface StakingContext {
        context: StakingContextContext;
    }

    Properties

    Properties

    Memberof

    StakingContext

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.StakingContextContext.html b/docs/interfaces/client_api.StakingContextContext.html new file mode 100644 index 00000000..e51c81d3 --- /dev/null +++ b/docs/interfaces/client_api.StakingContextContext.html @@ -0,0 +1,10 @@ +StakingContextContext | @coinbase/coinbase-sdk

    Export

    StakingContextContext

    +
    interface StakingContextContext {
        claimable_balance: Balance;
        pending_claimable_balance: Balance;
        stakeable_balance: Balance;
        unstakeable_balance: Balance;
    }

    Properties

    claimable_balance: Balance

    Memberof

    StakingContextContext

    +
    pending_claimable_balance: Balance

    Memberof

    StakingContextContext

    +
    stakeable_balance: Balance

    Memberof

    StakingContextContext

    +
    unstakeable_balance: Balance

    Memberof

    StakingContextContext

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.StakingOperation.html b/docs/interfaces/client_api.StakingOperation.html index 9594d2a1..d5cdad24 100644 --- a/docs/interfaces/client_api.StakingOperation.html +++ b/docs/interfaces/client_api.StakingOperation.html @@ -1,6 +1,23 @@ -StakingOperation | @coinbase/coinbase-sdk

    An onchain transaction to help realize a staking action.

    +StakingOperation | @coinbase/coinbase-sdk

    A list of onchain transactions to help realize a staking action.

    Export

    StakingOperation

    -
    interface StakingOperation {
        transactions: Transaction[];
    }

    Properties

    Properties

    transactions: Transaction[]

    The transaction(s) that will execute the staking operation onchain

    +
    interface StakingOperation {
        address_id: string;
        id: string;
        metadata?: StakingOperationMetadata;
        network_id: string;
        status: StakingOperationStatusEnum;
        transactions: Transaction[];
        wallet_id?: string;
    }

    Properties

    address_id: string

    The onchain address orchestrating the staking operation.

    Memberof

    StakingOperation

    -
    \ No newline at end of file +
    id: string

    The unique ID of the staking operation.

    +

    Memberof

    StakingOperation

    +

    Memberof

    StakingOperation

    +
    network_id: string

    The ID of the blockchain network.

    +

    Memberof

    StakingOperation

    +

    The status of the staking operation.

    +

    Memberof

    StakingOperation

    +
    transactions: Transaction[]

    The transaction(s) that will execute the staking operation onchain.

    +

    Memberof

    StakingOperation

    +
    wallet_id?: string

    The ID of the wallet that owns the address.

    +

    Memberof

    StakingOperation

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.StakingReward.html b/docs/interfaces/client_api.StakingReward.html index 52b30d95..d316338a 100644 --- a/docs/interfaces/client_api.StakingReward.html +++ b/docs/interfaces/client_api.StakingReward.html @@ -1,15 +1,19 @@ -StakingReward | @coinbase/coinbase-sdk

    The staking rewards for an address

    +StakingReward | @coinbase/coinbase-sdk

    The staking rewards for an address.

    Export

    StakingReward

    -
    interface StakingReward {
        address_id: string;
        amount: string;
        date: string;
        state: StakingRewardStateEnum;
    }

    Properties

    interface StakingReward {
        address_id: string;
        amount: string;
        date: string;
        format: StakingRewardFormat;
        state: StakingRewardStateEnum;
        usd_value: StakingRewardUSDValue;
    }

    Properties

    address_id: string

    The onchain address for which the staking rewards are being fetched

    +usd_value +

    Properties

    address_id: string

    The onchain address for which the staking rewards are being fetched.

    Memberof

    StakingReward

    -
    amount: string

    The reward amount in requested "format". Default is USD.

    +
    amount: string

    The reward amount in requested "format". Default is USD.

    Memberof

    StakingReward

    -
    date: string

    The date of the reward in format 'YYYY-MM-DD' in UTC.

    +
    date: string

    The timestamp of the reward in UTC.

    Memberof

    StakingReward

    -

    The state of the reward

    +

    Memberof

    StakingReward

    +

    The state of the reward.

    Memberof

    StakingReward

    -
    \ No newline at end of file +

    Memberof

    StakingReward

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.StakingRewardUSDValue.html b/docs/interfaces/client_api.StakingRewardUSDValue.html new file mode 100644 index 00000000..0306e1a2 --- /dev/null +++ b/docs/interfaces/client_api.StakingRewardUSDValue.html @@ -0,0 +1,12 @@ +StakingRewardUSDValue | @coinbase/coinbase-sdk

    The USD value of the reward

    +

    Export

    StakingRewardUSDValue

    +
    interface StakingRewardUSDValue {
        amount: string;
        conversion_price: string;
        conversion_time: string;
    }

    Properties

    amount: string

    The value of the reward in USD

    +

    Memberof

    StakingRewardUSDValue

    +
    conversion_price: string

    The conversion price from native currency to USD

    +

    Memberof

    StakingRewardUSDValue

    +
    conversion_time: string

    The time of the conversion in UTC.

    +

    Memberof

    StakingRewardUSDValue

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.TokenContractOptions.html b/docs/interfaces/client_api.TokenContractOptions.html new file mode 100644 index 00000000..9fa9acbf --- /dev/null +++ b/docs/interfaces/client_api.TokenContractOptions.html @@ -0,0 +1,12 @@ +TokenContractOptions | @coinbase/coinbase-sdk

    Options for token contract creation

    +

    Export

    TokenContractOptions

    +
    interface TokenContractOptions {
        name: string;
        symbol: string;
        total_supply: string;
    }

    Properties

    Properties

    name: string

    The name of the token

    +

    Memberof

    TokenContractOptions

    +
    symbol: string

    The symbol of the token

    +

    Memberof

    TokenContractOptions

    +
    total_supply: string

    The total supply of the token denominated in the whole amount of the token.

    +

    Memberof

    TokenContractOptions

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.Trade.html b/docs/interfaces/client_api.Trade.html index 32b8d38e..deeb3c70 100644 --- a/docs/interfaces/client_api.Trade.html +++ b/docs/interfaces/client_api.Trade.html @@ -1,6 +1,6 @@ Trade | @coinbase/coinbase-sdk

    A trade of an asset to another asset

    Export

    Trade

    -
    interface Trade {
        address_id: string;
        approve_transaction?: Transaction;
        from_amount: string;
        from_asset: Asset;
        network_id: string;
        to_amount: string;
        to_asset: Asset;
        trade_id: string;
        transaction: Transaction;
        wallet_id: string;
    }

    Properties

    interface Trade {
        address_id: string;
        approve_transaction?: Transaction;
        from_amount: string;
        from_asset: Asset;
        network_id: string;
        to_amount: string;
        to_asset: Asset;
        trade_id: string;
        transaction: Transaction;
        wallet_id: string;
    }

    Properties

    address_id: string

    The onchain address of the sender

    Memberof

    Trade

    -
    approve_transaction?: Transaction

    Memberof

    Trade

    -
    from_amount: string

    The amount of the from asset to be traded (in atomic units of the from asset)

    +
    approve_transaction?: Transaction

    Memberof

    Trade

    +
    from_amount: string

    The amount of the from asset to be traded (in atomic units of the from asset)

    Memberof

    Trade

    -
    from_asset: Asset

    Memberof

    Trade

    -
    network_id: string

    The ID of the blockchain network

    +
    from_asset: Asset

    Memberof

    Trade

    +
    network_id: string

    The ID of the blockchain network

    Memberof

    Trade

    -
    to_amount: string

    The amount of the to asset that will be received (in atomic units of the to asset)

    +
    to_amount: string

    The amount of the to asset that will be received (in atomic units of the to asset)

    Memberof

    Trade

    -
    to_asset: Asset

    Memberof

    Trade

    -
    trade_id: string

    The ID of the trade

    +
    to_asset: Asset

    Memberof

    Trade

    +
    trade_id: string

    The ID of the trade

    Memberof

    Trade

    -
    transaction: Transaction

    Memberof

    Trade

    -
    wallet_id: string

    The ID of the wallet that owns the from address

    +
    transaction: Transaction

    Memberof

    Trade

    +
    wallet_id: string

    The ID of the wallet that owns the from address

    Memberof

    Trade

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.TradeList.html b/docs/interfaces/client_api.TradeList.html index 9bff5d49..76224d8e 100644 --- a/docs/interfaces/client_api.TradeList.html +++ b/docs/interfaces/client_api.TradeList.html @@ -1,13 +1,13 @@ TradeList | @coinbase/coinbase-sdk

    Export

    TradeList

    -
    interface TradeList {
        data: Trade[];
        has_more: boolean;
        next_page: string;
        total_count: number;
    }

    Properties

    interface TradeList {
        data: Trade[];
        has_more: boolean;
        next_page: string;
        total_count: number;
    }

    Properties

    data: Trade[]

    Memberof

    TradeList

    -
    has_more: boolean

    True if this list has another page of items after this one that can be fetched.

    +
    has_more: boolean

    True if this list has another page of items after this one that can be fetched.

    Memberof

    TradeList

    -
    next_page: string

    The page token to be used to fetch the next page.

    +
    next_page: string

    The page token to be used to fetch the next page.

    Memberof

    TradeList

    -
    total_count: number

    The total number of trades for the address in the wallet.

    +
    total_count: number

    The total number of trades for the address in the wallet.

    Memberof

    TradeList

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.TradesApiInterface.html b/docs/interfaces/client_api.TradesApiInterface.html index b7eff924..e9713daf 100644 --- a/docs/interfaces/client_api.TradesApiInterface.html +++ b/docs/interfaces/client_api.TradesApiInterface.html @@ -1,6 +1,6 @@ TradesApiInterface | @coinbase/coinbase-sdk

    TradesApi - interface

    Export

    TradesApi

    -
    interface TradesApiInterface {
        broadcastTrade(walletId, addressId, tradeId, broadcastTradeRequest, options?): AxiosPromise<Trade>;
        createTrade(walletId, addressId, createTradeRequest, options?): AxiosPromise<Trade>;
        getTrade(walletId, addressId, tradeId, options?): AxiosPromise<Trade>;
        listTrades(walletId, addressId, limit?, page?, options?): AxiosPromise<TradeList>;
    }

    Implemented by

    Methods

    interface TradesApiInterface {
        broadcastTrade(walletId, addressId, tradeId, broadcastTradeRequest, options?): AxiosPromise<Trade>;
        createTrade(walletId, addressId, createTradeRequest, options?): AxiosPromise<Trade>;
        getTrade(walletId, addressId, tradeId, options?): AxiosPromise<Trade>;
        listTrades(walletId, addressId, limit?, page?, options?): AxiosPromise<TradeList>;
    }

    Implemented by

    Methods

  • broadcastTradeRequest: BroadcastTradeRequest
  • Optional options: RawAxiosRequestConfig

    Override http request option.

  • Returns AxiosPromise<Trade>

    Summary

    Broadcast a trade

    Throws

    Memberof

    TradesApiInterface

    -
    • Create a new trade

      Parameters

      • walletId: string

        The ID of the wallet the source address belongs to

      • addressId: string

        The ID of the address to conduct the trade from

      • createTradeRequest: CreateTradeRequest
      • Optional options: RawAxiosRequestConfig

        Override http request option.

      Returns AxiosPromise<Trade>

      Summary

      Create a new trade for an address

      Throws

      Memberof

      TradesApiInterface

      -
    • Get a trade by ID

      Parameters

      • walletId: string

        The ID of the wallet the address belongs to

      • addressId: string

        The ID of the address the trade belongs to

      • tradeId: string

        The ID of the trade to fetch

      • Optional options: RawAxiosRequestConfig

        Override http request option.

      Returns AxiosPromise<Trade>

      Summary

      Get a trade by ID

      Throws

      Memberof

      TradesApiInterface

      -
    • List trades for an address.

      Parameters

      • walletId: string

        The ID of the wallet the address belongs to

      • addressId: string

        The ID of the address to list trades for

      • Optional limit: number

        A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

        @@ -32,4 +32,4 @@

        Throws

        Memberof

        TradesApiInterface

      • Optional options: RawAxiosRequestConfig

        Override http request option.

      Returns AxiosPromise<TradeList>

      Summary

      List trades for an address.

      Throws

      Memberof

      TradesApiInterface

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.Transaction.html b/docs/interfaces/client_api.Transaction.html index f0e51491..9750b555 100644 --- a/docs/interfaces/client_api.Transaction.html +++ b/docs/interfaces/client_api.Transaction.html @@ -1,24 +1,35 @@ Transaction | @coinbase/coinbase-sdk

    An onchain transaction.

    Export

    Transaction

    -
    interface Transaction {
        from_address_id: string;
        network_id: string;
        signed_payload?: string;
        status: TransactionStatusEnum;
        transaction_hash?: string;
        transaction_link?: string;
        unsigned_payload: string;
    }

    Properties

    interface Transaction {
        block_hash?: string;
        block_height?: string;
        content?: EthereumTransaction;
        from_address_id: string;
        network_id: string;
        signed_payload?: string;
        status: TransactionStatusEnum;
        to_address_id?: string;
        transaction_hash?: string;
        transaction_link?: string;
        unsigned_payload: string;
    }

    Properties

    from_address_id: string

    The onchain address of the sender

    +

    Properties

    block_hash?: string

    The hash of the block at which the transaction was recorded.

    Memberof

    Transaction

    -
    network_id: string

    The ID of the blockchain network

    +
    block_height?: string

    The block height at which the transaction was recorded.

    Memberof

    Transaction

    -
    signed_payload?: string

    The signed payload of the transaction. This is the payload that has been signed by the sender.

    +

    Memberof

    Transaction

    +
    from_address_id: string

    The onchain address of the sender.

    Memberof

    Transaction

    -

    The status of the transaction

    +
    network_id: string

    The ID of the blockchain network.

    Memberof

    Transaction

    -
    transaction_hash?: string

    The hash of the transaction

    +
    signed_payload?: string

    The signed payload of the transaction. This is the payload that has been signed by the sender.

    Memberof

    Transaction

    -
    transaction_link?: string

    The link to view the transaction on a block explorer. This is optional and may not be present for all transactions.

    +

    The status of the transaction.

    Memberof

    Transaction

    -
    unsigned_payload: string

    The unsigned payload of the transaction. This is the payload that needs to be signed by the sender.

    +
    to_address_id?: string

    The onchain address of the recipient.

    Memberof

    Transaction

    -
    \ No newline at end of file +
    transaction_hash?: string

    The hash of the transaction.

    +

    Memberof

    Transaction

    +
    transaction_link?: string

    The link to view the transaction on a block explorer. This is optional and may not be present for all transactions.

    +

    Memberof

    Transaction

    +
    unsigned_payload: string

    The unsigned payload of the transaction. This is the payload that needs to be signed by the sender.

    +

    Memberof

    Transaction

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.TransactionHistoryApiInterface.html b/docs/interfaces/client_api.TransactionHistoryApiInterface.html new file mode 100644 index 00000000..f0ba18c2 --- /dev/null +++ b/docs/interfaces/client_api.TransactionHistoryApiInterface.html @@ -0,0 +1,12 @@ +TransactionHistoryApiInterface | @coinbase/coinbase-sdk

    TransactionHistoryApi - interface

    +

    Export

    TransactionHistoryApi

    +
    interface TransactionHistoryApiInterface {
        listAddressTransactions(networkId, addressId, limit?, page?, options?): AxiosPromise<AddressTransactionList>;
    }

    Implemented by

    Methods

    • List all transactions that interact with the address.

      +

      Parameters

      • networkId: string

        The ID of the blockchain network

        +
      • addressId: string

        The ID of the address to fetch the transactions for.

        +
      • Optional limit: number

        A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

        +
      • Optional page: string

        A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

        +
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<AddressTransactionList>

      Summary

      List transactions for an address.

      +

      Throws

      Memberof

      TransactionHistoryApiInterface

      +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.TransactionLog.html b/docs/interfaces/client_api.TransactionLog.html new file mode 100644 index 00000000..9f357d66 --- /dev/null +++ b/docs/interfaces/client_api.TransactionLog.html @@ -0,0 +1,11 @@ +TransactionLog | @coinbase/coinbase-sdk

    A log emitted from an onchain transaction.

    +

    Export

    TransactionLog

    +
    interface TransactionLog {
        address: string;
        data: string;
        topics: string[];
    }

    Properties

    Properties

    address: string

    An onchain address of a contract.

    +

    Memberof

    TransactionLog

    +
    data: string

    The data included in this log.

    +

    Memberof

    TransactionLog

    +
    topics: string[]

    Memberof

    TransactionLog

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.TransactionReceipt.html b/docs/interfaces/client_api.TransactionReceipt.html new file mode 100644 index 00000000..92eed44a --- /dev/null +++ b/docs/interfaces/client_api.TransactionReceipt.html @@ -0,0 +1,14 @@ +TransactionReceipt | @coinbase/coinbase-sdk

    The receipt of an onchain transaction's execution.

    +

    Export

    TransactionReceipt

    +
    interface TransactionReceipt {
        effective_gas_price: string;
        gas_used: string;
        logs: TransactionLog[];
        status: number;
    }

    Properties

    effective_gas_price: string

    The effective gas price the transaction was charged at.

    +

    Memberof

    TransactionReceipt

    +
    gas_used: string

    The amount of gas actually used by this transaction.

    +

    Memberof

    TransactionReceipt

    +

    Memberof

    TransactionReceipt

    +
    status: number

    The status of a transaction is 1 if successful or 0 if it was reverted.

    +

    Memberof

    TransactionReceipt

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.Transfer.html b/docs/interfaces/client_api.Transfer.html index 0dcf15dd..c4445921 100644 --- a/docs/interfaces/client_api.Transfer.html +++ b/docs/interfaces/client_api.Transfer.html @@ -1,40 +1,44 @@ Transfer | @coinbase/coinbase-sdk

    A transfer of an asset from one address to another

    Export

    Transfer

    -
    interface Transfer {
        address_id: string;
        amount: string;
        asset: Asset;
        asset_id: string;
        destination: string;
        network_id: string;
        signed_payload?: string;
        status: TransferStatusEnum;
        transaction: Transaction;
        transaction_hash?: string;
        transfer_id: string;
        unsigned_payload: string;
        wallet_id: string;
    }

    Properties

    interface Transfer {
        address_id: string;
        amount: string;
        asset: Asset;
        asset_id: string;
        destination: string;
        gasless: boolean;
        network_id: string;
        signed_payload?: string;
        sponsored_send?: SponsoredSend;
        status?: string;
        transaction?: Transaction;
        transaction_hash?: string;
        transfer_id: string;
        unsigned_payload?: string;
        wallet_id: string;
    }

    Properties

    address_id: string

    The onchain address of the sender

    Memberof

    Transfer

    -
    amount: string

    The amount in the atomic units of the asset

    +
    amount: string

    The amount in the atomic units of the asset

    Memberof

    Transfer

    -
    asset: Asset

    Memberof

    Transfer

    -
    asset_id: string

    The ID of the asset being transferred

    +
    asset: Asset

    Memberof

    Transfer

    +
    asset_id: string

    The ID of the asset being transferred. Use asset.asset_id instead.

    Memberof

    Transfer

    -
    destination: string

    The onchain address of the recipient

    +

    Deprecated

    destination: string

    The onchain address of the recipient

    Memberof

    Transfer

    -
    network_id: string

    The ID of the blockchain network

    +
    gasless: boolean

    Whether the transfer uses sponsored gas

    Memberof

    Transfer

    -
    signed_payload?: string

    The signed payload of the transfer. This is the payload that has been signed by the sender.

    +
    network_id: string

    The ID of the blockchain network

    Memberof

    Transfer

    -

    The status of the transfer

    +
    signed_payload?: string

    The signed payload of the transfer. This is the payload that has been signed by the sender.

    Memberof

    Transfer

    -
    transaction: Transaction

    Memberof

    Transfer

    -
    transaction_hash?: string

    The hash of the transfer transaction

    +

    Deprecated

    sponsored_send?: SponsoredSend

    Memberof

    Transfer

    +
    status?: string

    Memberof

    Transfer

    +

    Deprecated

    transaction?: Transaction

    Memberof

    Transfer

    +
    transaction_hash?: string

    The hash of the transfer transaction

    Memberof

    Transfer

    -
    transfer_id: string

    The ID of the transfer

    +

    Deprecated

    transfer_id: string

    The ID of the transfer

    Memberof

    Transfer

    -
    unsigned_payload: string

    The unsigned payload of the transfer. This is the payload that needs to be signed by the sender.

    +
    unsigned_payload?: string

    The unsigned payload of the transfer. This is the payload that needs to be signed by the sender.

    Memberof

    Transfer

    -
    wallet_id: string

    The ID of the wallet that owns the from address

    +

    Deprecated

    wallet_id: string

    The ID of the wallet that owns the from address

    Memberof

    Transfer

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.TransferList.html b/docs/interfaces/client_api.TransferList.html index 77f2bace..fa128d6e 100644 --- a/docs/interfaces/client_api.TransferList.html +++ b/docs/interfaces/client_api.TransferList.html @@ -1,13 +1,13 @@ TransferList | @coinbase/coinbase-sdk

    Export

    TransferList

    -
    interface TransferList {
        data: Transfer[];
        has_more: boolean;
        next_page: string;
        total_count: number;
    }

    Properties

    interface TransferList {
        data: Transfer[];
        has_more: boolean;
        next_page: string;
        total_count: number;
    }

    Properties

    data: Transfer[]

    Memberof

    TransferList

    -
    has_more: boolean

    True if this list has another page of items after this one that can be fetched.

    +
    has_more: boolean

    True if this list has another page of items after this one that can be fetched.

    Memberof

    TransferList

    -
    next_page: string

    The page token to be used to fetch the next page.

    +
    next_page: string

    The page token to be used to fetch the next page.

    Memberof

    TransferList

    -
    total_count: number

    The total number of transfers for the address in the wallet.

    +
    total_count: number

    The total number of transfers for the address in the wallet.

    Memberof

    TransferList

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.TransfersApiInterface.html b/docs/interfaces/client_api.TransfersApiInterface.html index f4c15d84..34752e04 100644 --- a/docs/interfaces/client_api.TransfersApiInterface.html +++ b/docs/interfaces/client_api.TransfersApiInterface.html @@ -1,6 +1,6 @@ TransfersApiInterface | @coinbase/coinbase-sdk

    TransfersApi - interface

    Export

    TransfersApi

    -
    interface TransfersApiInterface {
        broadcastTransfer(walletId, addressId, transferId, broadcastTransferRequest, options?): AxiosPromise<Transfer>;
        createTransfer(walletId, addressId, createTransferRequest, options?): AxiosPromise<Transfer>;
        getTransfer(walletId, addressId, transferId, options?): AxiosPromise<Transfer>;
        listTransfers(walletId, addressId, limit?, page?, options?): AxiosPromise<TransferList>;
    }

    Implemented by

    Methods

    interface TransfersApiInterface {
        broadcastTransfer(walletId, addressId, transferId, broadcastTransferRequest, options?): AxiosPromise<Transfer>;
        createTransfer(walletId, addressId, createTransferRequest, options?): AxiosPromise<Transfer>;
        getTransfer(walletId, addressId, transferId, options?): AxiosPromise<Transfer>;
        listTransfers(walletId, addressId, limit?, page?, options?): AxiosPromise<TransferList>;
    }

    Implemented by

    Methods

  • broadcastTransferRequest: BroadcastTransferRequest
  • Optional options: RawAxiosRequestConfig

    Override http request option.

  • Returns AxiosPromise<Transfer>

    Summary

    Broadcast a transfer

    Throws

    Memberof

    TransfersApiInterface

    -
    • Create a new transfer

      Parameters

      • walletId: string

        The ID of the wallet the source address belongs to

      • addressId: string

        The ID of the address to transfer from

      • createTransferRequest: CreateTransferRequest
      • Optional options: RawAxiosRequestConfig

        Override http request option.

      Returns AxiosPromise<Transfer>

      Summary

      Create a new transfer for an address

      Throws

      Memberof

      TransfersApiInterface

      -
    • Get a transfer by ID

      Parameters

      • walletId: string

        The ID of the wallet the address belongs to

      • addressId: string

        The ID of the address the transfer belongs to

      • transferId: string

        The ID of the transfer to fetch

      • Optional options: RawAxiosRequestConfig

        Override http request option.

      Returns AxiosPromise<Transfer>

      Summary

      Get a transfer by ID

      Throws

      Memberof

      TransfersApiInterface

      -
    • List transfers for an address.

      Parameters

      • walletId: string

        The ID of the wallet the address belongs to

      • addressId: string

        The ID of the address to list transfers for

      • Optional limit: number

        A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

        @@ -32,4 +32,4 @@

        Throws

        Memberof

        TransfersApiInterface

      • Optional options: RawAxiosRequestConfig

        Override http request option.

      Returns AxiosPromise<TransferList>

      Summary

      List transfers for an address.

      Throws

      Memberof

      TransfersApiInterface

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.UpdateSmartContractRequest.html b/docs/interfaces/client_api.UpdateSmartContractRequest.html new file mode 100644 index 00000000..c3bb0827 --- /dev/null +++ b/docs/interfaces/client_api.UpdateSmartContractRequest.html @@ -0,0 +1,9 @@ +UpdateSmartContractRequest | @coinbase/coinbase-sdk

    Smart Contract data to be updated

    +

    Export

    UpdateSmartContractRequest

    +
    interface UpdateSmartContractRequest {
        abi?: string;
        contract_name?: string;
    }

    Properties

    Properties

    abi?: string

    ABI of the smart contract

    +

    Memberof

    UpdateSmartContractRequest

    +
    contract_name?: string

    Name of the smart contract

    +

    Memberof

    UpdateSmartContractRequest

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.UpdateWebhookRequest.html b/docs/interfaces/client_api.UpdateWebhookRequest.html new file mode 100644 index 00000000..29b82b6d --- /dev/null +++ b/docs/interfaces/client_api.UpdateWebhookRequest.html @@ -0,0 +1,12 @@ +UpdateWebhookRequest | @coinbase/coinbase-sdk

    Export

    UpdateWebhookRequest

    +
    interface UpdateWebhookRequest {
        event_filters?: WebhookEventFilter[];
        event_type_filter?: WebhookEventTypeFilter;
        notification_uri?: string;
        status?: WebhookStatus;
    }

    Properties

    event_filters?: WebhookEventFilter[]

    Webhook will monitor all events that matches any one of the event filters.

    +

    Memberof

    UpdateWebhookRequest

    +
    event_type_filter?: WebhookEventTypeFilter

    Memberof

    UpdateWebhookRequest

    +
    notification_uri?: string

    The Webhook uri that updates to

    +

    Memberof

    UpdateWebhookRequest

    +
    status?: WebhookStatus

    Memberof

    UpdateWebhookRequest

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.User.html b/docs/interfaces/client_api.User.html index b1cdb32d..7c776d1f 100644 --- a/docs/interfaces/client_api.User.html +++ b/docs/interfaces/client_api.User.html @@ -1,7 +1,7 @@ User | @coinbase/coinbase-sdk

    Export

    User

    -
    interface User {
        display_name?: string;
        id: string;
    }

    Properties

    interface User {
        display_name?: string;
        id: string;
    }

    Properties

    Properties

    display_name?: string

    Memberof

    User

    -
    id: string

    The ID of the user

    +
    id: string

    The ID of the user

    Memberof

    User

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.UserOperation.html b/docs/interfaces/client_api.UserOperation.html new file mode 100644 index 00000000..a2a66a26 --- /dev/null +++ b/docs/interfaces/client_api.UserOperation.html @@ -0,0 +1,26 @@ +UserOperation | @coinbase/coinbase-sdk

    Export

    UserOperation

    +
    interface UserOperation {
        calls: Call[];
        id: string;
        network_id: string;
        signature?: string;
        status: UserOperationStatusEnum;
        transaction_hash?: string;
        unsigned_payload: string;
        user_op_hash: string;
    }

    Properties

    calls: Call[]

    The list of calls to make from the smart wallet.

    +

    Memberof

    UserOperation

    +
    id: string

    The ID of the user operation.

    +

    Memberof

    UserOperation

    +
    network_id: string

    The ID of the network the user operation is being created on.

    +

    Memberof

    UserOperation

    +
    signature?: string

    The hex-encoded signature of the user operation.

    +

    Memberof

    UserOperation

    +

    The status of the user operation.

    +

    Memberof

    UserOperation

    +
    transaction_hash?: string

    The hash of the transaction that was broadcast.

    +

    Memberof

    UserOperation

    +
    unsigned_payload: string

    The hex-encoded hash that must be signed by the user.

    +

    Memberof

    UserOperation

    +

    Deprecated

    user_op_hash: string

    The unique identifier for the user operation onchain. This is the payload that must be signed by one of the owners of the smart wallet to send the user operation.

    +

    Memberof

    UserOperation

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.UsersApiInterface.html b/docs/interfaces/client_api.UsersApiInterface.html index 968c8932..731baca2 100644 --- a/docs/interfaces/client_api.UsersApiInterface.html +++ b/docs/interfaces/client_api.UsersApiInterface.html @@ -1,8 +1,8 @@ UsersApiInterface | @coinbase/coinbase-sdk

    UsersApi - interface

    Export

    UsersApi

    -
    interface UsersApiInterface {
        getCurrentUser(options?): AxiosPromise<User>;
    }

    Implemented by

    Methods

    interface UsersApiInterface {
        getCurrentUser(options?): AxiosPromise<User>;
    }

    Implemented by

    Methods

    • Get current user

      Parameters

      • Optional options: RawAxiosRequestConfig

        Override http request option.

      Returns AxiosPromise<User>

      Summary

      Get current user

      Throws

      Memberof

      UsersApiInterface

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.Validator.html b/docs/interfaces/client_api.Validator.html new file mode 100644 index 00000000..224ed734 --- /dev/null +++ b/docs/interfaces/client_api.Validator.html @@ -0,0 +1,16 @@ +Validator | @coinbase/coinbase-sdk

    A validator onchain.

    +

    Export

    Validator

    +
    interface Validator {
        asset_id: string;
        details?: EthereumValidatorMetadata;
        network_id: string;
        status: ValidatorStatus;
        validator_id: string;
    }

    Properties

    asset_id: string

    The ID of the asset that the validator helps stake.

    +

    Memberof

    Validator

    +

    Memberof

    Validator

    +
    network_id: string

    The ID of the blockchain network to which the Validator belongs.

    +

    Memberof

    Validator

    +

    Memberof

    Validator

    +
    validator_id: string

    The publicly identifiable unique id of the validator. This can be the public key for Ethereum validators and maybe an address for some other network.

    +

    Memberof

    Validator

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.ValidatorList.html b/docs/interfaces/client_api.ValidatorList.html new file mode 100644 index 00000000..43f7f7a0 --- /dev/null +++ b/docs/interfaces/client_api.ValidatorList.html @@ -0,0 +1,10 @@ +ValidatorList | @coinbase/coinbase-sdk

    Export

    ValidatorList

    +
    interface ValidatorList {
        data: Validator[];
        has_more: boolean;
        next_page: string;
    }

    Properties

    Properties

    data: Validator[]

    Memberof

    ValidatorList

    +
    has_more: boolean

    True if this list has another page of items after this one that can be fetched.

    +

    Memberof

    ValidatorList

    +
    next_page: string

    The page token to be used to fetch the next page.

    +

    Memberof

    ValidatorList

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.Wallet.html b/docs/interfaces/client_api.Wallet.html index 3544f4be..76d6a394 100644 --- a/docs/interfaces/client_api.Wallet.html +++ b/docs/interfaces/client_api.Wallet.html @@ -1,16 +1,15 @@ Wallet | @coinbase/coinbase-sdk

    Export

    Wallet

    -
    interface Wallet {
        default_address?: Address;
        enabled_features: Feature[];
        id: string;
        network_id: string;
        server_signer_status?: WalletServerSignerStatusEnum;
    }

    Properties

    interface Wallet {
        default_address?: Address;
        feature_set: FeatureSet;
        id: string;
        network_id: string;
        server_signer_status?: WalletServerSignerStatusEnum;
    }

    Properties

    default_address?: Address

    Memberof

    Wallet

    -
    enabled_features: Feature[]

    The features enabled for the wallet

    +
    feature_set: FeatureSet

    Memberof

    Wallet

    +
    id: string

    The server-assigned ID for the wallet.

    Memberof

    Wallet

    -
    id: string

    The server-assigned ID for the wallet.

    +
    network_id: string

    The ID of the blockchain network

    Memberof

    Wallet

    -
    network_id: string

    The ID of the blockchain network

    +
    server_signer_status?: WalletServerSignerStatusEnum

    The status of the Server-Signer for the wallet if present.

    Memberof

    Wallet

    -
    server_signer_status?: WalletServerSignerStatusEnum

    The status of the Server-Signer for the wallet if present.

    -

    Memberof

    Wallet

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.WalletList.html b/docs/interfaces/client_api.WalletList.html index db9667e9..14b5c36e 100644 --- a/docs/interfaces/client_api.WalletList.html +++ b/docs/interfaces/client_api.WalletList.html @@ -1,14 +1,14 @@ WalletList | @coinbase/coinbase-sdk

    Paginated list of wallets

    Export

    WalletList

    -
    interface WalletList {
        data: Wallet[];
        has_more: boolean;
        next_page: string;
        total_count: number;
    }

    Properties

    interface WalletList {
        data: Wallet[];
        has_more: boolean;
        next_page: string;
        total_count: number;
    }

    Properties

    data: Wallet[]

    Memberof

    WalletList

    -
    has_more: boolean

    True if this list has another page of items after this one that can be fetched.

    +
    has_more: boolean

    True if this list has another page of items after this one that can be fetched.

    Memberof

    WalletList

    -
    next_page: string

    The page token to be used to fetch the next page.

    +
    next_page: string

    The page token to be used to fetch the next page.

    Memberof

    WalletList

    -
    total_count: number

    The total number of wallets

    +
    total_count: number

    The total number of wallets

    Memberof

    WalletList

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.WalletsApiInterface.html b/docs/interfaces/client_api.WalletsApiInterface.html index cfab6ce6..ed665572 100644 --- a/docs/interfaces/client_api.WalletsApiInterface.html +++ b/docs/interfaces/client_api.WalletsApiInterface.html @@ -1,6 +1,6 @@ WalletsApiInterface | @coinbase/coinbase-sdk

    WalletsApi - interface

    Export

    WalletsApi

    -
    interface WalletsApiInterface {
        createWallet(createWalletRequest?, options?): AxiosPromise<Wallet>;
        getWallet(walletId, options?): AxiosPromise<Wallet>;
        getWalletBalance(walletId, assetId, options?): AxiosPromise<Balance>;
        listWalletBalances(walletId, options?): AxiosPromise<AddressBalanceList>;
        listWallets(limit?, page?, options?): AxiosPromise<WalletList>;
    }

    Implemented by

    Methods

    interface WalletsApiInterface {
        createWallet(createWalletRequest?, options?): AxiosPromise<Wallet>;
        getWallet(walletId, options?): AxiosPromise<Wallet>;
        getWalletBalance(walletId, assetId, options?): AxiosPromise<Balance>;
        listWalletBalances(walletId, options?): AxiosPromise<AddressBalanceList>;
        listWallets(limit?, page?, options?): AxiosPromise<WalletList>;
    }

    Implemented by

    Methods

    Parameters

    • Optional createWalletRequest: CreateWalletRequest
    • Optional options: RawAxiosRequestConfig

      Override http request option.

    Returns AxiosPromise<Wallet>

    Summary

    Create a new wallet

    Throws

    Memberof

    WalletsApiInterface

    -
    • Get wallet

      Parameters

      • walletId: string

        The ID of the wallet to fetch

      • Optional options: RawAxiosRequestConfig

        Override http request option.

      Returns AxiosPromise<Wallet>

      Summary

      Get wallet by ID

      Throws

      Memberof

      WalletsApiInterface

      -
    • Get the aggregated balance of an asset across all of the addresses in the wallet.

      +
    • Get the aggregated balance of an asset across all of the addresses in the wallet.

      Parameters

      • walletId: string

        The ID of the wallet to fetch the balance for

      • assetId: string

        The symbol of the asset to fetch the balance for

      • Optional options: RawAxiosRequestConfig

        Override http request option.

      Returns AxiosPromise<Balance>

      Summary

      Get the balance of an asset in the wallet

      Throws

      Memberof

      WalletsApiInterface

      -
    • List the balances of all of the addresses in the wallet aggregated by asset.

      Parameters

      • walletId: string

        The ID of the wallet to fetch the balances for

      • Optional options: RawAxiosRequestConfig

        Override http request option.

      Returns AxiosPromise<AddressBalanceList>

      Summary

      List wallet balances

      Throws

      Memberof

      WalletsApiInterface

      -
    • List wallets belonging to the user.

      Parameters

      • Optional limit: number

        A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

      • Optional page: string

        A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

      • Optional options: RawAxiosRequestConfig

        Override http request option.

      Returns AxiosPromise<WalletList>

      Summary

      List wallets

      Throws

      Memberof

      WalletsApiInterface

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.Webhook.html b/docs/interfaces/client_api.Webhook.html new file mode 100644 index 00000000..8cf1c31d --- /dev/null +++ b/docs/interfaces/client_api.Webhook.html @@ -0,0 +1,30 @@ +Webhook | @coinbase/coinbase-sdk

    Webhook that is used for getting notifications when monitored events occur.

    +

    Export

    Webhook

    +
    interface Webhook {
        created_at?: string;
        event_filters?: WebhookEventFilter[];
        event_type?: WebhookEventType;
        event_type_filter?: WebhookEventTypeFilter;
        id?: string;
        network_id?: string;
        notification_uri?: string;
        signature_header?: string;
        status: WebhookStatus;
        updated_at?: string;
    }

    Properties

    created_at?: string

    The date and time the webhook was created.

    +

    Memberof

    Webhook

    +
    event_filters?: WebhookEventFilter[]

    Webhook will monitor all events that matches any one of the event filters.

    +

    Memberof

    Webhook

    +
    event_type?: WebhookEventType

    Memberof

    Webhook

    +
    event_type_filter?: WebhookEventTypeFilter

    Memberof

    Webhook

    +
    id?: string

    Identifier of the webhook.

    +

    Memberof

    Webhook

    +
    network_id?: string

    The ID of the blockchain network

    +

    Memberof

    Webhook

    +
    notification_uri?: string

    The URL to which the notifications will be sent.

    +

    Memberof

    Webhook

    +
    signature_header?: string

    The header that will contain the signature of the webhook payload.

    +

    Memberof

    Webhook

    +

    Memberof

    Webhook

    +
    updated_at?: string

    The date and time the webhook was last updated.

    +

    Memberof

    Webhook

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.WebhookEventFilter.html b/docs/interfaces/client_api.WebhookEventFilter.html new file mode 100644 index 00000000..bc9fba27 --- /dev/null +++ b/docs/interfaces/client_api.WebhookEventFilter.html @@ -0,0 +1,12 @@ +WebhookEventFilter | @coinbase/coinbase-sdk

    The event_filter parameter specifies the criteria to filter events from the blockchain. It allows filtering events by contract address, sender address and receiver address. For a single event filter, not all of the properties need to be presented.

    +

    Export

    WebhookEventFilter

    +
    interface WebhookEventFilter {
        contract_address?: string;
        from_address?: string;
        to_address?: string;
    }

    Properties

    contract_address?: string

    The onchain contract address of the token for which the events should be tracked.

    +

    Memberof

    WebhookEventFilter

    +
    from_address?: string

    The onchain address of the sender. Set this filter to track all transfer events originating from your address.

    +

    Memberof

    WebhookEventFilter

    +
    to_address?: string

    The onchain address of the receiver. Set this filter to track all transfer events sent to your address.

    +

    Memberof

    WebhookEventFilter

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.WebhookList.html b/docs/interfaces/client_api.WebhookList.html new file mode 100644 index 00000000..9261d285 --- /dev/null +++ b/docs/interfaces/client_api.WebhookList.html @@ -0,0 +1,10 @@ +WebhookList | @coinbase/coinbase-sdk

    Export

    WebhookList

    +
    interface WebhookList {
        data: Webhook[];
        has_more?: boolean;
        next_page?: string;
    }

    Properties

    Properties

    data: Webhook[]

    Memberof

    WebhookList

    +
    has_more?: boolean

    True if this list has another page of items after this one that can be fetched.

    +

    Memberof

    WebhookList

    +
    next_page?: string

    The page token to be used to fetch the next page.

    +

    Memberof

    WebhookList

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.WebhookSmartContractEventFilter.html b/docs/interfaces/client_api.WebhookSmartContractEventFilter.html new file mode 100644 index 00000000..36ea8e04 --- /dev/null +++ b/docs/interfaces/client_api.WebhookSmartContractEventFilter.html @@ -0,0 +1,6 @@ +WebhookSmartContractEventFilter | @coinbase/coinbase-sdk

    Filter for smart contract events. This filter allows the client to specify smart contract addresses to monitor for activities such as contract function calls.

    +

    Export

    WebhookSmartContractEventFilter

    +
    interface WebhookSmartContractEventFilter {
        contract_addresses: string[];
    }

    Properties

    Properties

    contract_addresses: string[]

    A list of smart contract addresses to filter on.

    +

    Memberof

    WebhookSmartContractEventFilter

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.WebhookWalletActivityFilter.html b/docs/interfaces/client_api.WebhookWalletActivityFilter.html new file mode 100644 index 00000000..858d5cc2 --- /dev/null +++ b/docs/interfaces/client_api.WebhookWalletActivityFilter.html @@ -0,0 +1,9 @@ +WebhookWalletActivityFilter | @coinbase/coinbase-sdk

    Filter for wallet activity events. This filter allows the client to specify one or more wallet addresses to monitor for activities such as transactions, transfers, or other types of events that are associated with the specified addresses.

    +

    Export

    WebhookWalletActivityFilter

    +
    interface WebhookWalletActivityFilter {
        addresses?: string[];
        wallet_id: string;
    }

    Properties

    Properties

    addresses?: string[]

    A list of wallet addresses to filter on.

    +

    Memberof

    WebhookWalletActivityFilter

    +
    wallet_id: string

    The ID of the wallet that owns the webhook.

    +

    Memberof

    WebhookWalletActivityFilter

    +
    \ No newline at end of file diff --git a/docs/interfaces/client_api.WebhooksApiInterface.html b/docs/interfaces/client_api.WebhooksApiInterface.html new file mode 100644 index 00000000..c287f100 --- /dev/null +++ b/docs/interfaces/client_api.WebhooksApiInterface.html @@ -0,0 +1,33 @@ +WebhooksApiInterface | @coinbase/coinbase-sdk

    WebhooksApi - interface

    +

    Export

    WebhooksApi

    +
    interface WebhooksApiInterface {
        createWalletWebhook(walletId, createWalletWebhookRequest?, options?): AxiosPromise<Webhook>;
        createWebhook(createWebhookRequest?, options?): AxiosPromise<Webhook>;
        deleteWebhook(webhookId, options?): AxiosPromise<void>;
        listWebhooks(limit?, page?, options?): AxiosPromise<WebhookList>;
        updateWebhook(webhookId, updateWebhookRequest?, options?): AxiosPromise<Webhook>;
    }

    Implemented by

    Methods

    • Create a new webhook scoped to a wallet

      +

      Parameters

      • walletId: string

        The ID of the wallet to create the webhook for.

        +
      • Optional createWalletWebhookRequest: CreateWalletWebhookRequest
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<Webhook>

      Summary

      Create a new webhook scoped to a wallet

      +

      Throws

      Memberof

      WebhooksApiInterface

      +
    • Create a new webhook

      +

      Parameters

      • Optional createWebhookRequest: CreateWebhookRequest
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<Webhook>

      Summary

      Create a new webhook

      +

      Throws

      Memberof

      WebhooksApiInterface

      +
    • Delete a webhook

      +

      Parameters

      • webhookId: string

        The Webhook uuid that needs to be deleted

        +
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<void>

      Summary

      Delete a webhook

      +

      Throws

      Memberof

      WebhooksApiInterface

      +
    • List webhooks, optionally filtered by event type.

      +

      Parameters

      • Optional limit: number

        A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

        +
      • Optional page: string

        A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

        +
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<WebhookList>

      Summary

      List webhooks

      +

      Throws

      Memberof

      WebhooksApiInterface

      +
    • Update a webhook

      +

      Parameters

      • webhookId: string

        The Webhook id that needs to be updated

        +
      • Optional updateWebhookRequest: UpdateWebhookRequest
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<Webhook>

      Summary

      Update a webhook

      +

      Throws

      Memberof

      WebhooksApiInterface

      +
    \ No newline at end of file diff --git a/docs/interfaces/client_base.RequestArgs.html b/docs/interfaces/client_base.RequestArgs.html index ce82bf45..7b51b75f 100644 --- a/docs/interfaces/client_base.RequestArgs.html +++ b/docs/interfaces/client_base.RequestArgs.html @@ -1,4 +1,4 @@ RequestArgs | @coinbase/coinbase-sdk

    Export

    RequestArgs

    -
    interface RequestArgs {
        options: RawAxiosRequestConfig;
        url: string;
    }

    Properties

    interface RequestArgs {
        options: RawAxiosRequestConfig;
        url: string;
    }

    Properties

    Properties

    options: RawAxiosRequestConfig
    url: string
    \ No newline at end of file +

    Properties

    options: RawAxiosRequestConfig
    url: string
    \ No newline at end of file diff --git a/docs/interfaces/client_configuration.ConfigurationParameters.html b/docs/interfaces/client_configuration.ConfigurationParameters.html index 09888456..09b0330a 100644 --- a/docs/interfaces/client_configuration.ConfigurationParameters.html +++ b/docs/interfaces/client_configuration.ConfigurationParameters.html @@ -1,11 +1,10 @@ ConfigurationParameters | @coinbase/coinbase-sdk

    Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs.

    -

    The version of the OpenAPI document: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com

    +

    The version of the OpenAPI document: 0.0.1-alpha

    NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). https://openapi-generator.tech Do not edit the class manually.

    -
    interface ConfigurationParameters {
        accessToken?: string | Promise<string> | ((name?, scopes?) => string) | ((name?, scopes?) => Promise<string>);
        apiKey?: string | Promise<string> | ((name) => string) | ((name) => Promise<string>);
        baseOptions?: any;
        basePath?: string;
        formDataCtor?: (new () => any);
        password?: string;
        serverIndex?: number;
        username?: string;
    }

    Properties

    interface ConfigurationParameters {
        accessToken?: string | Promise<string> | ((name?, scopes?) => string) | ((name?, scopes?) => Promise<string>);
        apiKey?: string | Promise<string> | ((name) => string) | ((name) => Promise<string>);
        baseOptions?: any;
        basePath?: string;
        formDataCtor?: (new () => any);
        password?: string;
        serverIndex?: number;
        username?: string;
    }

    Properties

    accessToken?: string | Promise<string> | ((name?, scopes?) => string) | ((name?, scopes?) => Promise<string>)

    Type declaration

      • (name?, scopes?): string
      • Parameters

        • Optional name: string
        • Optional scopes: string[]

        Returns string

    Type declaration

      • (name?, scopes?): Promise<string>
      • Parameters

        • Optional name: string
        • Optional scopes: string[]

        Returns Promise<string>

    apiKey?: string | Promise<string> | ((name) => string) | ((name) => Promise<string>)

    Type declaration

      • (name): string
      • Parameters

        • name: string

        Returns string

    Type declaration

      • (name): Promise<string>
      • Parameters

        • name: string

        Returns Promise<string>

    baseOptions?: any
    basePath?: string
    formDataCtor?: (new () => any)

    Type declaration

      • new (): any
      • Returns any

    password?: string
    serverIndex?: number
    username?: string
    \ No newline at end of file +

    Properties

    accessToken?: string | Promise<string> | ((name?, scopes?) => string) | ((name?, scopes?) => Promise<string>)

    Type declaration

      • (name?, scopes?): string
      • Parameters

        • Optional name: string
        • Optional scopes: string[]

        Returns string

    Type declaration

      • (name?, scopes?): Promise<string>
      • Parameters

        • Optional name: string
        • Optional scopes: string[]

        Returns Promise<string>

    apiKey?: string | Promise<string> | ((name) => string) | ((name) => Promise<string>)

    Type declaration

      • (name): string
      • Parameters

        • name: string

        Returns string

    Type declaration

      • (name): Promise<string>
      • Parameters

        • name: string

        Returns Promise<string>

    baseOptions?: any
    basePath?: string
    formDataCtor?: (new () => any)

    Type declaration

      • new (): any
      • Returns any

    password?: string
    serverIndex?: number
    username?: string
    \ No newline at end of file diff --git a/docs/interfaces/coinbase_types.AddressReputationApiClient.html b/docs/interfaces/coinbase_types.AddressReputationApiClient.html new file mode 100644 index 00000000..f3bf4573 --- /dev/null +++ b/docs/interfaces/coinbase_types.AddressReputationApiClient.html @@ -0,0 +1,7 @@ +AddressReputationApiClient | @coinbase/coinbase-sdk
    interface AddressReputationApiClient {
        getAddressReputation(networkId, addressId, options?): AxiosPromise<AddressReputation>;
    }

    Methods

    • Get the reputation of an address

      +

      Parameters

      • networkId: string

        The ID of the blockchain network

        +
      • addressId: string

        The ID of the address to fetch the reputation for

        +
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<AddressReputation>

      Throws

      If the request fails.

      +
    \ No newline at end of file diff --git a/docs/interfaces/coinbase_types.BalanceHistoryApiClient.html b/docs/interfaces/coinbase_types.BalanceHistoryApiClient.html new file mode 100644 index 00000000..856d2c0d --- /dev/null +++ b/docs/interfaces/coinbase_types.BalanceHistoryApiClient.html @@ -0,0 +1,10 @@ +BalanceHistoryApiClient | @coinbase/coinbase-sdk
    interface BalanceHistoryApiClient {
        listAddressHistoricalBalance(networkId, addressId, assetId, limit?, page?, options?): AxiosPromise<AddressHistoricalBalanceList>;
    }

    Methods

    • List the historical balance of an asset in a specific address.

      +

      Parameters

      • networkId: string

        The ID of the blockchain network

        +
      • addressId: string

        The ID of the address to fetch the historical balance for.

        +
      • assetId: string

        The symbol of the asset to fetch the historical balance for.

        +
      • Optional limit: number

        A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

        +
      • Optional page: string

        A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

        +
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<AddressHistoricalBalanceList>

      Summary

      Get address balance history for asset

      +

      Throws

    \ No newline at end of file diff --git a/docs/interfaces/coinbase_types.BroadcastExternalTransactionResponse.html b/docs/interfaces/coinbase_types.BroadcastExternalTransactionResponse.html new file mode 100644 index 00000000..dba53941 --- /dev/null +++ b/docs/interfaces/coinbase_types.BroadcastExternalTransactionResponse.html @@ -0,0 +1,4 @@ +BroadcastExternalTransactionResponse | @coinbase/coinbase-sdk

    Response from broadcasting an external transaction

    +
    interface BroadcastExternalTransactionResponse {
        transactionHash: string;
        transactionLink?: string;
    }

    Properties

    transactionHash: string
    transactionLink?: string
    \ No newline at end of file diff --git a/docs/interfaces/coinbase_types.FundOperationApiClient.html b/docs/interfaces/coinbase_types.FundOperationApiClient.html new file mode 100644 index 00000000..d2cd3173 --- /dev/null +++ b/docs/interfaces/coinbase_types.FundOperationApiClient.html @@ -0,0 +1,30 @@ +FundOperationApiClient | @coinbase/coinbase-sdk
    interface FundOperationApiClient {
        createFundOperation(walletId, addressId, createFundOperationRequest, options?): AxiosPromise<FundOperation>;
        createFundQuote(walletId, addressId, createFundQuoteRequest, options?): AxiosPromise<FundQuote>;
        getFundOperation(walletId, addressId, fundOperationId, options?): AxiosPromise<FundOperation>;
        listFundOperations(walletId, addressId, limit?, page?, options?): AxiosPromise<FundOperationList>;
    }

    Methods

    • Create a fund operation

      +

      Parameters

      • walletId: string

        The ID of the wallet to create the fund operation for

        +
      • addressId: string

        The ID of the address to create the fund operation for

        +
      • createFundOperationRequest: CreateFundOperationRequest

        The request body containing the fund operation details

        +
      • Optional options: RawAxiosRequestConfig

        Axios request options

        +

      Returns AxiosPromise<FundOperation>

      Throws

      If the request fails

      +
    • Create a fund operation quote

      +

      Parameters

      • walletId: string

        The ID of the wallet the address belongs to.

        +
      • addressId: string

        The ID of the address to create the fund operation quote for.

        +
      • createFundQuoteRequest: CreateFundQuoteRequest

        The request body containing the fund operation quote details.

        +
      • Optional options: RawAxiosRequestConfig

        Axios request options.

        +

      Returns AxiosPromise<FundQuote>

      Throws

      If the request fails.

      +
    • Get a fund operation

      +

      Parameters

      • walletId: string

        The ID of the wallet the address belongs to.

        +
      • addressId: string

        The ID of the address the fund operation belongs to.

        +
      • fundOperationId: string

        The ID of the fund operation to retrieve

        +
      • Optional options: RawAxiosRequestConfig

        Axios request options

        +

      Returns AxiosPromise<FundOperation>

      Throws

      If the request fails

      +
    • List fund operations

      +

      Parameters

      • walletId: string

        The ID of the wallet the address belongs to.

        +
      • addressId: string

        The ID of the address to list fund operations for.

        +
      • Optional limit: number

        A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

        +
      • Optional page: string

        A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

        +
      • Optional options: RawAxiosRequestConfig

        Axios request options

        +

      Returns AxiosPromise<FundOperationList>

      Throws

      If the request fails

      +
    \ No newline at end of file diff --git a/docs/interfaces/coinbase_types.MnemonicSeedPhrase.html b/docs/interfaces/coinbase_types.MnemonicSeedPhrase.html new file mode 100644 index 00000000..4f2c6086 --- /dev/null +++ b/docs/interfaces/coinbase_types.MnemonicSeedPhrase.html @@ -0,0 +1,4 @@ +MnemonicSeedPhrase | @coinbase/coinbase-sdk

    Interface representing a BIP-39 mnemonic seed phrase.

    +
    interface MnemonicSeedPhrase {
        mnemonicPhrase: string;
    }

    Properties

    Properties

    mnemonicPhrase: string

    The BIP-39 mnemonic seed phrase (12, 15, 18, 21, or 24 words)

    +
    \ No newline at end of file diff --git a/docs/interfaces/coinbase_types.PaginationResponse.html b/docs/interfaces/coinbase_types.PaginationResponse.html new file mode 100644 index 00000000..f3ae7e7b --- /dev/null +++ b/docs/interfaces/coinbase_types.PaginationResponse.html @@ -0,0 +1,5 @@ +PaginationResponse | @coinbase/coinbase-sdk

    Paginated list response.

    +
    interface PaginationResponse<T> {
        data: T[];
        hasMore: boolean;
        nextPage: undefined | string;
    }

    Type Parameters

    • T

    Properties

    Properties

    data: T[]
    hasMore: boolean
    nextPage: undefined | string
    \ No newline at end of file diff --git a/docs/interfaces/coinbase_types.SmartContractAPIClient.html b/docs/interfaces/coinbase_types.SmartContractAPIClient.html new file mode 100644 index 00000000..c09482c5 --- /dev/null +++ b/docs/interfaces/coinbase_types.SmartContractAPIClient.html @@ -0,0 +1,68 @@ +SmartContractAPIClient | @coinbase/coinbase-sdk
    interface SmartContractAPIClient {
        compileSmartContract(compileSmartContractRequest, options?): AxiosPromise<CompiledSmartContract>;
        createSmartContract(walletId, addressId, createSmartContractRequest, options?): AxiosPromise<SmartContract>;
        deploySmartContract(walletId, addressId, smartContractId, deploySmartContractRequest, options?): AxiosPromise<SmartContract>;
        getSmartContract(walletId, addressId, smartContractId, options?): AxiosPromise<SmartContract>;
        listSmartContracts(page?, options?): AxiosPromise<SmartContractList>;
        readContract(networkId, contractAddress, readContractRequest): AxiosPromise<SolidityValue>;
        registerSmartContract(networkId?, contractAddress?, registerSmartContractRequest?, options?): AxiosPromise<SmartContract>;
        updateSmartContract(networkId?, contractAddress?, updateSmartContractRequest?, options?): AxiosPromise<SmartContract>;
    }

    Methods

    • Compiles a custom contract.

      +

      Parameters

      • compileSmartContractRequest: CompileSmartContractRequest

        The request body containing the compile smart contract details.

        +
      • Optional options: RawAxiosRequestConfig

        Axios request options.

        +

      Returns AxiosPromise<CompiledSmartContract>

        +
      • A promise resolving to the compiled smart contract.
      • +
      +

      Throws

      If the request fails.

      +
    • Creates a new Smart Contract.

      +

      Parameters

      • walletId: string

        The ID of the wallet the address belongs to.

        +
      • addressId: string

        The ID of the address to create the smart contract for.

        +
      • createSmartContractRequest: CreateSmartContractRequest

        The request body containing the smart contract details.

        +
      • Optional options: RawAxiosRequestConfig

        Axios request options.

        +

      Returns AxiosPromise<SmartContract>

      Throws

      If the request fails.

      +
    • Deploys a Smart Contract.

      +

      Parameters

      • walletId: string

        The ID of the wallet the address belongs to.

        +
      • addressId: string

        The ID of the address the smart contract belongs to.

        +
      • smartContractId: string

        The ID of the smart contract to deploy.

        +
      • deploySmartContractRequest: DeploySmartContractRequest

        The request body containing deployment details.

        +
      • Optional options: RawAxiosRequestConfig

        Axios request options.

        +

      Returns AxiosPromise<SmartContract>

      Throws

      If the request fails.

      +
    • Gets a specific Smart Contract.

      +

      Parameters

      • walletId: string

        The ID of the wallet the address belongs to.

        +
      • addressId: string

        The ID of the address the smart contract belongs to.

        +
      • smartContractId: string

        The ID of the smart contract to retrieve.

        +
      • Optional options: RawAxiosRequestConfig

        Axios request options.

        +

      Returns AxiosPromise<SmartContract>

      Throws

      If the request fails.

      +
    • List smart contracts belonging to the CDP project.

      +

      Parameters

      • Optional page: string

        A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

        +
      • Optional options: RawAxiosRequestConfig

        Axios request options.

        +

      Returns AxiosPromise<SmartContractList>

      Summary

      List smart contracts belonging to the CDP project

      +

      Throws

      If the request fails.

      +
    • Read a contract

      +

      Parameters

      • networkId: string

        Unique identifier for the blockchain network

        +
      • contractAddress: string

        EVM address of the smart contract (42 characters, including '0x', in lowercase)

        +
      • readContractRequest: ReadContractRequest

        The request body containing the method, args, and optionally the ABI

        +

      Returns AxiosPromise<SolidityValue>

        +
      • A promise resolving to the contract read result
      • +
      +

      Throws

      If the request fails

      +
    • Register a smart contract.

      +

      Parameters

      • Optional networkId: string

        The network ID.

        +
      • Optional contractAddress: string

        The contract address.

        +
      • Optional registerSmartContractRequest: RegisterSmartContractRequest

        The request body containing the register smart contract details.

        +
      • Optional options: RawAxiosRequestConfig

        Axios request options

        +

      Returns AxiosPromise<SmartContract>

        +
      • A promise resolving to the register smart contract result
      • +
      +

      Summary

      Register a smart contract.

      +

      Throws

      If the request fails

      +
    • Update a smart contract.

      +

      Parameters

      • Optional networkId: string

        The network ID.

        +
      • Optional contractAddress: string

        The contract address.

        +
      • Optional updateSmartContractRequest: UpdateSmartContractRequest

        The request body containing the update smart contract details.

        +
      • Optional options: RawAxiosRequestConfig

        Axios request options

        +

      Returns AxiosPromise<SmartContract>

        +
      • A promise resolving to the update smart contract result
      • +
      +

      Summary

      Update a smart contract.

      +

      Throws

      If the request fails

      +
    \ No newline at end of file diff --git a/docs/interfaces/coinbase_types.TransactionHistoryApiClient.html b/docs/interfaces/coinbase_types.TransactionHistoryApiClient.html new file mode 100644 index 00000000..bc6f1600 --- /dev/null +++ b/docs/interfaces/coinbase_types.TransactionHistoryApiClient.html @@ -0,0 +1,9 @@ +TransactionHistoryApiClient | @coinbase/coinbase-sdk
    interface TransactionHistoryApiClient {
        listAddressTransactions(networkId, addressId, limit?, page?, options?): AxiosPromise<AddressTransactionList>;
    }

    Methods

    • List the transactions of a specific address.

      +

      Parameters

      • networkId: string

        The ID of the blockchain network

        +
      • addressId: string

        The ID of the address to fetch transactions for.

        +
      • Optional limit: number

        A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

        +
      • Optional page: string

        A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

        +
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<AddressTransactionList>

      Summary

      Get address transactions

      +

      Throws

    \ No newline at end of file diff --git a/docs/interfaces/coinbase_types.WalletData.html b/docs/interfaces/coinbase_types.WalletData.html new file mode 100644 index 00000000..ccec52b6 --- /dev/null +++ b/docs/interfaces/coinbase_types.WalletData.html @@ -0,0 +1,11 @@ +WalletData | @coinbase/coinbase-sdk

    Interface representing wallet data, with support for both camelCase and snake_case +property names for compatibility with older versions of the Python SDK.

    +
    interface WalletData {
        networkId?: string;
        network_id?: string;
        seed: string;
        walletId?: string;
        wallet_id?: string;
    }

    Properties

    networkId?: string

    The network ID in either camelCase or snake_case format, but not both.

    +
    network_id?: string
    seed: string

    The wallet seed

    +
    walletId?: string

    The CDP wallet ID in either camelCase or snake_case format, but not both.

    +
    wallet_id?: string
    \ No newline at end of file diff --git a/docs/interfaces/coinbase_types.WebhookApiClient.html b/docs/interfaces/coinbase_types.WebhookApiClient.html new file mode 100644 index 00000000..f8199698 --- /dev/null +++ b/docs/interfaces/coinbase_types.WebhookApiClient.html @@ -0,0 +1,25 @@ +WebhookApiClient | @coinbase/coinbase-sdk
    interface WebhookApiClient {
        createWalletWebhook(walletId?, createWalletWebhookRequest?, options?): AxiosPromise<Webhook>;
        createWebhook(createWebhookRequest?, options?): AxiosPromise<Webhook>;
        deleteWebhook(webhookId, options?): AxiosPromise<void>;
        listWebhooks(limit?, page?, options?): AxiosPromise<WebhookList>;
        updateWebhook(webhookId, updateWebhookRequest?, options?): AxiosPromise<Webhook>;
    }

    Methods

    • Create a new webhook for a wallet

      +

      Parameters

      • Optional walletId: string
      • Optional createWalletWebhookRequest: CreateWalletWebhookRequest
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<Webhook>

      Summary

      Create a new webhook for a wallet

      +

      Throws

    • Create a new webhook

      +

      Parameters

      • Optional createWebhookRequest: CreateWebhookRequest
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<Webhook>

      Summary

      Create a new webhook

      +

      Throws

    • Delete a webhook

      +

      Parameters

      • webhookId: string

        The Webhook uuid that needs to be deleted

        +
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<void>

      Summary

      Delete a webhook

      +

      Throws

    • List webhooks, optionally filtered by event type.

      +

      Parameters

      • Optional limit: number

        A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

        +
      • Optional page: string

        A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

        +
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<WebhookList>

      Summary

      List webhooks

      +

      Throws

    • Update a webhook

      +

      Parameters

      • webhookId: string

        The Webhook id that needs to be updated

        +
      • Optional updateWebhookRequest: UpdateWebhookRequest
      • Optional options: RawAxiosRequestConfig

        Override http request option.

        +

      Returns AxiosPromise<Webhook>

      Summary

      Update a webhook

      +

      Throws

    \ No newline at end of file diff --git a/docs/modules/actions_sendUserOperation.html b/docs/modules/actions_sendUserOperation.html new file mode 100644 index 00000000..c1089316 --- /dev/null +++ b/docs/modules/actions_sendUserOperation.html @@ -0,0 +1,4 @@ +actions/sendUserOperation | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/actions_waitForUserOperation.html b/docs/modules/actions_waitForUserOperation.html new file mode 100644 index 00000000..5b078a0b --- /dev/null +++ b/docs/modules/actions_waitForUserOperation.html @@ -0,0 +1,6 @@ +actions/waitForUserOperation | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/client.html b/docs/modules/client.html index d411e129..38a1254a 100644 --- a/docs/modules/client.html +++ b/docs/modules/client.html @@ -1,6 +1,10 @@ -client | @coinbase/coinbase-sdk

    References

    Address +client | @coinbase/coinbase-sdk

    References

    Address AddressBalanceList +AddressHistoricalBalanceList AddressList +AddressReputation +AddressReputationMetadata +AddressTransactionList AddressesApi AddressesApiAxiosParamCreator AddressesApiFactory @@ -13,30 +17,123 @@ AssetsApiFp AssetsApiInterface Balance +BalanceHistoryApi +BalanceHistoryApiAxiosParamCreator +BalanceHistoryApiFactory +BalanceHistoryApiFp +BalanceHistoryApiInterface +BroadcastContractInvocationRequest +BroadcastExternalTransaction200Response +BroadcastExternalTransactionRequest +BroadcastExternalTransferRequest +BroadcastStakingOperationRequest BroadcastTradeRequest BroadcastTransferRequest +BroadcastUserOperationRequest BuildStakingOperationRequest +Call +CompileSmartContractRequest +CompiledSmartContract Configuration ConfigurationParameters +ContractEvent +ContractEventList +ContractEventsApi +ContractEventsApiAxiosParamCreator +ContractEventsApiFactory +ContractEventsApiFp +ContractEventsApiInterface +ContractInvocation +ContractInvocationList +ContractInvocationsApi +ContractInvocationsApiAxiosParamCreator +ContractInvocationsApiFactory +ContractInvocationsApiFp +ContractInvocationsApiInterface CreateAddressRequest +CreateContractInvocationRequest +CreateExternalTransferRequest +CreateFundOperationRequest +CreateFundQuoteRequest +CreatePayloadSignatureRequest CreateServerSignerRequest +CreateSmartContractRequest +CreateSmartWalletRequest +CreateStakingOperationRequest CreateTradeRequest CreateTransferRequest +CreateUserOperationRequest CreateWalletRequest CreateWalletRequestWallet +CreateWalletWebhookRequest +CreateWebhookRequest +CryptoAmount +DeploySmartContractRequest +ERC20TransferEvent +ERC721TransferEvent +EthereumTokenTransfer +EthereumTransaction +EthereumTransactionAccess +EthereumTransactionAccessList +EthereumTransactionFlattenedTrace +EthereumValidatorMetadata ExternalAddressesApi ExternalAddressesApiAxiosParamCreator ExternalAddressesApiFactory ExternalAddressesApiFp ExternalAddressesApiInterface FaucetTransaction -Feature +FeatureSet +FetchHistoricalStakingBalances200Response FetchStakingRewards200Response FetchStakingRewardsRequest -FetchStakingRewardsRequestFormatEnum +FiatAmount +FundApi +FundApiAxiosParamCreator +FundApiFactory +FundApiFp +FundApiInterface +FundOperation +FundOperationFees +FundOperationList +FundOperationStatusEnum +FundQuote GetStakingContextRequest +HistoricalBalance +MPCWalletStakeApi +MPCWalletStakeApiAxiosParamCreator +MPCWalletStakeApiFactory +MPCWalletStakeApiFp +MPCWalletStakeApiInterface ModelError -PartialEthStakingContext +MultiTokenContractOptions +NFTContractOptions +Network +NetworkIdentifier +NetworkProtocolFamilyEnum +NetworksApi +NetworksApiAxiosParamCreator +NetworksApiFactory +NetworksApiFp +NetworksApiInterface +OnchainIdentityApi +OnchainIdentityApiAxiosParamCreator +OnchainIdentityApiFactory +OnchainIdentityApiFp +OnchainIdentityApiInterface +OnchainName +OnchainNameList +PayloadSignature +PayloadSignatureList +PayloadSignatureStatusEnum +ReadContractRequest +RegisterSmartContractRequest +ReputationApi +ReputationApiAxiosParamCreator +ReputationApiFactory +ReputationApiFp +ReputationApiInterface +ResolveIdentityByAddressRolesEnum SeedCreationEvent SeedCreationEventResult ServerSigner @@ -51,16 +148,45 @@ ServerSignersApiInterface SignatureCreationEvent SignatureCreationEventResult +SignedVoluntaryExitMessageMetadata +SmartContract +SmartContractActivityEvent +SmartContractList +SmartContractOptions +SmartContractType +SmartContractsApi +SmartContractsApiAxiosParamCreator +SmartContractsApiFactory +SmartContractsApiFp +SmartContractsApiInterface +SmartWallet +SmartWalletList +SmartWalletsApi +SmartWalletsApiAxiosParamCreator +SmartWalletsApiFactory +SmartWalletsApiFp +SmartWalletsApiInterface +SolidityValue +SolidityValueTypeEnum +SponsoredSend +SponsoredSendStatusEnum StakeApi StakeApiAxiosParamCreator StakeApiFactory StakeApiFp StakeApiInterface +StakingBalance StakingContext StakingContextContext StakingOperation +StakingOperationMetadata +StakingOperationStatusEnum StakingReward +StakingRewardFormat StakingRewardStateEnum +StakingRewardUSDValue +TokenContractOptions +TokenTransferType Trade TradeList TradesApi @@ -69,22 +195,37 @@ TradesApiFp TradesApiInterface Transaction +TransactionContent +TransactionHistoryApi +TransactionHistoryApiAxiosParamCreator +TransactionHistoryApiFactory +TransactionHistoryApiFp +TransactionHistoryApiInterface +TransactionLog +TransactionReceipt TransactionStatusEnum TransactionType Transfer TransferList -TransferStatusEnum TransfersApi TransfersApiAxiosParamCreator TransfersApiFactory TransfersApiFp TransfersApiInterface +UpdateSmartContractRequest +UpdateWebhookRequest User +UserOperation +UserOperationStatusEnum UsersApi UsersApiAxiosParamCreator UsersApiFactory UsersApiFp UsersApiInterface +Validator +ValidatorDetails +ValidatorList +ValidatorStatus Wallet WalletList WalletServerSignerStatusEnum @@ -93,4 +234,17 @@ WalletsApiFactory WalletsApiFp WalletsApiInterface -

    References

    Re-exports Address
    Re-exports AddressBalanceList
    Re-exports AddressList
    Re-exports AddressesApi
    Re-exports AddressesApiAxiosParamCreator
    Re-exports AddressesApiFactory
    Re-exports AddressesApiFp
    Re-exports AddressesApiInterface
    Re-exports Asset
    Re-exports AssetsApi
    Re-exports AssetsApiAxiosParamCreator
    Re-exports AssetsApiFactory
    Re-exports AssetsApiFp
    Re-exports AssetsApiInterface
    Re-exports Balance
    Re-exports BroadcastTradeRequest
    Re-exports BroadcastTransferRequest
    Re-exports BuildStakingOperationRequest
    Re-exports Configuration
    Re-exports ConfigurationParameters
    Re-exports CreateAddressRequest
    Re-exports CreateServerSignerRequest
    Re-exports CreateTradeRequest
    Re-exports CreateTransferRequest
    Re-exports CreateWalletRequest
    Re-exports CreateWalletRequestWallet
    Re-exports ExternalAddressesApi
    Re-exports ExternalAddressesApiAxiosParamCreator
    Re-exports ExternalAddressesApiFactory
    Re-exports ExternalAddressesApiFp
    Re-exports ExternalAddressesApiInterface
    Re-exports FaucetTransaction
    Re-exports Feature
    Re-exports FetchStakingRewards200Response
    Re-exports FetchStakingRewardsRequest
    Re-exports FetchStakingRewardsRequestFormatEnum
    Re-exports GetStakingContextRequest
    Re-exports ModelError
    Re-exports PartialEthStakingContext
    Re-exports SeedCreationEvent
    Re-exports SeedCreationEventResult
    Re-exports ServerSigner
    Re-exports ServerSignerEvent
    Re-exports ServerSignerEventEvent
    Re-exports ServerSignerEventList
    Re-exports ServerSignerList
    Re-exports ServerSignersApi
    Re-exports ServerSignersApiAxiosParamCreator
    Re-exports ServerSignersApiFactory
    Re-exports ServerSignersApiFp
    Re-exports ServerSignersApiInterface
    Re-exports SignatureCreationEvent
    Re-exports SignatureCreationEventResult
    Re-exports StakeApi
    Re-exports StakeApiAxiosParamCreator
    Re-exports StakeApiFactory
    Re-exports StakeApiFp
    Re-exports StakeApiInterface
    Re-exports StakingContext
    Re-exports StakingContextContext
    Re-exports StakingOperation
    Re-exports StakingReward
    Re-exports StakingRewardStateEnum
    Re-exports Trade
    Re-exports TradeList
    Re-exports TradesApi
    Re-exports TradesApiAxiosParamCreator
    Re-exports TradesApiFactory
    Re-exports TradesApiFp
    Re-exports TradesApiInterface
    Re-exports Transaction
    Re-exports TransactionStatusEnum
    Re-exports TransactionType
    Re-exports Transfer
    Re-exports TransferList
    Re-exports TransferStatusEnum
    Re-exports TransfersApi
    Re-exports TransfersApiAxiosParamCreator
    Re-exports TransfersApiFactory
    Re-exports TransfersApiFp
    Re-exports TransfersApiInterface
    Re-exports User
    Re-exports UsersApi
    Re-exports UsersApiAxiosParamCreator
    Re-exports UsersApiFactory
    Re-exports UsersApiFp
    Re-exports UsersApiInterface
    Re-exports Wallet
    Re-exports WalletList
    Re-exports WalletServerSignerStatusEnum
    Re-exports WalletsApi
    Re-exports WalletsApiAxiosParamCreator
    Re-exports WalletsApiFactory
    Re-exports WalletsApiFp
    Re-exports WalletsApiInterface
    \ No newline at end of file +Webhook +WebhookEventFilter +WebhookEventType +WebhookEventTypeFilter +WebhookList +WebhookSmartContractEventFilter +WebhookStatus +WebhookWalletActivityFilter +WebhooksApi +WebhooksApiAxiosParamCreator +WebhooksApiFactory +WebhooksApiFp +WebhooksApiInterface +

    References

    Re-exports Address
    Re-exports AddressBalanceList
    Re-exports AddressHistoricalBalanceList
    Re-exports AddressList
    Re-exports AddressReputation
    Re-exports AddressReputationMetadata
    Re-exports AddressTransactionList
    Re-exports AddressesApi
    Re-exports AddressesApiAxiosParamCreator
    Re-exports AddressesApiFactory
    Re-exports AddressesApiFp
    Re-exports AddressesApiInterface
    Re-exports Asset
    Re-exports AssetsApi
    Re-exports AssetsApiAxiosParamCreator
    Re-exports AssetsApiFactory
    Re-exports AssetsApiFp
    Re-exports AssetsApiInterface
    Re-exports Balance
    Re-exports BalanceHistoryApi
    Re-exports BalanceHistoryApiAxiosParamCreator
    Re-exports BalanceHistoryApiFactory
    Re-exports BalanceHistoryApiFp
    Re-exports BalanceHistoryApiInterface
    Re-exports BroadcastContractInvocationRequest
    Re-exports BroadcastExternalTransaction200Response
    Re-exports BroadcastExternalTransactionRequest
    Re-exports BroadcastExternalTransferRequest
    Re-exports BroadcastStakingOperationRequest
    Re-exports BroadcastTradeRequest
    Re-exports BroadcastTransferRequest
    Re-exports BroadcastUserOperationRequest
    Re-exports BuildStakingOperationRequest
    Re-exports Call
    Re-exports CompileSmartContractRequest
    Re-exports CompiledSmartContract
    Re-exports Configuration
    Re-exports ConfigurationParameters
    Re-exports ContractEvent
    Re-exports ContractEventList
    Re-exports ContractEventsApi
    Re-exports ContractEventsApiAxiosParamCreator
    Re-exports ContractEventsApiFactory
    Re-exports ContractEventsApiFp
    Re-exports ContractEventsApiInterface
    Re-exports ContractInvocation
    Re-exports ContractInvocationList
    Re-exports ContractInvocationsApi
    Re-exports ContractInvocationsApiAxiosParamCreator
    Re-exports ContractInvocationsApiFactory
    Re-exports ContractInvocationsApiFp
    Re-exports ContractInvocationsApiInterface
    Re-exports CreateAddressRequest
    Re-exports CreateContractInvocationRequest
    Re-exports CreateExternalTransferRequest
    Re-exports CreateFundOperationRequest
    Re-exports CreateFundQuoteRequest
    Re-exports CreatePayloadSignatureRequest
    Re-exports CreateServerSignerRequest
    Re-exports CreateSmartContractRequest
    Re-exports CreateSmartWalletRequest
    Re-exports CreateStakingOperationRequest
    Re-exports CreateTradeRequest
    Re-exports CreateTransferRequest
    Re-exports CreateUserOperationRequest
    Re-exports CreateWalletRequest
    Re-exports CreateWalletRequestWallet
    Re-exports CreateWalletWebhookRequest
    Re-exports CreateWebhookRequest
    Re-exports CryptoAmount
    Re-exports DeploySmartContractRequest
    Re-exports ERC20TransferEvent
    Re-exports ERC721TransferEvent
    Re-exports EthereumTokenTransfer
    Re-exports EthereumTransaction
    Re-exports EthereumTransactionAccess
    Re-exports EthereumTransactionAccessList
    Re-exports EthereumTransactionFlattenedTrace
    Re-exports EthereumValidatorMetadata
    Re-exports ExternalAddressesApi
    Re-exports ExternalAddressesApiAxiosParamCreator
    Re-exports ExternalAddressesApiFactory
    Re-exports ExternalAddressesApiFp
    Re-exports ExternalAddressesApiInterface
    Re-exports FaucetTransaction
    Re-exports FeatureSet
    Re-exports FetchHistoricalStakingBalances200Response
    Re-exports FetchStakingRewards200Response
    Re-exports FetchStakingRewardsRequest
    Re-exports FiatAmount
    Re-exports FundApi
    Re-exports FundApiAxiosParamCreator
    Re-exports FundApiFactory
    Re-exports FundApiFp
    Re-exports FundApiInterface
    Re-exports FundOperation
    Re-exports FundOperationFees
    Re-exports FundOperationList
    Re-exports FundOperationStatusEnum
    Re-exports FundQuote
    Re-exports GetStakingContextRequest
    Re-exports HistoricalBalance
    Re-exports MPCWalletStakeApi
    Re-exports MPCWalletStakeApiAxiosParamCreator
    Re-exports MPCWalletStakeApiFactory
    Re-exports MPCWalletStakeApiFp
    Re-exports MPCWalletStakeApiInterface
    Re-exports ModelError
    Re-exports MultiTokenContractOptions
    Re-exports NFTContractOptions
    Re-exports Network
    Re-exports NetworkIdentifier
    Re-exports NetworkProtocolFamilyEnum
    Re-exports NetworksApi
    Re-exports NetworksApiAxiosParamCreator
    Re-exports NetworksApiFactory
    Re-exports NetworksApiFp
    Re-exports NetworksApiInterface
    Re-exports OnchainIdentityApi
    Re-exports OnchainIdentityApiAxiosParamCreator
    Re-exports OnchainIdentityApiFactory
    Re-exports OnchainIdentityApiFp
    Re-exports OnchainIdentityApiInterface
    Re-exports OnchainName
    Re-exports OnchainNameList
    Re-exports PayloadSignature
    Re-exports PayloadSignatureList
    Re-exports PayloadSignatureStatusEnum
    Re-exports ReadContractRequest
    Re-exports RegisterSmartContractRequest
    Re-exports ReputationApi
    Re-exports ReputationApiAxiosParamCreator
    Re-exports ReputationApiFactory
    Re-exports ReputationApiFp
    Re-exports ReputationApiInterface
    Re-exports ResolveIdentityByAddressRolesEnum
    Re-exports SeedCreationEvent
    Re-exports SeedCreationEventResult
    Re-exports ServerSigner
    Re-exports ServerSignerEvent
    Re-exports ServerSignerEventEvent
    Re-exports ServerSignerEventList
    Re-exports ServerSignerList
    Re-exports ServerSignersApi
    Re-exports ServerSignersApiAxiosParamCreator
    Re-exports ServerSignersApiFactory
    Re-exports ServerSignersApiFp
    Re-exports ServerSignersApiInterface
    Re-exports SignatureCreationEvent
    Re-exports SignatureCreationEventResult
    Re-exports SignedVoluntaryExitMessageMetadata
    Re-exports SmartContract
    Re-exports SmartContractActivityEvent
    Re-exports SmartContractList
    Re-exports SmartContractOptions
    Re-exports SmartContractType
    Re-exports SmartContractsApi
    Re-exports SmartContractsApiAxiosParamCreator
    Re-exports SmartContractsApiFactory
    Re-exports SmartContractsApiFp
    Re-exports SmartContractsApiInterface
    Re-exports SmartWallet
    Re-exports SmartWalletList
    Re-exports SmartWalletsApi
    Re-exports SmartWalletsApiAxiosParamCreator
    Re-exports SmartWalletsApiFactory
    Re-exports SmartWalletsApiFp
    Re-exports SmartWalletsApiInterface
    Re-exports SolidityValue
    Re-exports SolidityValueTypeEnum
    Re-exports SponsoredSend
    Re-exports SponsoredSendStatusEnum
    Re-exports StakeApi
    Re-exports StakeApiAxiosParamCreator
    Re-exports StakeApiFactory
    Re-exports StakeApiFp
    Re-exports StakeApiInterface
    Re-exports StakingBalance
    Re-exports StakingContext
    Re-exports StakingContextContext
    Re-exports StakingOperation
    Re-exports StakingOperationMetadata
    Re-exports StakingOperationStatusEnum
    Re-exports StakingReward
    Re-exports StakingRewardFormat
    Re-exports StakingRewardStateEnum
    Re-exports StakingRewardUSDValue
    Re-exports TokenContractOptions
    Re-exports TokenTransferType
    Re-exports Trade
    Re-exports TradeList
    Re-exports TradesApi
    Re-exports TradesApiAxiosParamCreator
    Re-exports TradesApiFactory
    Re-exports TradesApiFp
    Re-exports TradesApiInterface
    Re-exports Transaction
    Re-exports TransactionContent
    Re-exports TransactionHistoryApi
    Re-exports TransactionHistoryApiAxiosParamCreator
    Re-exports TransactionHistoryApiFactory
    Re-exports TransactionHistoryApiFp
    Re-exports TransactionHistoryApiInterface
    Re-exports TransactionLog
    Re-exports TransactionReceipt
    Re-exports TransactionStatusEnum
    Re-exports TransactionType
    Re-exports Transfer
    Re-exports TransferList
    Re-exports TransfersApi
    Re-exports TransfersApiAxiosParamCreator
    Re-exports TransfersApiFactory
    Re-exports TransfersApiFp
    Re-exports TransfersApiInterface
    Re-exports UpdateSmartContractRequest
    Re-exports UpdateWebhookRequest
    Re-exports User
    Re-exports UserOperation
    Re-exports UserOperationStatusEnum
    Re-exports UsersApi
    Re-exports UsersApiAxiosParamCreator
    Re-exports UsersApiFactory
    Re-exports UsersApiFp
    Re-exports UsersApiInterface
    Re-exports Validator
    Re-exports ValidatorDetails
    Re-exports ValidatorList
    Re-exports ValidatorStatus
    Re-exports Wallet
    Re-exports WalletList
    Re-exports WalletServerSignerStatusEnum
    Re-exports WalletsApi
    Re-exports WalletsApiAxiosParamCreator
    Re-exports WalletsApiFactory
    Re-exports WalletsApiFp
    Re-exports WalletsApiInterface
    Re-exports Webhook
    Re-exports WebhookEventFilter
    Re-exports WebhookEventType
    Re-exports WebhookEventTypeFilter
    Re-exports WebhookList
    Re-exports WebhookSmartContractEventFilter
    Re-exports WebhookStatus
    Re-exports WebhookWalletActivityFilter
    Re-exports WebhooksApi
    Re-exports WebhooksApiAxiosParamCreator
    Re-exports WebhooksApiFactory
    Re-exports WebhooksApiFp
    Re-exports WebhooksApiInterface
    \ No newline at end of file diff --git a/docs/modules/client_api.html b/docs/modules/client_api.html index 21aa0918..40197339 100644 --- a/docs/modules/client_api.html +++ b/docs/modules/client_api.html @@ -1,37 +1,117 @@ -client/api | @coinbase/coinbase-sdk

    Index

    Enumerations

    Feature +client/api | @coinbase/coinbase-sdk

    Index

    Enumerations

    Classes

    Interfaces

    Address AddressBalanceList +AddressHistoricalBalanceList AddressList +AddressReputation +AddressReputationMetadata +AddressTransactionList AddressesApiInterface Asset AssetsApiInterface Balance +BalanceHistoryApiInterface +BroadcastContractInvocationRequest +BroadcastExternalTransaction200Response +BroadcastExternalTransactionRequest +BroadcastExternalTransferRequest +BroadcastStakingOperationRequest BroadcastTradeRequest BroadcastTransferRequest +BroadcastUserOperationRequest BuildStakingOperationRequest +Call +CompileSmartContractRequest +CompiledSmartContract +ContractEvent +ContractEventList +ContractEventsApiInterface +ContractInvocation +ContractInvocationList +ContractInvocationsApiInterface CreateAddressRequest +CreateContractInvocationRequest +CreateExternalTransferRequest +CreateFundOperationRequest +CreateFundQuoteRequest +CreatePayloadSignatureRequest CreateServerSignerRequest +CreateSmartContractRequest +CreateSmartWalletRequest +CreateStakingOperationRequest CreateTradeRequest CreateTransferRequest +CreateUserOperationRequest CreateWalletRequest CreateWalletRequestWallet +CreateWalletWebhookRequest +CreateWebhookRequest +CryptoAmount +DeploySmartContractRequest +ERC20TransferEvent +ERC721TransferEvent +EthereumTokenTransfer +EthereumTransaction +EthereumTransactionAccess +EthereumTransactionAccessList +EthereumTransactionFlattenedTrace +EthereumValidatorMetadata ExternalAddressesApiInterface FaucetTransaction +FeatureSet +FetchHistoricalStakingBalances200Response FetchStakingRewards200Response FetchStakingRewardsRequest +FiatAmount +FundApiInterface +FundOperation +FundOperationFees +FundOperationList +FundQuote GetStakingContextRequest +HistoricalBalance +MPCWalletStakeApiInterface ModelError -PartialEthStakingContext +MultiTokenContractOptions +NFTContractOptions +Network +NetworksApiInterface +OnchainIdentityApiInterface +OnchainName +OnchainNameList +PayloadSignature +PayloadSignatureList +ReadContractRequest +RegisterSmartContractRequest +ReputationApiInterface SeedCreationEvent SeedCreationEventResult ServerSigner @@ -41,33 +121,77 @@ ServerSignersApiInterface SignatureCreationEvent SignatureCreationEventResult +SignedVoluntaryExitMessageMetadata +SmartContract +SmartContractActivityEvent +SmartContractList +SmartContractsApiInterface +SmartWallet +SmartWalletList +SmartWalletsApiInterface +SolidityValue +SponsoredSend StakeApiInterface +StakingBalance StakingContext +StakingContextContext StakingOperation StakingReward +StakingRewardUSDValue +TokenContractOptions Trade TradeList TradesApiInterface Transaction +TransactionHistoryApiInterface +TransactionLog +TransactionReceipt Transfer TransferList TransfersApiInterface +UpdateSmartContractRequest +UpdateWebhookRequest User +UserOperation UsersApiInterface +Validator +ValidatorList Wallet WalletList WalletsApiInterface -

    Type Aliases

    Type Aliases

    Variables

    Variables

    Functions

    \ No newline at end of file diff --git a/docs/modules/client_base.html b/docs/modules/client_base.html index bc37a748..5cbadd91 100644 --- a/docs/modules/client_base.html +++ b/docs/modules/client_base.html @@ -1,4 +1,4 @@ -client/base | @coinbase/coinbase-sdk

    Index

    Classes

    BaseAPI +client/base | @coinbase/coinbase-sdk

    Index

    Classes

    Interfaces

    Variables

    BASE_PATH diff --git a/docs/modules/client_common.html b/docs/modules/client_common.html index 49b4bdd0..f01ca3f9 100644 --- a/docs/modules/client_common.html +++ b/docs/modules/client_common.html @@ -1,4 +1,4 @@ -client/common | @coinbase/coinbase-sdk

    Index

    Variables

    DUMMY_BASE_URL +client/common | @coinbase/coinbase-sdk

    Index

    Variables

    Functions

    assertParamExists createRequestFunction serializeDataIfNeeded diff --git a/docs/modules/client_configuration.html b/docs/modules/client_configuration.html index ff9e0094..59f2f6f5 100644 --- a/docs/modules/client_configuration.html +++ b/docs/modules/client_configuration.html @@ -1,3 +1,3 @@ -client/configuration | @coinbase/coinbase-sdk

    Index

    Classes

    Configuration +client/configuration | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/coinbase_address.html b/docs/modules/coinbase_address.html index 3e37a12b..c2dc5766 100644 --- a/docs/modules/coinbase_address.html +++ b/docs/modules/coinbase_address.html @@ -1,2 +1,2 @@ -coinbase/address | @coinbase/coinbase-sdk

    Index

    Classes

    Address +coinbase/address | @coinbase/coinbase-sdk

    Index

    Classes

    \ No newline at end of file diff --git a/docs/modules/coinbase_address_external_address.html b/docs/modules/coinbase_address_external_address.html index a83cb7a1..65644c0e 100644 --- a/docs/modules/coinbase_address_external_address.html +++ b/docs/modules/coinbase_address_external_address.html @@ -1,2 +1,2 @@ -coinbase/address/external_address | @coinbase/coinbase-sdk

    Module coinbase/address/external_address

    Index

    Classes

    ExternalAddress +coinbase/address/external_address | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/coinbase_address_reputation.html b/docs/modules/coinbase_address_reputation.html new file mode 100644 index 00000000..ba292dc6 --- /dev/null +++ b/docs/modules/coinbase_address_reputation.html @@ -0,0 +1,2 @@ +coinbase/address_reputation | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/coinbase_address_wallet_address.html b/docs/modules/coinbase_address_wallet_address.html index 3972b3bc..078f9ed8 100644 --- a/docs/modules/coinbase_address_wallet_address.html +++ b/docs/modules/coinbase_address_wallet_address.html @@ -1,2 +1,2 @@ -coinbase/address/wallet_address | @coinbase/coinbase-sdk

    Module coinbase/address/wallet_address

    Index

    Classes

    WalletAddress +coinbase/address/wallet_address | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/coinbase_api_error.html b/docs/modules/coinbase_api_error.html index a59e768b..ca78ed88 100644 --- a/docs/modules/coinbase_api_error.html +++ b/docs/modules/coinbase_api_error.html @@ -1,6 +1,7 @@ -coinbase/api_error | @coinbase/coinbase-sdk

    Index

    Classes

    APIError +coinbase/api_error | @coinbase/coinbase-sdk

    Index

    Classes

    APIError AlreadyExistsError FaucetLimitReachedError +InternalError InvalidAddressError InvalidAddressIDError InvalidAmountError diff --git a/docs/modules/coinbase_asset.html b/docs/modules/coinbase_asset.html index 0d739788..f6eb88a4 100644 --- a/docs/modules/coinbase_asset.html +++ b/docs/modules/coinbase_asset.html @@ -1,2 +1,2 @@ -coinbase/asset | @coinbase/coinbase-sdk

    Index

    Classes

    Asset +coinbase/asset | @coinbase/coinbase-sdk

    Index

    Classes

    \ No newline at end of file diff --git a/docs/modules/coinbase_authenticator.html b/docs/modules/coinbase_authenticator.html index 7198eeac..50a9f8ac 100644 --- a/docs/modules/coinbase_authenticator.html +++ b/docs/modules/coinbase_authenticator.html @@ -1,2 +1,2 @@ -coinbase/authenticator | @coinbase/coinbase-sdk

    Index

    Classes

    CoinbaseAuthenticator +coinbase/authenticator | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/coinbase_balance.html b/docs/modules/coinbase_balance.html index 1a8e9054..1131b8fa 100644 --- a/docs/modules/coinbase_balance.html +++ b/docs/modules/coinbase_balance.html @@ -1,2 +1,2 @@ -coinbase/balance | @coinbase/coinbase-sdk

    Index

    Classes

    Balance +coinbase/balance | @coinbase/coinbase-sdk

    Index

    Classes

    \ No newline at end of file diff --git a/docs/modules/coinbase_balance_map.html b/docs/modules/coinbase_balance_map.html index 76fa9951..5a304dbd 100644 --- a/docs/modules/coinbase_balance_map.html +++ b/docs/modules/coinbase_balance_map.html @@ -1,2 +1,2 @@ -coinbase/balance_map | @coinbase/coinbase-sdk

    Index

    Classes

    BalanceMap +coinbase/balance_map | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/coinbase_coinbase.html b/docs/modules/coinbase_coinbase.html index 731211b1..a3ca9727 100644 --- a/docs/modules/coinbase_coinbase.html +++ b/docs/modules/coinbase_coinbase.html @@ -1,2 +1,2 @@ -coinbase/coinbase | @coinbase/coinbase-sdk

    Index

    Classes

    Coinbase +coinbase/coinbase | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/coinbase_constants.html b/docs/modules/coinbase_constants.html index 818bfbef..dcd5ca00 100644 --- a/docs/modules/coinbase_constants.html +++ b/docs/modules/coinbase_constants.html @@ -1,4 +1,2 @@ -coinbase/constants | @coinbase/coinbase-sdk

    Index

    Variables

    ATOMIC_UNITS_PER_USDC -GWEI_DECIMALS -WEI_PER_ETHER +coinbase/constants | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/coinbase_contract_event.html b/docs/modules/coinbase_contract_event.html new file mode 100644 index 00000000..d0de0889 --- /dev/null +++ b/docs/modules/coinbase_contract_event.html @@ -0,0 +1,2 @@ +coinbase/contract_event | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/coinbase_contract_invocation.html b/docs/modules/coinbase_contract_invocation.html new file mode 100644 index 00000000..c6d14992 --- /dev/null +++ b/docs/modules/coinbase_contract_invocation.html @@ -0,0 +1,2 @@ +coinbase/contract_invocation | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/coinbase_crypto_amount.html b/docs/modules/coinbase_crypto_amount.html new file mode 100644 index 00000000..4da57f6c --- /dev/null +++ b/docs/modules/coinbase_crypto_amount.html @@ -0,0 +1,2 @@ +coinbase/crypto_amount | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/coinbase_errors.html b/docs/modules/coinbase_errors.html index 51dc8e9a..0cd5c389 100644 --- a/docs/modules/coinbase_errors.html +++ b/docs/modules/coinbase_errors.html @@ -1,6 +1,9 @@ -coinbase/errors | @coinbase/coinbase-sdk

    Index

    Classes

    ArgumentError -InternalError -InvalidAPIKeyFormat -InvalidConfiguration -InvalidUnsignedPayload +coinbase/errors | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/coinbase_faucet_transaction.html b/docs/modules/coinbase_faucet_transaction.html index ba44b9e7..b155486e 100644 --- a/docs/modules/coinbase_faucet_transaction.html +++ b/docs/modules/coinbase_faucet_transaction.html @@ -1,2 +1,2 @@ -coinbase/faucet_transaction | @coinbase/coinbase-sdk

    Module coinbase/faucet_transaction

    Index

    Classes

    FaucetTransaction +coinbase/faucet_transaction | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/coinbase_fiat_amount.html b/docs/modules/coinbase_fiat_amount.html new file mode 100644 index 00000000..65e29e84 --- /dev/null +++ b/docs/modules/coinbase_fiat_amount.html @@ -0,0 +1,2 @@ +coinbase/fiat_amount | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/coinbase_fund_operation.html b/docs/modules/coinbase_fund_operation.html new file mode 100644 index 00000000..3d8fe982 --- /dev/null +++ b/docs/modules/coinbase_fund_operation.html @@ -0,0 +1,2 @@ +coinbase/fund_operation | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/coinbase_fund_quote.html b/docs/modules/coinbase_fund_quote.html new file mode 100644 index 00000000..73bfa57b --- /dev/null +++ b/docs/modules/coinbase_fund_quote.html @@ -0,0 +1,2 @@ +coinbase/fund_quote | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/coinbase_user.html b/docs/modules/coinbase_hash.html similarity index 86% rename from docs/modules/coinbase_user.html rename to docs/modules/coinbase_hash.html index a99437fd..0d4ae77e 100644 --- a/docs/modules/coinbase_user.html +++ b/docs/modules/coinbase_hash.html @@ -1,2 +1,3 @@ -coinbase/user | @coinbase/coinbase-sdk

    Index

    Classes

    User +coinbase/hash | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/coinbase_historical_balance.html b/docs/modules/coinbase_historical_balance.html new file mode 100644 index 00000000..91f2e02a --- /dev/null +++ b/docs/modules/coinbase_historical_balance.html @@ -0,0 +1,2 @@ +coinbase/historical_balance | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/coinbase_payload_signature.html b/docs/modules/coinbase_payload_signature.html new file mode 100644 index 00000000..32c4ec20 --- /dev/null +++ b/docs/modules/coinbase_payload_signature.html @@ -0,0 +1,2 @@ +coinbase/payload_signature | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/coinbase_read_contract.html b/docs/modules/coinbase_read_contract.html new file mode 100644 index 00000000..7e26662a --- /dev/null +++ b/docs/modules/coinbase_read_contract.html @@ -0,0 +1,2 @@ +coinbase/read_contract | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/coinbase_server_signer.html b/docs/modules/coinbase_server_signer.html index d3c58923..cc581e09 100644 --- a/docs/modules/coinbase_server_signer.html +++ b/docs/modules/coinbase_server_signer.html @@ -1,2 +1,2 @@ -coinbase/server_signer | @coinbase/coinbase-sdk

    Index

    Classes

    ServerSigner +coinbase/server_signer | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/coinbase_smart_contract.html b/docs/modules/coinbase_smart_contract.html new file mode 100644 index 00000000..8d79a3f0 --- /dev/null +++ b/docs/modules/coinbase_smart_contract.html @@ -0,0 +1,2 @@ +coinbase/smart_contract | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/coinbase_sponsored_send.html b/docs/modules/coinbase_sponsored_send.html new file mode 100644 index 00000000..ac2e8163 --- /dev/null +++ b/docs/modules/coinbase_sponsored_send.html @@ -0,0 +1,2 @@ +coinbase/sponsored_send | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/coinbase_staking_balance.html b/docs/modules/coinbase_staking_balance.html new file mode 100644 index 00000000..100cab96 --- /dev/null +++ b/docs/modules/coinbase_staking_balance.html @@ -0,0 +1,2 @@ +coinbase/staking_balance | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/coinbase_staking_operation.html b/docs/modules/coinbase_staking_operation.html index 1009ba12..682fea16 100644 --- a/docs/modules/coinbase_staking_operation.html +++ b/docs/modules/coinbase_staking_operation.html @@ -1,2 +1,2 @@ -coinbase/staking_operation | @coinbase/coinbase-sdk

    Module coinbase/staking_operation

    Index

    Classes

    StakingOperation +coinbase/staking_operation | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/coinbase_staking_reward.html b/docs/modules/coinbase_staking_reward.html index 9bb6d0b8..a49b8da8 100644 --- a/docs/modules/coinbase_staking_reward.html +++ b/docs/modules/coinbase_staking_reward.html @@ -1,2 +1,2 @@ -coinbase/staking_reward | @coinbase/coinbase-sdk

    Module coinbase/staking_reward

    Index

    Classes

    StakingReward +coinbase/staking_reward | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/coinbase_trade.html b/docs/modules/coinbase_trade.html index eafbbdfd..4a537d90 100644 --- a/docs/modules/coinbase_trade.html +++ b/docs/modules/coinbase_trade.html @@ -1,2 +1,2 @@ -coinbase/trade | @coinbase/coinbase-sdk

    Index

    Classes

    Trade +coinbase/trade | @coinbase/coinbase-sdk

    Index

    Classes

    \ No newline at end of file diff --git a/docs/modules/coinbase_transaction.html b/docs/modules/coinbase_transaction.html index 40d29f99..00b2414d 100644 --- a/docs/modules/coinbase_transaction.html +++ b/docs/modules/coinbase_transaction.html @@ -1,2 +1,2 @@ -coinbase/transaction | @coinbase/coinbase-sdk

    Index

    Classes

    Transaction +coinbase/transaction | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/coinbase_transfer.html b/docs/modules/coinbase_transfer.html index c1025a5d..2a71b5bd 100644 --- a/docs/modules/coinbase_transfer.html +++ b/docs/modules/coinbase_transfer.html @@ -1,2 +1,2 @@ -coinbase/transfer | @coinbase/coinbase-sdk

    Index

    Classes

    Transfer +coinbase/transfer | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/coinbase_types.html b/docs/modules/coinbase_types.html index 4ee1c514..62032629 100644 --- a/docs/modules/coinbase_types.html +++ b/docs/modules/coinbase_types.html @@ -1,24 +1,66 @@ -coinbase/types | @coinbase/coinbase-sdk

    Index

    Enumerations

    ServerSignerStatus +coinbase/types | @coinbase/coinbase-sdk

    Index

    Enumerations

    Interfaces

    Type Aliases

    Functions

    \ No newline at end of file diff --git a/docs/modules/coinbase_types_contract.html b/docs/modules/coinbase_types_contract.html new file mode 100644 index 00000000..44294ba5 --- /dev/null +++ b/docs/modules/coinbase_types_contract.html @@ -0,0 +1,2 @@ +coinbase/types/contract | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/coinbase_utils.html b/docs/modules/coinbase_utils.html index d72080dd..9236c237 100644 --- a/docs/modules/coinbase_utils.html +++ b/docs/modules/coinbase_utils.html @@ -1,5 +1,7 @@ -coinbase/utils | @coinbase/coinbase-sdk

    Index

    Functions

    convertStringToHex +coinbase/utils | @coinbase/coinbase-sdk

    Index

    Functions

    convertStringToHex delay +formatDate +getWeekBackDate logApiResponse parseUnsignedPayload registerAxiosInterceptors diff --git a/docs/modules/coinbase_validator.html b/docs/modules/coinbase_validator.html new file mode 100644 index 00000000..166d2fce --- /dev/null +++ b/docs/modules/coinbase_validator.html @@ -0,0 +1,2 @@ +coinbase/validator | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/coinbase_wallet.html b/docs/modules/coinbase_wallet.html index 047625f3..65ac56d0 100644 --- a/docs/modules/coinbase_wallet.html +++ b/docs/modules/coinbase_wallet.html @@ -1,2 +1,2 @@ -coinbase/wallet | @coinbase/coinbase-sdk

    Index

    Classes

    Wallet +coinbase/wallet | @coinbase/coinbase-sdk

    Index

    Classes

    \ No newline at end of file diff --git a/docs/modules/coinbase_webhook.html b/docs/modules/coinbase_webhook.html new file mode 100644 index 00000000..89747887 --- /dev/null +++ b/docs/modules/coinbase_webhook.html @@ -0,0 +1,2 @@ +coinbase/webhook | @coinbase/coinbase-sdk

    Index

    Classes

    \ No newline at end of file diff --git a/docs/modules/index.html b/docs/modules/index.html index 65180d97..84e755ed 100644 --- a/docs/modules/index.html +++ b/docs/modules/index.html @@ -1,48 +1,149 @@ -index | @coinbase/coinbase-sdk

    References

    ATOMIC_UNITS_PER_USDC +index | @coinbase/coinbase-sdk

    References

    APIError Address AddressAPIClient +AddressReputationApiClient +AlreadyExistsError +AlreadySignedError Amount ApiClients ArgumentError Asset AssetAPIClient Balance +BalanceHistoryApiClient BalanceMap +BroadcastExternalTransactionResponse +CHAIN_ID_TO_NETWORK_ID Coinbase +CoinbaseAuthenticator CoinbaseConfigureFromJsonOptions -CoinbaseExternalAddressStakeOptions CoinbaseOptions +CompletedOperation +ContractEvent +ContractInvocation +ContractInvocationAPIClient +CreateContractInvocationOptions +CreateCustomContractOptions +CreateERC1155Options +CreateERC20Options +CreateERC721Options +CreateFundOptions +CreateQuoteOptions +CreateSmartWalletOptions +CreateTradeOptions CreateTransferOptions +CreateWebhookOptions +CryptoAmount Destination ExternalAddress ExternalAddressAPIClient +ExternalSmartContractAPIClient +FailedOperation +FaucetLimitReachedError FaucetTransaction +FiatAmount +FundOperation +FundOperationApiClient +FundOperationStatus +FundQuote GWEI_DECIMALS +HistoricalBalance InternalError -InvalidAPIKeyFormat -InvalidConfiguration -InvalidUnsignedPayload +InvalidAPIKeyFormatError +InvalidAddressError +InvalidAddressIDError +InvalidAmountError +InvalidAssetIDError +InvalidConfigurationError +InvalidDestinationError +InvalidLimitError +InvalidNetworkIDError +InvalidPageError +InvalidSignedPayloadError +InvalidTransferIDError +InvalidTransferStatusError +InvalidUnsignedPayloadError +InvalidWalletError +InvalidWalletIDError +ListHistoricalBalancesOptions +ListHistoricalBalancesResult +ListTransactionsOptions +ListTransactionsResult +MalformedRequestError +MnemonicSeedPhrase +MultiTokenContractOptions +NFTContractOptions +Network +NetworkFeatureUnsupportedError +NetworkScopedSmartWallet +NotFoundError +NotSignedError +PaginationOptions +PaginationResponse +PayloadSignature +PayloadSignatureStatus +RegisterContractOptions +ResourceExhaustedError SeedData +SendUserOperationOptions +SendUserOperationReturnType ServerSigner ServerSignerAPIClient ServerSignerStatus +Signer +SmartContract +SmartContractAPIClient +SmartContractOptions +SmartContractType +SmartWallet +SmartWalletAPIClient +SmartWalletNetworkOptions +SponsoredSendStatus StakeAPIClient StakeOptionsMode +StakingBalance StakingOperation StakingReward +StakingRewardFormat +SupportedChainId +TimeoutError +ToSmartWalletOptions +TokenContractOptions Trade TradeApiClients Transaction +TransactionHistoryApiClient TransactionStatus Transfer TransferAPIClient TransferStatus -User -UserAPIClient -WEI_PER_ETHER +TypedDataDomain +TypedDataField +UnauthorizedError +UnimplementedError +UninitializedSDKError +UnsupportedAssetError +UpdateContractOptions +UpdateWebhookOptions +Validator +ValidatorStatus +WaitForUserOperationOptions +WaitForUserOperationReturnType Wallet WalletAPIClient WalletAddress WalletCreateOptions WalletData -

    References

    Re-exports ATOMIC_UNITS_PER_USDC
    Re-exports Address
    Re-exports AddressAPIClient
    Re-exports Amount
    Re-exports ApiClients
    Re-exports ArgumentError
    Re-exports Asset
    Re-exports AssetAPIClient
    Re-exports Balance
    Re-exports BalanceMap
    Re-exports Coinbase
    Re-exports CoinbaseConfigureFromJsonOptions
    Re-exports CoinbaseExternalAddressStakeOptions
    Re-exports CoinbaseOptions
    Re-exports CreateTransferOptions
    Re-exports Destination
    Re-exports ExternalAddress
    Re-exports ExternalAddressAPIClient
    Re-exports FaucetTransaction
    Re-exports GWEI_DECIMALS
    Re-exports InternalError
    Re-exports InvalidAPIKeyFormat
    Re-exports InvalidConfiguration
    Re-exports InvalidUnsignedPayload
    Re-exports SeedData
    Re-exports ServerSigner
    Re-exports ServerSignerAPIClient
    Re-exports ServerSignerStatus
    Re-exports StakeAPIClient
    Re-exports StakeOptionsMode
    Re-exports StakingOperation
    Re-exports StakingReward
    Re-exports Trade
    Re-exports TradeApiClients
    Re-exports Transaction
    Re-exports TransactionStatus
    Re-exports Transfer
    Re-exports TransferAPIClient
    Re-exports TransferStatus
    Re-exports User
    Re-exports UserAPIClient
    Re-exports WEI_PER_ETHER
    Re-exports Wallet
    Re-exports WalletAPIClient
    Re-exports WalletAddress
    Re-exports WalletCreateOptions
    Re-exports WalletData
    \ No newline at end of file +WalletStakeAPIClient +Webhook +WebhookApiClient +createSmartWallet +hashMessage +hashTypedDataMessage +isMnemonicSeedPhrase +isWalletData +readContract +sendUserOperation +toSmartWallet +waitForUserOperation +

    References

    Re-exports APIError
    Re-exports Address
    Re-exports AddressAPIClient
    Re-exports AddressReputationApiClient
    Re-exports AlreadyExistsError
    Re-exports AlreadySignedError
    Re-exports Amount
    Re-exports ApiClients
    Re-exports ArgumentError
    Re-exports Asset
    Re-exports AssetAPIClient
    Re-exports Balance
    Re-exports BalanceHistoryApiClient
    Re-exports BalanceMap
    Re-exports BroadcastExternalTransactionResponse
    Re-exports CHAIN_ID_TO_NETWORK_ID
    Re-exports Coinbase
    Re-exports CoinbaseAuthenticator
    Re-exports CoinbaseConfigureFromJsonOptions
    Re-exports CoinbaseOptions
    Re-exports CompletedOperation
    Re-exports ContractEvent
    Re-exports ContractInvocation
    Re-exports ContractInvocationAPIClient
    Re-exports CreateContractInvocationOptions
    Re-exports CreateCustomContractOptions
    Re-exports CreateERC1155Options
    Re-exports CreateERC20Options
    Re-exports CreateERC721Options
    Re-exports CreateFundOptions
    Re-exports CreateQuoteOptions
    Re-exports CreateSmartWalletOptions
    Re-exports CreateTradeOptions
    Re-exports CreateTransferOptions
    Re-exports CreateWebhookOptions
    Re-exports CryptoAmount
    Re-exports Destination
    Re-exports ExternalAddress
    Re-exports ExternalAddressAPIClient
    Re-exports ExternalSmartContractAPIClient
    Re-exports FailedOperation
    Re-exports FaucetLimitReachedError
    Re-exports FaucetTransaction
    Re-exports FiatAmount
    Re-exports FundOperation
    Re-exports FundOperationApiClient
    Re-exports FundOperationStatus
    Re-exports FundQuote
    Re-exports GWEI_DECIMALS
    Re-exports HistoricalBalance
    Re-exports InternalError
    Re-exports InvalidAPIKeyFormatError
    Re-exports InvalidAddressError
    Re-exports InvalidAddressIDError
    Re-exports InvalidAmountError
    Re-exports InvalidAssetIDError
    Re-exports InvalidConfigurationError
    Re-exports InvalidDestinationError
    Re-exports InvalidLimitError
    Re-exports InvalidNetworkIDError
    Re-exports InvalidPageError
    Re-exports InvalidSignedPayloadError
    Re-exports InvalidTransferIDError
    Re-exports InvalidTransferStatusError
    Re-exports InvalidUnsignedPayloadError
    Re-exports InvalidWalletError
    Re-exports InvalidWalletIDError
    Re-exports ListHistoricalBalancesOptions
    Re-exports ListHistoricalBalancesResult
    Re-exports ListTransactionsOptions
    Re-exports ListTransactionsResult
    Re-exports MalformedRequestError
    Re-exports MnemonicSeedPhrase
    Re-exports MultiTokenContractOptions
    Re-exports NFTContractOptions
    Re-exports Network
    Re-exports NetworkFeatureUnsupportedError
    Re-exports NetworkScopedSmartWallet
    Re-exports NotFoundError
    Re-exports NotSignedError
    Re-exports PaginationOptions
    Re-exports PaginationResponse
    Re-exports PayloadSignature
    Re-exports PayloadSignatureStatus
    Re-exports RegisterContractOptions
    Re-exports ResourceExhaustedError
    Re-exports SeedData
    Re-exports SendUserOperationOptions
    Re-exports SendUserOperationReturnType
    Re-exports ServerSigner
    Re-exports ServerSignerAPIClient
    Re-exports ServerSignerStatus
    Re-exports Signer
    Re-exports SmartContract
    Re-exports SmartContractAPIClient
    Re-exports SmartContractOptions
    Re-exports SmartContractType
    Re-exports SmartWallet
    Re-exports SmartWalletAPIClient
    Re-exports SmartWalletNetworkOptions
    Re-exports SponsoredSendStatus
    Re-exports StakeAPIClient
    Re-exports StakeOptionsMode
    Re-exports StakingBalance
    Re-exports StakingOperation
    Re-exports StakingReward
    Re-exports StakingRewardFormat
    Re-exports SupportedChainId
    Re-exports TimeoutError
    Re-exports ToSmartWalletOptions
    Re-exports TokenContractOptions
    Re-exports Trade
    Re-exports TradeApiClients
    Re-exports Transaction
    Re-exports TransactionHistoryApiClient
    Re-exports TransactionStatus
    Re-exports Transfer
    Re-exports TransferAPIClient
    Re-exports TransferStatus
    Re-exports TypedDataDomain
    Re-exports TypedDataField
    Re-exports UnauthorizedError
    Re-exports UnimplementedError
    Re-exports UninitializedSDKError
    Re-exports UnsupportedAssetError
    Re-exports UpdateContractOptions
    Re-exports UpdateWebhookOptions
    Re-exports Validator
    Re-exports ValidatorStatus
    Re-exports WaitForUserOperationOptions
    Re-exports WaitForUserOperationReturnType
    Re-exports Wallet
    Re-exports WalletAPIClient
    Re-exports WalletAddress
    Re-exports WalletCreateOptions
    Re-exports WalletData
    Re-exports WalletStakeAPIClient
    Re-exports Webhook
    Re-exports WebhookApiClient
    Re-exports createSmartWallet
    Re-exports hashMessage
    Re-exports hashTypedDataMessage
    Re-exports isMnemonicSeedPhrase
    Re-exports isWalletData
    Re-exports readContract
    Re-exports sendUserOperation
    Re-exports toSmartWallet
    Re-exports waitForUserOperation
    \ No newline at end of file diff --git a/docs/modules/types_calls.html b/docs/modules/types_calls.html new file mode 100644 index 00000000..adf3940c --- /dev/null +++ b/docs/modules/types_calls.html @@ -0,0 +1,3 @@ +types/calls | @coinbase/coinbase-sdk

    Index

    Type Aliases

    \ No newline at end of file diff --git a/docs/modules/types_chain.html b/docs/modules/types_chain.html new file mode 100644 index 00000000..04fe2d5e --- /dev/null +++ b/docs/modules/types_chain.html @@ -0,0 +1,4 @@ +types/chain | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/types_contract.html b/docs/modules/types_contract.html new file mode 100644 index 00000000..ba98ea48 --- /dev/null +++ b/docs/modules/types_contract.html @@ -0,0 +1,7 @@ +types/contract | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/types_misc.html b/docs/modules/types_misc.html new file mode 100644 index 00000000..fe30fa15 --- /dev/null +++ b/docs/modules/types_misc.html @@ -0,0 +1,4 @@ +types/misc | @coinbase/coinbase-sdk

    Index

    Type Aliases

    \ No newline at end of file diff --git a/docs/modules/types_multicall.html b/docs/modules/types_multicall.html new file mode 100644 index 00000000..a86e4ec6 --- /dev/null +++ b/docs/modules/types_multicall.html @@ -0,0 +1,2 @@ +types/multicall | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/types_utils.html b/docs/modules/types_utils.html new file mode 100644 index 00000000..ef6f4348 --- /dev/null +++ b/docs/modules/types_utils.html @@ -0,0 +1,32 @@ +types/utils | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/utils_chain.html b/docs/modules/utils_chain.html new file mode 100644 index 00000000..f2cc7f12 --- /dev/null +++ b/docs/modules/utils_chain.html @@ -0,0 +1,2 @@ +utils/chain | @coinbase/coinbase-sdk

    Index

    Functions

    \ No newline at end of file diff --git a/docs/modules/utils_wait.html b/docs/modules/utils_wait.html new file mode 100644 index 00000000..c6996982 --- /dev/null +++ b/docs/modules/utils_wait.html @@ -0,0 +1,3 @@ +utils/wait | @coinbase/coinbase-sdk

    Index

    Type Aliases

    Functions

    \ No newline at end of file diff --git a/docs/modules/wallets_createSmartWallet.html b/docs/modules/wallets_createSmartWallet.html new file mode 100644 index 00000000..ccab091c --- /dev/null +++ b/docs/modules/wallets_createSmartWallet.html @@ -0,0 +1,3 @@ +wallets/createSmartWallet | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/wallets_toSmartWallet.html b/docs/modules/wallets_toSmartWallet.html new file mode 100644 index 00000000..c5535859 --- /dev/null +++ b/docs/modules/wallets_toSmartWallet.html @@ -0,0 +1,3 @@ +wallets/toSmartWallet | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/modules/wallets_types.html b/docs/modules/wallets_types.html new file mode 100644 index 00000000..f17317ed --- /dev/null +++ b/docs/modules/wallets_types.html @@ -0,0 +1,5 @@ +wallets/types | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/types/actions_sendUserOperation.SendUserOperationOptions.html b/docs/types/actions_sendUserOperation.SendUserOperationOptions.html new file mode 100644 index 00000000..bce761ca --- /dev/null +++ b/docs/types/actions_sendUserOperation.SendUserOperationOptions.html @@ -0,0 +1,13 @@ +SendUserOperationOptions | @coinbase/coinbase-sdk
    SendUserOperationOptions<T>: {
        calls: Calls<T>;
        chainId: SupportedChainId;
        paymasterUrl?: string;
    }

    Options for sending a user operation

    +

    Type Parameters

    • T extends readonly unknown[]

      Array type for the calls parameter

      +

    Type declaration

    • calls: Calls<T>

      Array of contract calls to execute in the user operation. +Each call can either be:

      +
        +
      • A direct call with to, value, and data
      • +
      • A contract call with to, abi, functionName, and args
      • +
      +

      Example

      const calls = [
      {
      to: "0x1234567890123456789012345678901234567890",
      value: parseEther("0.0000005"),
      data: "0x",
      },
      {
      to: "0x1234567890123456789012345678901234567890",
      abi: erc20Abi,
      functionName: "transfer",
      args: [to, amount],
      },
      ] +
      +
    • chainId: SupportedChainId

      Chain ID of the network to execute on

      +
    • Optional paymasterUrl?: string

      Optional URL of the paymaster service to use for gas sponsorship. Must be ERC-7677 compliant.

      +
    \ No newline at end of file diff --git a/docs/types/actions_sendUserOperation.SendUserOperationReturnType.html b/docs/types/actions_sendUserOperation.SendUserOperationReturnType.html new file mode 100644 index 00000000..acd736ec --- /dev/null +++ b/docs/types/actions_sendUserOperation.SendUserOperationReturnType.html @@ -0,0 +1,5 @@ +SendUserOperationReturnType | @coinbase/coinbase-sdk
    SendUserOperationReturnType: {
        smartWalletAddress: Address;
        status: typeof Broadcast;
        userOpHash: Hex;
    }

    Return type for the sendUserOperation function

    +

    Type declaration

    • smartWalletAddress: Address

      The address of the smart wallet

      +
    • status: typeof Broadcast

      The status of the user operation

      +
    • userOpHash: Hex

      The hash of the user operation. This is not the transaction hash which is only available after the operation is completed.

      +
    \ No newline at end of file diff --git a/docs/types/actions_waitForUserOperation.CompletedOperation.html b/docs/types/actions_waitForUserOperation.CompletedOperation.html new file mode 100644 index 00000000..a1ffe724 --- /dev/null +++ b/docs/types/actions_waitForUserOperation.CompletedOperation.html @@ -0,0 +1,6 @@ +CompletedOperation | @coinbase/coinbase-sdk
    CompletedOperation: {
        smartWalletAddress: Address;
        status: typeof Complete;
        transactionHash: string;
        userOpHash: Hex;
    }

    Represents a completed user operation

    +

    Type declaration

    • smartWalletAddress: Address

      The address of the smart wallet

      +
    • status: typeof Complete

      The status of the user operation

      +
    • transactionHash: string

      The transaction hash that executed the completed user operation

      +
    • userOpHash: Hex

      The hash of the user operation. This is not the transaction hash which is only available after the operation is completed.

      +
    \ No newline at end of file diff --git a/docs/types/actions_waitForUserOperation.FailedOperation.html b/docs/types/actions_waitForUserOperation.FailedOperation.html new file mode 100644 index 00000000..fdcca9e0 --- /dev/null +++ b/docs/types/actions_waitForUserOperation.FailedOperation.html @@ -0,0 +1,5 @@ +FailedOperation | @coinbase/coinbase-sdk
    FailedOperation: {
        smartWalletAddress: Address;
        status: typeof Failed;
        userOpHash: Hex;
    }

    Represents a failed user operation

    +

    Type declaration

    • smartWalletAddress: Address

      The address of the smart wallet

      +
    • status: typeof Failed

      The status of the user operation

      +
    • userOpHash: Hex

      The hash of the user operation. This is not the transaction hash which is only available after the operation is completed.

      +
    \ No newline at end of file diff --git a/docs/types/actions_waitForUserOperation.WaitForUserOperationOptions.html b/docs/types/actions_waitForUserOperation.WaitForUserOperationOptions.html new file mode 100644 index 00000000..5e763894 --- /dev/null +++ b/docs/types/actions_waitForUserOperation.WaitForUserOperationOptions.html @@ -0,0 +1,5 @@ +WaitForUserOperationOptions | @coinbase/coinbase-sdk
    WaitForUserOperationOptions: {
        smartWalletAddress: Address;
        userOpHash: Hex;
        waitOptions?: WaitOptions;
    }

    Options for waiting for a user operation

    +

    Type declaration

    • smartWalletAddress: Address

      The address of the smart wallet

      +
    • userOpHash: Hex

      The hash of the user operation

      +
    • Optional waitOptions?: WaitOptions

      Optional options for the wait operation

      +
    \ No newline at end of file diff --git a/docs/types/actions_waitForUserOperation.WaitForUserOperationReturnType.html b/docs/types/actions_waitForUserOperation.WaitForUserOperationReturnType.html new file mode 100644 index 00000000..7cd6a447 --- /dev/null +++ b/docs/types/actions_waitForUserOperation.WaitForUserOperationReturnType.html @@ -0,0 +1,2 @@ +WaitForUserOperationReturnType | @coinbase/coinbase-sdk
    WaitForUserOperationReturnType: FailedOperation | CompletedOperation

    Represents the return type of the waitForUserOperation function

    +
    \ No newline at end of file diff --git a/docs/types/client_api.FetchStakingRewardsRequestFormatEnum.html b/docs/types/client_api.FetchStakingRewardsRequestFormatEnum.html deleted file mode 100644 index 7793422f..00000000 --- a/docs/types/client_api.FetchStakingRewardsRequestFormatEnum.html +++ /dev/null @@ -1 +0,0 @@ -FetchStakingRewardsRequestFormatEnum | @coinbase/coinbase-sdk

    Type alias FetchStakingRewardsRequestFormatEnum

    FetchStakingRewardsRequestFormatEnum: typeof FetchStakingRewardsRequestFormatEnum[keyof typeof FetchStakingRewardsRequestFormatEnum]
    \ No newline at end of file diff --git a/docs/types/client_api.FundOperationStatusEnum.html b/docs/types/client_api.FundOperationStatusEnum.html new file mode 100644 index 00000000..0415c1e8 --- /dev/null +++ b/docs/types/client_api.FundOperationStatusEnum.html @@ -0,0 +1 @@ +FundOperationStatusEnum | @coinbase/coinbase-sdk
    FundOperationStatusEnum: typeof FundOperationStatusEnum[keyof typeof FundOperationStatusEnum]
    \ No newline at end of file diff --git a/docs/types/client_api.NetworkProtocolFamilyEnum.html b/docs/types/client_api.NetworkProtocolFamilyEnum.html new file mode 100644 index 00000000..f1c80bcc --- /dev/null +++ b/docs/types/client_api.NetworkProtocolFamilyEnum.html @@ -0,0 +1 @@ +NetworkProtocolFamilyEnum | @coinbase/coinbase-sdk
    NetworkProtocolFamilyEnum: typeof NetworkProtocolFamilyEnum[keyof typeof NetworkProtocolFamilyEnum]
    \ No newline at end of file diff --git a/docs/types/client_api.PayloadSignatureStatusEnum.html b/docs/types/client_api.PayloadSignatureStatusEnum.html new file mode 100644 index 00000000..1179bf4d --- /dev/null +++ b/docs/types/client_api.PayloadSignatureStatusEnum.html @@ -0,0 +1 @@ +PayloadSignatureStatusEnum | @coinbase/coinbase-sdk
    PayloadSignatureStatusEnum: typeof PayloadSignatureStatusEnum[keyof typeof PayloadSignatureStatusEnum]
    \ No newline at end of file diff --git a/docs/types/client_api.ResolveIdentityByAddressRolesEnum.html b/docs/types/client_api.ResolveIdentityByAddressRolesEnum.html new file mode 100644 index 00000000..5155f9a8 --- /dev/null +++ b/docs/types/client_api.ResolveIdentityByAddressRolesEnum.html @@ -0,0 +1 @@ +ResolveIdentityByAddressRolesEnum | @coinbase/coinbase-sdk

    Type alias ResolveIdentityByAddressRolesEnum

    ResolveIdentityByAddressRolesEnum: typeof ResolveIdentityByAddressRolesEnum[keyof typeof ResolveIdentityByAddressRolesEnum]
    \ No newline at end of file diff --git a/docs/types/client_api.ServerSignerEventEvent.html b/docs/types/client_api.ServerSignerEventEvent.html index 78e8d7fe..7ce755e9 100644 --- a/docs/types/client_api.ServerSignerEventEvent.html +++ b/docs/types/client_api.ServerSignerEventEvent.html @@ -1 +1 @@ -ServerSignerEventEvent | @coinbase/coinbase-sdk
    ServerSignerEventEvent: SeedCreationEvent | SignatureCreationEvent

    Export

    \ No newline at end of file +ServerSignerEventEvent | @coinbase/coinbase-sdk
    ServerSignerEventEvent: SeedCreationEvent | SignatureCreationEvent

    Export

    \ No newline at end of file diff --git a/docs/types/client_api.SmartContractOptions.html b/docs/types/client_api.SmartContractOptions.html new file mode 100644 index 00000000..8cda0e47 --- /dev/null +++ b/docs/types/client_api.SmartContractOptions.html @@ -0,0 +1 @@ +SmartContractOptions | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/types/client_api.SolidityValueTypeEnum.html b/docs/types/client_api.SolidityValueTypeEnum.html new file mode 100644 index 00000000..ab8bd9f1 --- /dev/null +++ b/docs/types/client_api.SolidityValueTypeEnum.html @@ -0,0 +1 @@ +SolidityValueTypeEnum | @coinbase/coinbase-sdk
    SolidityValueTypeEnum: typeof SolidityValueTypeEnum[keyof typeof SolidityValueTypeEnum]
    \ No newline at end of file diff --git a/docs/types/client_api.SponsoredSendStatusEnum.html b/docs/types/client_api.SponsoredSendStatusEnum.html new file mode 100644 index 00000000..a05c7126 --- /dev/null +++ b/docs/types/client_api.SponsoredSendStatusEnum.html @@ -0,0 +1 @@ +SponsoredSendStatusEnum | @coinbase/coinbase-sdk
    SponsoredSendStatusEnum: typeof SponsoredSendStatusEnum[keyof typeof SponsoredSendStatusEnum]
    \ No newline at end of file diff --git a/docs/types/client_api.StakingContextContext.html b/docs/types/client_api.StakingContextContext.html deleted file mode 100644 index 8beafb72..00000000 --- a/docs/types/client_api.StakingContextContext.html +++ /dev/null @@ -1 +0,0 @@ -StakingContextContext | @coinbase/coinbase-sdk
    StakingContextContext: PartialEthStakingContext

    Export

    \ No newline at end of file diff --git a/docs/types/client_api.StakingOperationMetadata.html b/docs/types/client_api.StakingOperationMetadata.html new file mode 100644 index 00000000..c41d03ce --- /dev/null +++ b/docs/types/client_api.StakingOperationMetadata.html @@ -0,0 +1 @@ +StakingOperationMetadata | @coinbase/coinbase-sdk
    StakingOperationMetadata: SignedVoluntaryExitMessageMetadata[]

    Export

    \ No newline at end of file diff --git a/docs/types/client_api.StakingOperationStatusEnum.html b/docs/types/client_api.StakingOperationStatusEnum.html new file mode 100644 index 00000000..175b088d --- /dev/null +++ b/docs/types/client_api.StakingOperationStatusEnum.html @@ -0,0 +1 @@ +StakingOperationStatusEnum | @coinbase/coinbase-sdk
    StakingOperationStatusEnum: typeof StakingOperationStatusEnum[keyof typeof StakingOperationStatusEnum]
    \ No newline at end of file diff --git a/docs/types/client_api.StakingRewardStateEnum.html b/docs/types/client_api.StakingRewardStateEnum.html index 2c69a529..cfcf6a33 100644 --- a/docs/types/client_api.StakingRewardStateEnum.html +++ b/docs/types/client_api.StakingRewardStateEnum.html @@ -1 +1 @@ -StakingRewardStateEnum | @coinbase/coinbase-sdk
    StakingRewardStateEnum: typeof StakingRewardStateEnum[keyof typeof StakingRewardStateEnum]
    \ No newline at end of file +StakingRewardStateEnum | @coinbase/coinbase-sdk
    StakingRewardStateEnum: typeof StakingRewardStateEnum[keyof typeof StakingRewardStateEnum]
    \ No newline at end of file diff --git a/docs/types/client_api.TransactionContent.html b/docs/types/client_api.TransactionContent.html new file mode 100644 index 00000000..a221e4c9 --- /dev/null +++ b/docs/types/client_api.TransactionContent.html @@ -0,0 +1 @@ +TransactionContent | @coinbase/coinbase-sdk
    TransactionContent: EthereumTransaction

    Export

    \ No newline at end of file diff --git a/docs/types/client_api.TransactionStatusEnum.html b/docs/types/client_api.TransactionStatusEnum.html index 1b865754..11959aa0 100644 --- a/docs/types/client_api.TransactionStatusEnum.html +++ b/docs/types/client_api.TransactionStatusEnum.html @@ -1 +1 @@ -TransactionStatusEnum | @coinbase/coinbase-sdk
    TransactionStatusEnum: typeof TransactionStatusEnum[keyof typeof TransactionStatusEnum]
    \ No newline at end of file +TransactionStatusEnum | @coinbase/coinbase-sdk
    TransactionStatusEnum: typeof TransactionStatusEnum[keyof typeof TransactionStatusEnum]
    \ No newline at end of file diff --git a/docs/types/client_api.TransferStatusEnum.html b/docs/types/client_api.TransferStatusEnum.html deleted file mode 100644 index 17b1a4ec..00000000 --- a/docs/types/client_api.TransferStatusEnum.html +++ /dev/null @@ -1 +0,0 @@ -TransferStatusEnum | @coinbase/coinbase-sdk
    TransferStatusEnum: typeof TransferStatusEnum[keyof typeof TransferStatusEnum]
    \ No newline at end of file diff --git a/docs/types/client_api.UserOperationStatusEnum.html b/docs/types/client_api.UserOperationStatusEnum.html new file mode 100644 index 00000000..deb17817 --- /dev/null +++ b/docs/types/client_api.UserOperationStatusEnum.html @@ -0,0 +1 @@ +UserOperationStatusEnum | @coinbase/coinbase-sdk
    UserOperationStatusEnum: typeof UserOperationStatusEnum[keyof typeof UserOperationStatusEnum]
    \ No newline at end of file diff --git a/docs/types/client_api.ValidatorDetails.html b/docs/types/client_api.ValidatorDetails.html new file mode 100644 index 00000000..feaf107b --- /dev/null +++ b/docs/types/client_api.ValidatorDetails.html @@ -0,0 +1 @@ +ValidatorDetails | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/types/client_api.WalletServerSignerStatusEnum.html b/docs/types/client_api.WalletServerSignerStatusEnum.html index d3aed647..7a15a111 100644 --- a/docs/types/client_api.WalletServerSignerStatusEnum.html +++ b/docs/types/client_api.WalletServerSignerStatusEnum.html @@ -1 +1 @@ -WalletServerSignerStatusEnum | @coinbase/coinbase-sdk
    WalletServerSignerStatusEnum: typeof WalletServerSignerStatusEnum[keyof typeof WalletServerSignerStatusEnum]
    \ No newline at end of file +WalletServerSignerStatusEnum | @coinbase/coinbase-sdk
    WalletServerSignerStatusEnum: typeof WalletServerSignerStatusEnum[keyof typeof WalletServerSignerStatusEnum]
    \ No newline at end of file diff --git a/docs/types/client_api.WebhookEventTypeFilter.html b/docs/types/client_api.WebhookEventTypeFilter.html new file mode 100644 index 00000000..2da09605 --- /dev/null +++ b/docs/types/client_api.WebhookEventTypeFilter.html @@ -0,0 +1 @@ +WebhookEventTypeFilter | @coinbase/coinbase-sdk
    \ No newline at end of file diff --git a/docs/types/coinbase_types.AddressAPIClient.html b/docs/types/coinbase_types.AddressAPIClient.html index 1a523d87..37621b40 100644 --- a/docs/types/coinbase_types.AddressAPIClient.html +++ b/docs/types/coinbase_types.AddressAPIClient.html @@ -1,35 +1,49 @@ -AddressAPIClient | @coinbase/coinbase-sdk
    AddressAPIClient: {
        createAddress(walletId, createAddressRequest?, options?): AxiosPromise<Address>;
        getAddress(walletId, addressId, options?): AxiosPromise<Address>;
        getAddressBalance(walletId, addressId, assetId, options?): AxiosPromise<Balance>;
        listAddressBalances(walletId, addressId, page?, options?): AxiosPromise<AddressBalanceList>;
        listAddresses(walletId, limit?, page?, options?): AxiosPromise<AddressList>;
        requestFaucetFunds(walletId, addressId): AxiosPromise<FaucetTransaction>;
    }

    AddressAPI client type definition.

    +AddressAPIClient | @coinbase/coinbase-sdk
    AddressAPIClient: {
        createAddress(walletId, createAddressRequest?, options?): AxiosPromise<Address>;
        createPayloadSignature(walletId, addressId, createPayloadSignatureRequest?, options?): AxiosPromise<PayloadSignature>;
        getAddress(walletId, addressId, options?): AxiosPromise<Address>;
        getAddressBalance(walletId, addressId, assetId, options?): AxiosPromise<Balance>;
        getPayloadSignature(walletId, addressId, payloadSignatureId, options?): AxiosPromise<PayloadSignature>;
        listAddressBalances(walletId, addressId, page?, options?): AxiosPromise<AddressBalanceList>;
        listAddresses(walletId, limit?, page?, options?): AxiosPromise<AddressList>;
        listPayloadSignatures(walletId, addressId, limit?, page?, options?): AxiosPromise<PayloadSignatureList>;
    }

    AddressAPI client type definition.

    Type declaration

    • createAddress:function
      • Create a new address scoped to the wallet.

        Parameters

        • walletId: string

          The ID of the wallet to create the address in.

        • Optional createAddressRequest: CreateAddressRequest

          The address creation request.

        • Optional options: AxiosRequestConfig<any>

          Axios request options.

        Returns AxiosPromise<Address>

        Throws

        If the request fails.

        -
    • getAddress:function
    • createPayloadSignature:function
      • Create a new payload signature with an address.

        +

        Parameters

        • walletId: string

          The ID of the wallet the address belongs to.

          +
        • addressId: string

          The onchain address of the address to sign the payload with.

          +
        • Optional createPayloadSignatureRequest: CreatePayloadSignatureRequest

          The payload signature creation request.

          +
        • Optional options: AxiosRequestConfig<any>

          Axios request options.

          +

        Returns AxiosPromise<PayloadSignature>

        Throws

        If the request fails.

        +
    • getAddress:function
      • Get address by onchain address.

        Parameters

        • walletId: string

          The ID of the wallet the address belongs to.

        • addressId: string

          The onchain address of the address that is being fetched.

        • Optional options: AxiosRequestConfig<any>

          Axios request options.

        Returns AxiosPromise<Address>

        Throws

        If the request fails.

        -
    • getAddressBalance:function
    • getAddressBalance:function
      • Get address balance

        Parameters

        • walletId: string

          The ID of the wallet to fetch the balance for.

        • addressId: string

          The onchain address of the address that is being fetched.

        • assetId: string

          The symbol of the asset to fetch the balance for.

        • Optional options: AxiosRequestConfig<any>

          Axios request options.

          -

        Returns AxiosPromise<Balance>

        Throws

    • listAddressBalances:function
      • Lists address balances

        +

    Returns AxiosPromise<Balance>

    Throws

  • getPayloadSignature:function
    • Get payload signature by the specified payload signature ID.

      +

      Parameters

      • walletId: string

        The ID of the wallet the address belongs to.

        +
      • addressId: string

        The onchain address of the address to sign the payload with.

        +
      • payloadSignatureId: string

        The ID of the payload signature to fetch.

        +
      • Optional options: AxiosRequestConfig<any>

        Axios request options.

        +

      Returns AxiosPromise<PayloadSignature>

      Throws

      If the request fails.

      +
  • listAddressBalances:function
    • Lists address balances

      Parameters

      • walletId: string

        The ID of the wallet to fetch the balances for.

      • addressId: string

        The onchain address of the address that is being fetched.

      • Optional page: string

        A cursor for pagination across multiple pages of results. Do not include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

      • Optional options: AxiosRequestConfig<any>

        Override http request option.

        -

      Returns AxiosPromise<AddressBalanceList>

      Throws

  • listAddresses:function
    • Lists addresses.

      +
  • Returns AxiosPromise<AddressBalanceList>

    Throws

  • listAddresses:function
    • Lists addresses.

      Parameters

      • walletId: string

        The ID of the wallet the addresses belong to.

      • Optional limit: number

        The maximum number of addresses to return.

      • Optional page: string

        A cursor for pagination across multiple pages of results. Do not include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

      • Optional options: AxiosRequestConfig<any>

        Override http request option.

      Returns AxiosPromise<AddressList>

      Throws

      If the request fails.

      -
  • requestFaucetFunds:function
    • Requests faucet funds for the address.

      -

      Parameters

      • walletId: string

        The wallet ID.

        -
      • addressId: string

        The address ID.

        -

      Returns AxiosPromise<FaucetTransaction>

      The transaction hash.

      -

      Throws

      If the request fails.

      -
  • \ No newline at end of file +
  • listPayloadSignatures:function
    • List payload signatures for the specified address.

      +

      Parameters

      • walletId: string

        The ID of the wallet the address belongs to.

        +
      • addressId: string

        The onchain address of the address to sign the payload with.

        +
      • Optional limit: number

        A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

        +
      • Optional page: string

        A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

        +
      • Optional options: AxiosRequestConfig<any>

        Axios request options.

        +

      Returns AxiosPromise<PayloadSignatureList>

      Throws

      If the request fails.

      +
  • \ No newline at end of file diff --git a/docs/types/coinbase_types.Amount.html b/docs/types/coinbase_types.Amount.html index f501d889..6958b531 100644 --- a/docs/types/coinbase_types.Amount.html +++ b/docs/types/coinbase_types.Amount.html @@ -1,2 +1,2 @@ Amount | @coinbase/coinbase-sdk
    Amount: number | bigint | Decimal

    Amount type definition.

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/types/coinbase_types.ApiClients.html b/docs/types/coinbase_types.ApiClients.html index b13926f2..0f5fa840 100644 --- a/docs/types/coinbase_types.ApiClients.html +++ b/docs/types/coinbase_types.ApiClients.html @@ -1,3 +1,3 @@ -ApiClients | @coinbase/coinbase-sdk
    ApiClients: {
        address?: AddressAPIClient;
        asset?: AssetAPIClient;
        externalAddress?: ExternalAddressAPIClient;
        serverSigner?: ServerSignerAPIClient;
        stake?: StakeAPIClient;
        trade?: TradeApiClients;
        transfer?: TransferAPIClient;
        user?: UserAPIClient;
        wallet?: WalletAPIClient;
    }

    API clients type definition for the Coinbase SDK. +ApiClients | @coinbase/coinbase-sdk

    ApiClients: {
        address?: AddressAPIClient;
        addressReputation?: AddressReputationApiClient;
        asset?: AssetAPIClient;
        balanceHistory?: BalanceHistoryApiClient;
        contractEvent?: ExternalSmartContractAPIClient;
        contractInvocation?: ContractInvocationAPIClient;
        externalAddress?: ExternalAddressAPIClient;
        fund?: FundOperationApiClient;
        serverSigner?: ServerSignerAPIClient;
        smartContract?: SmartContractAPIClient;
        smartWallet?: SmartWalletAPIClient;
        stake?: StakeAPIClient;
        trade?: TradeApiClients;
        transactionHistory?: TransactionHistoryApiClient;
        transfer?: TransferAPIClient;
        wallet?: WalletAPIClient;
        walletStake?: WalletStakeAPIClient;
        webhook?: WebhookApiClient;
    }

    API clients type definition for the Coinbase SDK. Represents the set of API clients available in the SDK.

    -

    Type declaration

    \ No newline at end of file +

    Type declaration

    \ No newline at end of file diff --git a/docs/types/coinbase_types.AssetAPIClient.html b/docs/types/coinbase_types.AssetAPIClient.html index 571c5f49..4257b5f5 100644 --- a/docs/types/coinbase_types.AssetAPIClient.html +++ b/docs/types/coinbase_types.AssetAPIClient.html @@ -4,4 +4,4 @@
  • Optional options: RawAxiosRequestConfig

    Override http request option.

  • Returns AxiosPromise<Asset>

    Summary

    Get the asset for the specified asset ID.

    Throws

    If the required parameter is not provided.

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/types/coinbase_types.CoinbaseConfigureFromJsonOptions.html b/docs/types/coinbase_types.CoinbaseConfigureFromJsonOptions.html index 4480e79a..9d1831bb 100644 --- a/docs/types/coinbase_types.CoinbaseConfigureFromJsonOptions.html +++ b/docs/types/coinbase_types.CoinbaseConfigureFromJsonOptions.html @@ -1,6 +1,8 @@ -CoinbaseConfigureFromJsonOptions | @coinbase/coinbase-sdk
    CoinbaseConfigureFromJsonOptions: {
        basePath?: string;
        debugging?: boolean;
        filePath?: string;
        useServerSigner?: boolean;
    }

    CoinbaseConfigureFromJsonOptions type definition.

    +CoinbaseConfigureFromJsonOptions | @coinbase/coinbase-sdk
    CoinbaseConfigureFromJsonOptions: {
        basePath?: string;
        debugging?: boolean;
        filePath?: string;
        source?: string;
        sourceVersion?: string;
        useServerSigner?: boolean;
    }

    CoinbaseConfigureFromJsonOptions type definition.

    Type declaration

    • Optional basePath?: string

      The base path for the API.

    • Optional debugging?: boolean

      If true, logs API requests and responses to the console.

    • Optional filePath?: string

      The path to the JSON file containing the API key and private key.

      +
    • Optional source?: string

      The source for the API request, used for analytics. Defaults to sdk.

      +
    • Optional sourceVersion?: string

      The version of the source for the API request, used for analytics.

    • Optional useServerSigner?: boolean

      Whether to use a Server-Signer or not.

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/types/coinbase_types.CoinbaseExternalAddressStakeOptions.html b/docs/types/coinbase_types.CoinbaseExternalAddressStakeOptions.html deleted file mode 100644 index 83551f11..00000000 --- a/docs/types/coinbase_types.CoinbaseExternalAddressStakeOptions.html +++ /dev/null @@ -1,5 +0,0 @@ -CoinbaseExternalAddressStakeOptions | @coinbase/coinbase-sdk
    CoinbaseExternalAddressStakeOptions: {
        amount?: string;
        mode?: StakeOptionsMode;
    }

    CoinbaseExternalAddressStakeOptions type definition.

    -

    Type declaration

    • Optional amount?: string

      The amount to stake, unstake, or claim_stake for in a staking operation.

      -
    • Optional mode?: StakeOptionsMode

      The mode type that you're trying to stake with. -e.g.

      -
    \ No newline at end of file diff --git a/docs/types/coinbase_types.CoinbaseOptions.html b/docs/types/coinbase_types.CoinbaseOptions.html index 36767160..a7fa69d2 100644 --- a/docs/types/coinbase_types.CoinbaseOptions.html +++ b/docs/types/coinbase_types.CoinbaseOptions.html @@ -1,7 +1,10 @@ -CoinbaseOptions | @coinbase/coinbase-sdk
    CoinbaseOptions: {
        apiKeyName: string;
        basePath?: string;
        debugging?: boolean;
        privateKey: string;
        useServerSigner?: boolean;
    }

    CoinbaseOptions type definition.

    +CoinbaseOptions | @coinbase/coinbase-sdk
    CoinbaseOptions: {
        apiKeyName: string;
        basePath?: string;
        debugging?: boolean;
        maxNetworkRetries?: number;
        privateKey: string;
        source?: string;
        sourceVersion?: string;
        useServerSigner?: boolean;
    }

    CoinbaseOptions type definition.

    Type declaration

    • apiKeyName: string

      The API key name.

    • Optional basePath?: string

      The base path for the API.

    • Optional debugging?: boolean

      If true, logs API requests and responses to the console.

      +
    • Optional maxNetworkRetries?: number

      The maximum number of network retries for the API GET requests.

    • privateKey: string

      The private key associated with the API key.

      +
    • Optional source?: string

      The source for the API request, used for analytics. Defaults to sdk.

      +
    • Optional sourceVersion?: string

      The version of the source for the API request, used for analytics.

    • Optional useServerSigner?: boolean

      Whether to use a Server-Signer or not.

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/types/coinbase_types.ContractInvocationAPIClient.html b/docs/types/coinbase_types.ContractInvocationAPIClient.html new file mode 100644 index 00000000..2d973022 --- /dev/null +++ b/docs/types/coinbase_types.ContractInvocationAPIClient.html @@ -0,0 +1,40 @@ +ContractInvocationAPIClient | @coinbase/coinbase-sdk
    ContractInvocationAPIClient: {
        broadcastContractInvocation(walletId, addressId, contractInvocationId, broadcastContractInvocationRequest, options?): AxiosPromise<ContractInvocation>;
        createContractInvocation(walletId, addressId, createContractInvocationRequest, options?): AxiosPromise<ContractInvocation>;
        getContractInvocation(walletId, addressId, contractInvocationId, options?): AxiosPromise<ContractInvocation>;
        listContractInvocations(walletId, addressId, limit?, page?, options?): AxiosPromise<ContractInvocationList>;
    }

    ContractInvocationAPI client type definition.

    +

    Type declaration

    • broadcastContractInvocation:function
      • Broadcasts a contract invocation.

        +

        Parameters

        • walletId: string

          The ID of the wallet the address belongs to.

          +
        • addressId: string

          The ID of the address the contract invocation belongs to.

          +
        • contractInvocationId: string

          The ID of the contract invocation to broadcast.

          +
        • broadcastContractInvocationRequest: BroadcastContractInvocationRequest

          The request body.

          +
        • Optional options: AxiosRequestConfig<any>

          Axios request options.

          +

        Returns AxiosPromise<ContractInvocation>

          +
        • A promise resolving to the ContractInvocation model.
        • +
        +

        Throws

        If the request fails.

        +
    • createContractInvocation:function
      • Creates a Contract Invocation.

        +

        Parameters

        • walletId: string

          The ID of the wallet the address belongs to.

          +
        • addressId: string

          The ID of the address the contract invocation belongs to.

          +
        • createContractInvocationRequest: CreateContractInvocationRequest

          The request body.

          +
        • Optional options: AxiosRequestConfig<any>

          Axios request options.

          +

        Returns AxiosPromise<ContractInvocation>

          +
        • A promise resolving to the ContractInvocation model.
        • +
        +

        Throws

        If the request fails.

        +
    • getContractInvocation:function
      • Retrieves a Contract Invocation.

        +

        Parameters

        • walletId: string

          The ID of the wallet the address belongs to.

          +
        • addressId: string

          The ID of the address the contract invocation belongs to.

          +
        • contractInvocationId: string

          The ID of the contract invocation to retrieve.

          +
        • Optional options: AxiosRequestConfig<any>

          Axios request options.

          +

        Returns AxiosPromise<ContractInvocation>

          +
        • A promise resolving to the ContractInvocation model.
        • +
        +

        Throws

        If the request fails.

        +
    • listContractInvocations:function
      • Lists Contract Invocations.

        +

        Parameters

        • walletId: string

          The ID of the wallet the address belongs to.

          +
        • addressId: string

          The ID of the address the contract invocations belong to.

          +
        • Optional limit: number

          The maximum number of contract invocations to return.

          +
        • Optional page: string

          The cursor for pagination across multiple pages of contract invocations.

          +
        • Optional options: AxiosRequestConfig<any>

          Axios request options.

          +

        Returns AxiosPromise<ContractInvocationList>

          +
        • A promise resolving to the ContractInvocation list.
        • +
        +

        Throws

        If the request fails.

        +
    \ No newline at end of file diff --git a/docs/types/coinbase_types.CreateContractInvocationOptions.html b/docs/types/coinbase_types.CreateContractInvocationOptions.html new file mode 100644 index 00000000..84152f5a --- /dev/null +++ b/docs/types/coinbase_types.CreateContractInvocationOptions.html @@ -0,0 +1,2 @@ +CreateContractInvocationOptions | @coinbase/coinbase-sdk
    CreateContractInvocationOptions: {
        abi?: object;
        amount?: Amount;
        args: object;
        assetId?: string;
        contractAddress: string;
        method: string;
    }

    Options for creating a Contract Invocation.

    +

    Type declaration

    • Optional abi?: object
    • Optional amount?: Amount
    • args: object
    • Optional assetId?: string
    • contractAddress: string
    • method: string
    \ No newline at end of file diff --git a/docs/types/coinbase_types.CreateCustomContractOptions.html b/docs/types/coinbase_types.CreateCustomContractOptions.html new file mode 100644 index 00000000..211cbad0 --- /dev/null +++ b/docs/types/coinbase_types.CreateCustomContractOptions.html @@ -0,0 +1,6 @@ +CreateCustomContractOptions | @coinbase/coinbase-sdk
    CreateCustomContractOptions: {
        constructorArgs: Record<string, any>;
        contractName: string;
        solidityInputJson: string;
        solidityVersion: string;
    }

    Options for creating an arbitrary contract.

    +

    Type declaration

    \ No newline at end of file diff --git a/docs/types/coinbase_types.CreateERC1155Options.html b/docs/types/coinbase_types.CreateERC1155Options.html new file mode 100644 index 00000000..5b51bb13 --- /dev/null +++ b/docs/types/coinbase_types.CreateERC1155Options.html @@ -0,0 +1,2 @@ +CreateERC1155Options | @coinbase/coinbase-sdk
    CreateERC1155Options: {
        uri: string;
    }

    Options for creating a ERC1155.

    +

    Type declaration

    • uri: string
    \ No newline at end of file diff --git a/docs/types/coinbase_types.CreateERC20Options.html b/docs/types/coinbase_types.CreateERC20Options.html new file mode 100644 index 00000000..083c2ace --- /dev/null +++ b/docs/types/coinbase_types.CreateERC20Options.html @@ -0,0 +1,2 @@ +CreateERC20Options | @coinbase/coinbase-sdk
    CreateERC20Options: {
        name: string;
        symbol: string;
        totalSupply: Amount;
    }

    Options for creating a ERC20.

    +

    Type declaration

    • name: string
    • symbol: string
    • totalSupply: Amount
    \ No newline at end of file diff --git a/docs/types/coinbase_types.CreateERC721Options.html b/docs/types/coinbase_types.CreateERC721Options.html new file mode 100644 index 00000000..12629ed3 --- /dev/null +++ b/docs/types/coinbase_types.CreateERC721Options.html @@ -0,0 +1,2 @@ +CreateERC721Options | @coinbase/coinbase-sdk
    CreateERC721Options: {
        baseURI: string;
        name: string;
        symbol: string;
    }

    Options for creating a ERC721.

    +

    Type declaration

    • baseURI: string
    • name: string
    • symbol: string
    \ No newline at end of file diff --git a/docs/types/coinbase_types.CreateFundOptions.html b/docs/types/coinbase_types.CreateFundOptions.html new file mode 100644 index 00000000..4d5fae37 --- /dev/null +++ b/docs/types/coinbase_types.CreateFundOptions.html @@ -0,0 +1,2 @@ +CreateFundOptions | @coinbase/coinbase-sdk
    CreateFundOptions: {
        amount: Amount;
        assetId: string;
    }

    Options for creating a fund operation.

    +

    Type declaration

    \ No newline at end of file diff --git a/docs/types/coinbase_types.CreateQuoteOptions.html b/docs/types/coinbase_types.CreateQuoteOptions.html new file mode 100644 index 00000000..26554024 --- /dev/null +++ b/docs/types/coinbase_types.CreateQuoteOptions.html @@ -0,0 +1,2 @@ +CreateQuoteOptions | @coinbase/coinbase-sdk
    CreateQuoteOptions: CreateFundOptions

    Options for creating a quote for a fund operation.

    +
    \ No newline at end of file diff --git a/docs/types/coinbase_types.CreateTradeOptions.html b/docs/types/coinbase_types.CreateTradeOptions.html new file mode 100644 index 00000000..5367f583 --- /dev/null +++ b/docs/types/coinbase_types.CreateTradeOptions.html @@ -0,0 +1,2 @@ +CreateTradeOptions | @coinbase/coinbase-sdk
    CreateTradeOptions: {
        amount: Amount;
        fromAssetId: string;
        toAssetId: string;
    }

    Options for creating a Trade.

    +

    Type declaration

    • amount: Amount
    • fromAssetId: string
    • toAssetId: string
    \ No newline at end of file diff --git a/docs/types/coinbase_types.CreateTransferOptions.html b/docs/types/coinbase_types.CreateTransferOptions.html index 5501d018..92808726 100644 --- a/docs/types/coinbase_types.CreateTransferOptions.html +++ b/docs/types/coinbase_types.CreateTransferOptions.html @@ -1,2 +1,2 @@ -CreateTransferOptions | @coinbase/coinbase-sdk
    CreateTransferOptions: {
        amount: Amount;
        assetId: string;
        destination: Destination;
        intervalSeconds?: number;
        timeoutSeconds?: number;
    }

    Options for creating a Transfer.

    -

    Type declaration

    • amount: Amount
    • assetId: string
    • destination: Destination
    • Optional intervalSeconds?: number
    • Optional timeoutSeconds?: number
    \ No newline at end of file +CreateTransferOptions | @coinbase/coinbase-sdk
    CreateTransferOptions: {
        amount: Amount;
        assetId: string;
        destination: Destination;
        gasless?: boolean;
        skipBatching?: boolean;
    }

    Options for creating a Transfer.

    +

    Type declaration

    • amount: Amount
    • assetId: string
    • destination: Destination
    • Optional gasless?: boolean
    • Optional skipBatching?: boolean
    \ No newline at end of file diff --git a/docs/types/coinbase_types.CreateWebhookOptions.html b/docs/types/coinbase_types.CreateWebhookOptions.html new file mode 100644 index 00000000..ce3b05a1 --- /dev/null +++ b/docs/types/coinbase_types.CreateWebhookOptions.html @@ -0,0 +1,2 @@ +CreateWebhookOptions | @coinbase/coinbase-sdk
    CreateWebhookOptions: {
        eventFilters?: WebhookEventFilter[];
        eventType: WebhookEventType;
        eventTypeFilter?: WebhookEventTypeFilter;
        networkId: string;
        notificationUri: string;
        signatureHeader?: string;
    }

    Options for creating a Webhook.

    +

    Type declaration

    \ No newline at end of file diff --git a/docs/types/coinbase_types.Destination.html b/docs/types/coinbase_types.Destination.html index ac777f48..25b3fafa 100644 --- a/docs/types/coinbase_types.Destination.html +++ b/docs/types/coinbase_types.Destination.html @@ -1,2 +1,2 @@ Destination | @coinbase/coinbase-sdk
    Destination: string | Address | Wallet

    Destination type definition.

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/types/coinbase_types.ExternalAddressAPIClient.html b/docs/types/coinbase_types.ExternalAddressAPIClient.html index a0c986bb..21dcebd3 100644 --- a/docs/types/coinbase_types.ExternalAddressAPIClient.html +++ b/docs/types/coinbase_types.ExternalAddressAPIClient.html @@ -1,19 +1,34 @@ -ExternalAddressAPIClient | @coinbase/coinbase-sdk
    ExternalAddressAPIClient: {
        getExternalAddressBalance(networkId, addressId, assetId, options?): AxiosPromise<Balance>;
        listExternalAddressBalances(networkId, addressId, page?, options?): AxiosPromise<AddressBalanceList>;
        requestExternalFaucetFunds(networkId, addressId, options?): AxiosPromise<FaucetTransaction>;
    }

    ExternalAddressAPIClient client type definition.

    -

    Type declaration

    • getExternalAddressBalance:function
      • Get the balance of an asset in an external address

        +ExternalAddressAPIClient | @coinbase/coinbase-sdk
        ExternalAddressAPIClient: {
            broadcastExternalTransaction(networkId, addressId, broadcastExternalTransactionRequest, options?): AxiosPromise<BroadcastExternalTransaction200Response>;
            getExternalAddressBalance(networkId, addressId, assetId, options?): AxiosPromise<Balance>;
            getFaucetTransaction(networkId, addressId, transactionHash, options?): AxiosPromise<FaucetTransaction>;
            listExternalAddressBalances(networkId, addressId, page?, options?): AxiosPromise<AddressBalanceList>;
            requestExternalFaucetFunds(networkId, addressId, assetId?, skipWait?, options?): AxiosPromise<FaucetTransaction>;
        }

        ExternalAddressAPIClient client type definition.

        +

        Type declaration

        • broadcastExternalTransaction:function
        • getExternalAddressBalance:function
          • Get the balance of an asset in an external address

            Parameters

            • networkId: string

              The ID of the blockchain network

            • addressId: string

              The ID of the address to fetch the balance for

            • assetId: string

              The ID of the asset to fetch the balance for

            • Optional options: RawAxiosRequestConfig

              Override http request option.

            Returns AxiosPromise<Balance>

            Throws

            If the request fails.

            -
        • listExternalAddressBalances:function
        • getFaucetTransaction:function
          • Get the faucet transaction for an external address.

            +

            Parameters

            • networkId: string

              The ID of the blockchain network

              +
            • addressId: string

              The onchain address of the address that is being fetched.

              +
            • transactionHash: string

              The transaction hash of the faucet transaction.

              +
            • Optional options: RawAxiosRequestConfig

              Override http request option.

              +

            Returns AxiosPromise<FaucetTransaction>

            The faucet transaction.

            +

            Throws

            If the request fails.

            +
        • listExternalAddressBalances:function
          • List all of the balances of an external address

            Parameters

            • networkId: string

              The ID of the blockchain network

            • addressId: string

              The ID of the address to fetch the balance for

              -
            • Optional page: string

              A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

              +
            • Optional page: string

              A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

            • Optional options: RawAxiosRequestConfig

              Override http request option.

            Returns AxiosPromise<AddressBalanceList>

            Throws

            If the request fails.

            -
        • requestExternalFaucetFunds:function
          • Request faucet funds to be sent to external address.

            -

            Parameters

          • requestExternalFaucetFunds:function
            • Request faucet funds to be sent to external address.

              +

              Parameters

              • networkId: string

                The ID of the blockchain network

              • addressId: string

                The onchain address of the address that is being fetched.

                +
              • Optional assetId: string

                The Optional ID of the asset to request funds for. Defaults to native asset.

                +
              • Optional skipWait: boolean

                The Optional flag to skip waiting for the transaction to be mined. Defaults to false.

              • Optional options: RawAxiosRequestConfig

                Override http request option.

              Returns AxiosPromise<FaucetTransaction>

              Throws

              If the request fails.

              -
        \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/types/coinbase_types.ExternalSmartContractAPIClient.html b/docs/types/coinbase_types.ExternalSmartContractAPIClient.html new file mode 100644 index 00000000..1d634e1c --- /dev/null +++ b/docs/types/coinbase_types.ExternalSmartContractAPIClient.html @@ -0,0 +1,12 @@ +ExternalSmartContractAPIClient | @coinbase/coinbase-sdk
    ExternalSmartContractAPIClient: {
        listContractEvents(networkId, protocolName, contractAddress, contractName, eventName, fromBlockHeight, toBlockHeight, nextPage?): AxiosPromise<ContractEventList>;
    }

    ExternalSmartContractAPIClient client type definition.

    +

    Type declaration

    • listContractEvents:function
      • List events for a specific contract

        +

        Parameters

        • networkId: string

          Unique identifier for the blockchain network

          +
        • protocolName: string

          Case-sensitive name of the blockchain protocol

          +
        • contractAddress: string

          EVM address of the smart contract (42 characters, including '0x', in lowercase)

          +
        • contractName: string

          Case-sensitive name of the specific contract within the project

          +
        • eventName: string

          Case-sensitive name of the event to filter for in the contract's logs

          +
        • fromBlockHeight: number

          Lower bound of the block range to query (inclusive)

          +
        • toBlockHeight: number

          Upper bound of the block range to query (inclusive)

          +
        • Optional nextPage: string

          Pagination token for retrieving the next set of results

          +

        Returns AxiosPromise<ContractEventList>

        Throws

        If the request fails.

        +
    \ No newline at end of file diff --git a/docs/types/coinbase_types.ListHistoricalBalancesOptions.html b/docs/types/coinbase_types.ListHistoricalBalancesOptions.html new file mode 100644 index 00000000..e8f6ddf7 --- /dev/null +++ b/docs/types/coinbase_types.ListHistoricalBalancesOptions.html @@ -0,0 +1,2 @@ +ListHistoricalBalancesOptions | @coinbase/coinbase-sdk
    ListHistoricalBalancesOptions: {
        assetId: string;
        limit?: number;
        page?: string;
    }

    Options for listing historical balances of an address.

    +

    Type declaration

    • assetId: string
    • Optional limit?: number
    • Optional page?: string
    \ No newline at end of file diff --git a/docs/types/coinbase_types.ListHistoricalBalancesResult.html b/docs/types/coinbase_types.ListHistoricalBalancesResult.html new file mode 100644 index 00000000..381da76c --- /dev/null +++ b/docs/types/coinbase_types.ListHistoricalBalancesResult.html @@ -0,0 +1,2 @@ +ListHistoricalBalancesResult | @coinbase/coinbase-sdk
    ListHistoricalBalancesResult: {
        historicalBalances: HistoricalBalance[];
        nextPageToken: string;
    }

    Result of ListHistoricalBalances.

    +

    Type declaration

    \ No newline at end of file diff --git a/docs/types/coinbase_types.ListTransactionsOptions.html b/docs/types/coinbase_types.ListTransactionsOptions.html new file mode 100644 index 00000000..ef1d9725 --- /dev/null +++ b/docs/types/coinbase_types.ListTransactionsOptions.html @@ -0,0 +1,2 @@ +ListTransactionsOptions | @coinbase/coinbase-sdk
    ListTransactionsOptions: {
        limit?: number;
        page?: string;
    }

    Options for listing transactions of an address.

    +

    Type declaration

    • Optional limit?: number
    • Optional page?: string
    \ No newline at end of file diff --git a/docs/types/coinbase_types.ListTransactionsResult.html b/docs/types/coinbase_types.ListTransactionsResult.html new file mode 100644 index 00000000..2a84432f --- /dev/null +++ b/docs/types/coinbase_types.ListTransactionsResult.html @@ -0,0 +1,2 @@ +ListTransactionsResult | @coinbase/coinbase-sdk
    ListTransactionsResult: {
        nextPageToken: string;
        transactions: Transaction[];
    }

    Result of ListTransactions.

    +

    Type declaration

    \ No newline at end of file diff --git a/docs/types/coinbase_types.MultiTokenContractOptions.html b/docs/types/coinbase_types.MultiTokenContractOptions.html new file mode 100644 index 00000000..2f0b3b25 --- /dev/null +++ b/docs/types/coinbase_types.MultiTokenContractOptions.html @@ -0,0 +1,2 @@ +MultiTokenContractOptions | @coinbase/coinbase-sdk
    MultiTokenContractOptions: {
        uri: string;
    }

    Multi-Token Contract Options

    +

    Type declaration

    • uri: string
    \ No newline at end of file diff --git a/docs/types/coinbase_types.NFTContractOptions.html b/docs/types/coinbase_types.NFTContractOptions.html new file mode 100644 index 00000000..32539b10 --- /dev/null +++ b/docs/types/coinbase_types.NFTContractOptions.html @@ -0,0 +1,2 @@ +NFTContractOptions | @coinbase/coinbase-sdk
    NFTContractOptions: {
        baseURI: string;
        name: string;
        symbol: string;
    }

    NFT Contract Options

    +

    Type declaration

    • baseURI: string
    • name: string
    • symbol: string
    \ No newline at end of file diff --git a/docs/types/coinbase_types.PaginationOptions.html b/docs/types/coinbase_types.PaginationOptions.html new file mode 100644 index 00000000..1109aba1 --- /dev/null +++ b/docs/types/coinbase_types.PaginationOptions.html @@ -0,0 +1,2 @@ +PaginationOptions | @coinbase/coinbase-sdk
    PaginationOptions: {
        limit?: number;
        page?: string;
    }

    Options for pagination on list methods.

    +

    Type declaration

    • Optional limit?: number
    • Optional page?: string
    \ No newline at end of file diff --git a/docs/types/coinbase_types.RegisterContractOptions.html b/docs/types/coinbase_types.RegisterContractOptions.html new file mode 100644 index 00000000..13710b76 --- /dev/null +++ b/docs/types/coinbase_types.RegisterContractOptions.html @@ -0,0 +1,2 @@ +RegisterContractOptions | @coinbase/coinbase-sdk
    RegisterContractOptions: {
        abi: object;
        contractAddress: string;
        contractName?: string;
        networkId: string;
    }

    Options for registering a smart contract.

    +

    Type declaration

    • abi: object
    • contractAddress: string
    • Optional contractName?: string
    • networkId: string
    \ No newline at end of file diff --git a/docs/types/coinbase_types.SeedData.html b/docs/types/coinbase_types.SeedData.html index 31927a79..8aea9c72 100644 --- a/docs/types/coinbase_types.SeedData.html +++ b/docs/types/coinbase_types.SeedData.html @@ -1,2 +1,2 @@ -SeedData | @coinbase/coinbase-sdk
    SeedData: {
        authTag: string;
        encrypted: boolean;
        iv: string;
        seed: string;
    }

    The Seed Data type definition.

    -

    Type declaration

    • authTag: string
    • encrypted: boolean
    • iv: string
    • seed: string
    \ No newline at end of file +SeedData | @coinbase/coinbase-sdk
    SeedData: {
        authTag: string;
        encrypted: boolean;
        iv: string;
        networkId: string;
        seed: string;
    }

    The Seed Data type definition.

    +

    Type declaration

    • authTag: string
    • encrypted: boolean
    • iv: string
    • networkId: string
    • seed: string
    \ No newline at end of file diff --git a/docs/types/coinbase_types.ServerSignerAPIClient.html b/docs/types/coinbase_types.ServerSignerAPIClient.html index 77afa7a3..bd812c71 100644 --- a/docs/types/coinbase_types.ServerSignerAPIClient.html +++ b/docs/types/coinbase_types.ServerSignerAPIClient.html @@ -7,4 +7,4 @@
  • A promise resolving to the Server-Signer list.
  • Throws

    If the request fails.

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/types/coinbase_types.SmartContractOptions.html b/docs/types/coinbase_types.SmartContractOptions.html new file mode 100644 index 00000000..f271cb2c --- /dev/null +++ b/docs/types/coinbase_types.SmartContractOptions.html @@ -0,0 +1,2 @@ +SmartContractOptions | @coinbase/coinbase-sdk

    Smart Contract Options

    +
    \ No newline at end of file diff --git a/docs/types/coinbase_types.SmartWalletAPIClient.html b/docs/types/coinbase_types.SmartWalletAPIClient.html new file mode 100644 index 00000000..fd092306 --- /dev/null +++ b/docs/types/coinbase_types.SmartWalletAPIClient.html @@ -0,0 +1,5 @@ +SmartWalletAPIClient | @coinbase/coinbase-sdk
    SmartWalletAPIClient: {
        broadcastUserOperation: ((smartWalletAddress, userOperationId, broadcastUserOperationRequest, options?) => AxiosPromise<UserOperation>);
        createSmartWallet: ((createSmartWalletRequest?, options?) => AxiosPromise<SmartWallet>);
        createUserOperation: ((smartWalletAddress, networkId, createUserOperationRequest, options?) => AxiosPromise<UserOperation>);
        getSmartWallet: ((smartWalletAddress, options?) => AxiosPromise<SmartWallet>);
        getUserOperation: ((smartWalletAddress, userOpHash, options?) => AxiosPromise<UserOperation>);
    }

    SmartWalletAPI client type definition.

    +

    Type declaration

    • broadcastUserOperation: ((smartWalletAddress, userOperationId, broadcastUserOperationRequest, options?) => AxiosPromise<UserOperation>)
        • (smartWalletAddress, userOperationId, broadcastUserOperationRequest, options?): AxiosPromise<UserOperation>
        • Parameters

          • smartWalletAddress: string
          • userOperationId: string
          • broadcastUserOperationRequest: BroadcastUserOperationRequest
          • Optional options: RawAxiosRequestConfig

          Returns AxiosPromise<UserOperation>

    • createSmartWallet: ((createSmartWalletRequest?, options?) => AxiosPromise<SmartWallet>)

      Create a new smart wallet scoped to the user.

      +

      Throws

      If the request fails.

      +
    • createUserOperation: ((smartWalletAddress, networkId, createUserOperationRequest, options?) => AxiosPromise<UserOperation>)
        • (smartWalletAddress, networkId, createUserOperationRequest, options?): AxiosPromise<UserOperation>
        • Parameters

          • smartWalletAddress: string
          • networkId: string
          • createUserOperationRequest: CreateUserOperationRequest
          • Optional options: RawAxiosRequestConfig

          Returns AxiosPromise<UserOperation>

    • getSmartWallet: ((smartWalletAddress, options?) => AxiosPromise<SmartWallet>)
        • (smartWalletAddress, options?): AxiosPromise<SmartWallet>
        • Parameters

          • smartWalletAddress: string
          • Optional options: RawAxiosRequestConfig

          Returns AxiosPromise<SmartWallet>

    • getUserOperation: ((smartWalletAddress, userOpHash, options?) => AxiosPromise<UserOperation>)
        • (smartWalletAddress, userOpHash, options?): AxiosPromise<UserOperation>
        • Parameters

          • smartWalletAddress: string
          • userOpHash: string
          • Optional options: RawAxiosRequestConfig

          Returns AxiosPromise<UserOperation>

    \ No newline at end of file diff --git a/docs/types/coinbase_types.StakeAPIClient.html b/docs/types/coinbase_types.StakeAPIClient.html index a250c01a..029962a8 100644 --- a/docs/types/coinbase_types.StakeAPIClient.html +++ b/docs/types/coinbase_types.StakeAPIClient.html @@ -1,14 +1,41 @@ -StakeAPIClient | @coinbase/coinbase-sdk
    StakeAPIClient: {
        buildStakingOperation(buildStakingOperationRequest, options?): AxiosPromise<StakingOperation>;
        fetchStakingRewards(fetchStakingRewardsRequest, limit?, page?, options?): AxiosPromise<FetchStakingRewards200Response>;
        getStakingContext(getStakingContextRequest, options?): AxiosPromise<StakingContext>;
    }

    Type declaration

    • buildStakingOperation:function
      • Build a new staking operation.

        +StakeAPIClient | @coinbase/coinbase-sdk
        StakeAPIClient: {
            buildStakingOperation(buildStakingOperationRequest, options?): AxiosPromise<StakingOperation>;
            fetchHistoricalStakingBalances(networkId, assetId, addressId, startTime, endTime, limit?, page?, options?): AxiosPromise<FetchHistoricalStakingBalances200Response>;
            fetchStakingRewards(fetchStakingRewardsRequest, limit?, page?, options?): AxiosPromise<FetchStakingRewards200Response>;
            getExternalStakingOperation(networkId, addressId, stakingOperationID, options?): AxiosPromise<StakingOperation>;
            getStakingContext(getStakingContextRequest, options?): AxiosPromise<StakingContext>;
            getValidator(networkId, assetId, id, options?): AxiosPromise<Validator>;
            listValidators(networkId, assetId, status?, limit?, page?, options?): AxiosPromise<ValidatorList>;
        }

        Type declaration

        • buildStakingOperation:function
        • fetchStakingRewards:function
        • fetchHistoricalStakingBalances:function
          • Get the staking balances for an address.

            +

            Parameters

            • networkId: string

              The ID of the blockchain network.

              +
            • assetId: string

              The ID of the asset to fetch the staking balances for.

              +
            • addressId: string

              The onchain address to fetch the staking balances for.

              +
            • startTime: string

              The start time of the staking balances.

              +
            • endTime: string

              The end time of the staking balances.

              +
            • Optional limit: number

              The amount of records to return in a single call.

              +
            • Optional page: string

              The batch of records for a given section in the response.

              +
            • Optional options: AxiosRequestConfig<any>

              Axios request options.

              +

            Returns AxiosPromise<FetchHistoricalStakingBalances200Response>

        • fetchStakingRewards:function
          • Get the staking rewards for an address.

            Parameters

            • fetchStakingRewardsRequest: FetchStakingRewardsRequest

              The request to get the staking rewards for an address.

            • Optional limit: number

              The amount of records to return in a single call.

            • Optional page: string

              The batch of records for a given section in the response.

            • Optional options: AxiosRequestConfig<any>

              Axios request options.

              -

            Returns AxiosPromise<FetchStakingRewards200Response>

        • getStakingContext:function
          • Get staking context for an address.

            +

        Returns AxiosPromise<FetchStakingRewards200Response>

    • getExternalStakingOperation:function
      • Get a staking operation.

        +

        Parameters

        • networkId: string

          The ID of the blockchain network

          +
        • addressId: string

          The ID of the address the staking operation corresponds to.

          +
        • stakingOperationID: string

          The ID of the staking operation to fetch.

          +
        • Optional options: AxiosRequestConfig<any>

          Axios request options.

          +

        Returns AxiosPromise<StakingOperation>

        Throws

        If the request fails.

        +
    • getStakingContext:function
      • Get staking context for an address.

        Parameters

        • getStakingContextRequest: GetStakingContextRequest

          The request to get the staking context for an address.

        • Optional options: AxiosRequestConfig<any>

          Axios request options.

        Returns AxiosPromise<StakingContext>

        Throws

        If the request fails.

        -
    \ No newline at end of file +
  • getValidator:function
    • Get the validator for a given network, asset, and address.

      +

      Parameters

      • networkId: string

        The ID of the blockchain network.

        +
      • assetId: string

        The ID of the asset to fetch the validator for.

        +
      • id: string

        The unique publicly identifiable id of the validator for which to fetch the data.

        +
      • Optional options: RawAxiosRequestConfig

        Axios request options.

        +

      Returns AxiosPromise<Validator>

  • listValidators:function
    • List the validators for a given network and asset.

      +

      Parameters

      • networkId: string

        The ID of the blockchain network.

        +
      • assetId: string

        The ID of the asset to fetch the validator for.

        +
      • Optional status: ValidatorStatus

        The status to filter by.

        +
      • Optional limit: number

        The amount of records to return in a single call.

        +
      • Optional page: string

        The batch of records for a given section in the response.

        +
      • Optional options: AxiosRequestConfig<any>

        Axios request options.

        +

      Returns AxiosPromise<ValidatorList>

  • \ No newline at end of file diff --git a/docs/types/coinbase_types.TokenContractOptions.html b/docs/types/coinbase_types.TokenContractOptions.html new file mode 100644 index 00000000..8407a945 --- /dev/null +++ b/docs/types/coinbase_types.TokenContractOptions.html @@ -0,0 +1,2 @@ +TokenContractOptions | @coinbase/coinbase-sdk
    TokenContractOptions: {
        name: string;
        symbol: string;
        totalSupply: string;
    }

    Token Contract Options

    +

    Type declaration

    • name: string
    • symbol: string
    • totalSupply: string
    \ No newline at end of file diff --git a/docs/types/coinbase_types.TradeApiClients.html b/docs/types/coinbase_types.TradeApiClients.html index f1292206..24d635a4 100644 --- a/docs/types/coinbase_types.TradeApiClients.html +++ b/docs/types/coinbase_types.TradeApiClients.html @@ -5,23 +5,23 @@
  • broadcastTradeRequest: BroadcastTradeRequest

    The request body.

  • Optional options: RawAxiosRequestConfig

    Override http request option.

  • Returns AxiosPromise<Trade>

    Throws

    If the required parameter is not provided.

    -
  • createTrade:function
  • createTrade:function
    • Create a new trade.

      Parameters

      • walletId: string

        The ID of the wallet the source address belongs to.

      • addressId: string

        The ID of the address to conduct the trade from.

      • createTradeRequest: CreateTradeRequest

        The request body.

      • Optional options: RawAxiosRequestConfig

        Override http request option.

      Returns AxiosPromise<Trade>

      Throws

      If the required parameter is not provided.

      -
  • getTrade:function
  • getTrade:function
    • Get a trade by ID.

      Parameters

      • walletId: string

        The ID of the wallet the address belongs to.

      • addressId: string

        The ID of the address the trade belongs to.

      • tradeId: string

        The ID of the trade to fetch.

      • Optional options: RawAxiosRequestConfig

        Override http request option.

      Returns AxiosPromise<Trade>

      Throws

      If the required parameter is not provided.

      -
  • listTrades:function
  • listTrades:function
    • List trades for an address.

      Parameters

      • walletId: string

        The ID of the wallet the address belongs to.

      • addressId: string

        The ID of the address to list trades for.

      • Optional limit: number

        A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

      • Optional page: string

        A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

      • Optional options: RawAxiosRequestConfig

        Override http request option.

      Returns AxiosPromise<TradeList>

      Throws

      If the required parameter is not provided.

      -
  • \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/types/coinbase_types.TransferAPIClient.html b/docs/types/coinbase_types.TransferAPIClient.html index a1a18531..b4d1dd5e 100644 --- a/docs/types/coinbase_types.TransferAPIClient.html +++ b/docs/types/coinbase_types.TransferAPIClient.html @@ -9,7 +9,7 @@
  • A promise resolving to the Transfer model.
  • Throws

    If the request fails.

    -
  • createTransfer:function
  • createTransfer:function
    • Creates a Transfer.

      Parameters

      • walletId: string

        The ID of the wallet the address belongs to.

      • addressId: string

        The ID of the address the transfer belongs to.

      • createTransferRequest: CreateTransferRequest

        The request body.

        @@ -18,7 +18,7 @@
      • A promise resolving to the Transfer model.

      Throws

      If the request fails.

      -
  • getTransfer:function
  • getTransfer:function
    • Retrieves a Transfer.

      Parameters

      • walletId: string

        The ID of the wallet the address belongs to.

      • addressId: string

        The ID of the address the transfer belongs to.

      • transferId: string

        The ID of the transfer to retrieve.

        @@ -27,7 +27,7 @@
      • A promise resolving to the Transfer model.

      Throws

      If the request fails.

      -
  • listTransfers:function
  • listTransfers:function
    • Lists Transfers.

      Parameters

      • walletId: string

        The ID of the wallet the address belongs to.

      • addressId: string

        The ID of the address the transfers belong to.

      • Optional limit: number

        The maximum number of transfers to return.

        @@ -37,4 +37,4 @@
      • A promise resolving to the Transfer list.

      Throws

      If the request fails.

      -
  • \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/types/coinbase_types.TypedDataDomain.html b/docs/types/coinbase_types.TypedDataDomain.html new file mode 100644 index 00000000..54737de5 --- /dev/null +++ b/docs/types/coinbase_types.TypedDataDomain.html @@ -0,0 +1,7 @@ +TypedDataDomain | @coinbase/coinbase-sdk
    TypedDataDomain: {
        chainId?: number;
        name?: string;
        salt?: string;
        verifyingContract?: string;
        version?: string;
    }

    The domain for an EIP-712 typed data message payload.

    +

    Type declaration

    • Optional chainId?: number

      The chain ID of the signing domain.

      +
    • Optional name?: string

      The human-readable name of the signing domain.

      +
    • Optional salt?: string

      A salt used for purposes decided by the specific domain as a data hex string.

      +
    • Optional verifyingContract?: string

      The the address of the contract that will verify the signature.

      +
    • Optional version?: string

      The major version of the signing domain.

      +
    \ No newline at end of file diff --git a/docs/types/coinbase_types.TypedDataField.html b/docs/types/coinbase_types.TypedDataField.html new file mode 100644 index 00000000..4078a11c --- /dev/null +++ b/docs/types/coinbase_types.TypedDataField.html @@ -0,0 +1,4 @@ +TypedDataField | @coinbase/coinbase-sdk
    TypedDataField: {
        name: string;
        type: string;
    }

    A specific field of a structured EIP-712 type.

    +

    Type declaration

    • name: string

      The field name.

      +
    • type: string

      The type of the field.

      +
    \ No newline at end of file diff --git a/docs/types/coinbase_types.UpdateContractOptions.html b/docs/types/coinbase_types.UpdateContractOptions.html new file mode 100644 index 00000000..1193af66 --- /dev/null +++ b/docs/types/coinbase_types.UpdateContractOptions.html @@ -0,0 +1,2 @@ +UpdateContractOptions | @coinbase/coinbase-sdk
    UpdateContractOptions: {
        abi?: object;
        contractName?: string;
    }

    Options for updating a smart contract.

    +

    Type declaration

    • Optional abi?: object
    • Optional contractName?: string
    \ No newline at end of file diff --git a/docs/types/coinbase_types.UpdateWebhookOptions.html b/docs/types/coinbase_types.UpdateWebhookOptions.html new file mode 100644 index 00000000..039e4601 --- /dev/null +++ b/docs/types/coinbase_types.UpdateWebhookOptions.html @@ -0,0 +1,2 @@ +UpdateWebhookOptions | @coinbase/coinbase-sdk
    UpdateWebhookOptions: {
        eventFilters?: WebhookEventFilter[];
        eventTypeFilter?: WebhookEventTypeFilter;
        notificationUri?: string;
    }

    Options for updating a Webhook.

    +

    Type declaration

    \ No newline at end of file diff --git a/docs/types/coinbase_types.UserAPIClient.html b/docs/types/coinbase_types.UserAPIClient.html deleted file mode 100644 index 3b9ba62e..00000000 --- a/docs/types/coinbase_types.UserAPIClient.html +++ /dev/null @@ -1,8 +0,0 @@ -UserAPIClient | @coinbase/coinbase-sdk
    UserAPIClient: {
        getCurrentUser(options?): AxiosPromise<User>;
    }

    UserAPI client type definition.

    -

    Type declaration

    • getCurrentUser:function
      • Retrieves the current user.

        -

        Parameters

        • Optional options: AxiosRequestConfig<any>

          Axios request options.

          -

        Returns AxiosPromise<User>

          -
        • A promise resolvindg to the User model.
        • -
        -

        Throws

        If the request fails.

        -
    \ No newline at end of file diff --git a/docs/types/coinbase_types.WalletAPIClient.html b/docs/types/coinbase_types.WalletAPIClient.html index 97caed2d..92410272 100644 --- a/docs/types/coinbase_types.WalletAPIClient.html +++ b/docs/types/coinbase_types.WalletAPIClient.html @@ -12,20 +12,20 @@
  • Optional options: RawAxiosRequestConfig

    Override http request option.

  • Returns AxiosPromise<Balance>

    Throws

    If the required parameter is not provided.

    Throws

    If the request fails.

    -
  • listWalletBalances:function
  • listWalletBalances:function
    • List the balances of all of the addresses in the wallet aggregated by asset.

      Parameters

      • walletId: string

        The ID of the wallet to fetch the balances for.

      • Optional options: RawAxiosRequestConfig

        Override http request option.

      Returns AxiosPromise<AddressBalanceList>

      Throws

      If the required parameter is not provided.

      Throws

      If the request fails.

      -
    • List the balances of all of the addresses in the wallet aggregated by asset.

      +
    • List the balances of all of the addresses in the wallet aggregated by asset.

      Parameters

      • walletId: string

        The ID of the wallet to fetch the balances for.

      • Optional options: RawAxiosRequestConfig

        Override http request option.

      Returns AxiosPromise<AddressBalanceList>

      Throws

      If the required parameter is not provided.

      Throws

      If the request fails.

      -
  • listWallets:function
  • listWallets:function
    • List wallets belonging to the user.

      Parameters

      • Optional limit: number

        A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

        -
      • Optional page: string

        A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

        +
      • Optional page: string

        A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

      • Optional options: RawAxiosRequestConfig

        Override http request option.

      Returns AxiosPromise<WalletList>

      Throws

      If the request fails.

      Throws

      If the required parameter is not provided.

      -
  • \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/types/coinbase_types.WalletCreateOptions.html b/docs/types/coinbase_types.WalletCreateOptions.html index a5a691c4..bbaf9549 100644 --- a/docs/types/coinbase_types.WalletCreateOptions.html +++ b/docs/types/coinbase_types.WalletCreateOptions.html @@ -1,2 +1,2 @@ -WalletCreateOptions | @coinbase/coinbase-sdk
    WalletCreateOptions: {
        intervalSeconds?: number;
        networkId?: string;
        timeoutSeconds?: number;
    }

    Options for creating a Wallet.

    -

    Type declaration

    • Optional intervalSeconds?: number
    • Optional networkId?: string
    • Optional timeoutSeconds?: number
    \ No newline at end of file +WalletCreateOptions | @coinbase/coinbase-sdk
    WalletCreateOptions: {
        intervalSeconds?: number;
        networkId?: string;
        seed?: string;
        timeoutSeconds?: number;
    }

    Options for creating a Wallet.

    +

    Type declaration

    • Optional intervalSeconds?: number
    • Optional networkId?: string
    • Optional seed?: string
    • Optional timeoutSeconds?: number
    \ No newline at end of file diff --git a/docs/types/coinbase_types.WalletData.html b/docs/types/coinbase_types.WalletData.html deleted file mode 100644 index e724db41..00000000 --- a/docs/types/coinbase_types.WalletData.html +++ /dev/null @@ -1,3 +0,0 @@ -WalletData | @coinbase/coinbase-sdk
    WalletData: {
        seed: string;
        walletId: string;
    }

    The Wallet Data type definition. -The data required to recreate a Wallet.

    -

    Type declaration

    • seed: string
    • walletId: string
    \ No newline at end of file diff --git a/docs/types/coinbase_types.WalletStakeAPIClient.html b/docs/types/coinbase_types.WalletStakeAPIClient.html new file mode 100644 index 00000000..8df1861d --- /dev/null +++ b/docs/types/coinbase_types.WalletStakeAPIClient.html @@ -0,0 +1 @@ +WalletStakeAPIClient | @coinbase/coinbase-sdk
    WalletStakeAPIClient: {
        broadcastStakingOperation(walletId, addressId, stakingOperationId, broadcastStakingOperationRequest, options?): AxiosPromise<StakingOperation>;
        createStakingOperation(walletId, addressId, createStakingOperationRequest, options?): AxiosPromise<StakingOperation>;
        getStakingOperation(walletId, addressId, stakingOperationId, options?): AxiosPromise<StakingOperation>;
    }

    Type declaration

    \ No newline at end of file diff --git a/docs/types/coinbase_types_contract.ContractFunctionReturnType.html b/docs/types/coinbase_types_contract.ContractFunctionReturnType.html new file mode 100644 index 00000000..09bc3ab5 --- /dev/null +++ b/docs/types/coinbase_types_contract.ContractFunctionReturnType.html @@ -0,0 +1,12 @@ +ContractFunctionReturnType | @coinbase/coinbase-sdk

    Type alias ContractFunctionReturnType<TAbi, TFunctionName, TArgs>

    ContractFunctionReturnType<TAbi, TFunctionName, TArgs>: MatchArgsToFunction<TAbi, TFunctionName, TArgs> extends infer TFunction
        ? TFunction extends AbiFunction
            ? AbiParametersToPrimitiveTypes<TFunction["outputs"]> extends infer TOutputs
                ? TOutputs extends readonly []
                    ? void
                    : TOutputs extends readonly [infer TOutput]
                        ? TOutput
                        : TOutputs
                : any
            : any
        : any

    Determines the return type of a contract function based on the ABI, function name, and arguments.

    +

    Type Parameters

    • TAbi extends Abi

      The ABI of the contract

      +
    • TFunctionName extends ContractFunctionName<TAbi, "view" | "pure">

      The name of the function to call

      +
    • TArgs extends Record<string, string> = {}

      The arguments to pass to the function (optional)

      +

    Returns

    The return type of the function:

    +
      +
    • void if the function has no outputs
    • +
    • The single output type if there's only one output
    • +
    • A tuple of output types if there are multiple outputs
    • +
    • unknown if the function or its return type cannot be determined
    • +
    +
    \ No newline at end of file diff --git a/docs/types/types_calls.Call.html b/docs/types/types_calls.Call.html new file mode 100644 index 00000000..5fb92cdb --- /dev/null +++ b/docs/types/types_calls.Call.html @@ -0,0 +1 @@ +Call | @coinbase/coinbase-sdk

    Type alias Call<call, extraProperties>

    Call<call, extraProperties>: OneOf<extraProperties & {
        data?: Hex;
        to: Address;
        value?: bigint;
    } | extraProperties & Omit<GetMulticallContractParameters<call, AbiStateMutability>, "address"> & {
        to: Address;
        value?: bigint;
    }>

    Type Parameters

    • call = unknown
    • extraProperties extends Record<string, unknown> = {}
    \ No newline at end of file diff --git a/docs/types/types_calls.Calls.html b/docs/types/types_calls.Calls.html new file mode 100644 index 00000000..ebe5c017 --- /dev/null +++ b/docs/types/types_calls.Calls.html @@ -0,0 +1 @@ +Calls | @coinbase/coinbase-sdk

    Type alias Calls<calls, extraProperties, result>

    Calls<calls, extraProperties, result>: calls extends readonly []
        ? readonly []
        : calls extends readonly [infer call]
            ? readonly [...result, Prettify<Call<call, extraProperties>>]
            : calls extends readonly [infer call, ...(infer rest)]
                ? Calls<[...rest], extraProperties, [...result, Prettify<Call<call, extraProperties>>]>
                : readonly unknown[] extends calls
                    ? calls
                    : calls extends readonly (infer call extends OneOf<Call>)[]
                        ? readonly Prettify<call>[]
                        : readonly OneOf<Call>[]

    Type Parameters

    • calls extends readonly unknown[]
    • extraProperties extends Record<string, unknown> = {}
    • result extends readonly any[] = []
    \ No newline at end of file diff --git a/docs/types/types_chain.Network.html b/docs/types/types_chain.Network.html new file mode 100644 index 00000000..3520a641 --- /dev/null +++ b/docs/types/types_chain.Network.html @@ -0,0 +1,2 @@ +Network | @coinbase/coinbase-sdk
    Network: {
        chainId: SupportedChainId;
        networkId: NetworkIdentifier;
    }

    Represents a chainID and the corresponding Coinbase network ID

    +

    Type declaration

    \ No newline at end of file diff --git a/docs/types/types_chain.SupportedChainId.html b/docs/types/types_chain.SupportedChainId.html new file mode 100644 index 00000000..ac96dd0a --- /dev/null +++ b/docs/types/types_chain.SupportedChainId.html @@ -0,0 +1,2 @@ +SupportedChainId | @coinbase/coinbase-sdk
    SupportedChainId: keyof typeof CHAIN_ID_TO_NETWORK_ID

    Supported chain IDs are the keys of the CHAIN_ID_TO_NETWORK_ID object

    +
    \ No newline at end of file diff --git a/docs/types/types_contract.ContractFunctionArgs.html b/docs/types/types_contract.ContractFunctionArgs.html new file mode 100644 index 00000000..6079940f --- /dev/null +++ b/docs/types/types_contract.ContractFunctionArgs.html @@ -0,0 +1 @@ +ContractFunctionArgs | @coinbase/coinbase-sdk

    Type alias ContractFunctionArgs<abi, mutability, functionName>

    ContractFunctionArgs<abi, mutability, functionName>: AbiParametersToPrimitiveTypes<ExtractAbiFunction<abi extends Abi
            ? abi
            : Abi, functionName, mutability>["inputs"], "inputs"> extends infer args
        ? [args] extends [never]
            ? readonly unknown[]
            : args
        : readonly unknown[]

    Type Parameters

    \ No newline at end of file diff --git a/docs/types/types_contract.ContractFunctionName.html b/docs/types/types_contract.ContractFunctionName.html new file mode 100644 index 00000000..2fcae59e --- /dev/null +++ b/docs/types/types_contract.ContractFunctionName.html @@ -0,0 +1 @@ +ContractFunctionName | @coinbase/coinbase-sdk

    Type alias ContractFunctionName<abi, mutability>

    ContractFunctionName<abi, mutability>: ExtractAbiFunctionNames<abi extends Abi
            ? abi
            : Abi, mutability> extends infer functionName extends string
        ? [functionName] extends [never]
            ? string
            : functionName
        : string

    Type Parameters

    • abi extends Abi | readonly unknown[] = Abi
    • mutability extends AbiStateMutability = AbiStateMutability
    \ No newline at end of file diff --git a/docs/types/types_contract.ContractFunctionParameters.html b/docs/types/types_contract.ContractFunctionParameters.html new file mode 100644 index 00000000..e66eb86e --- /dev/null +++ b/docs/types/types_contract.ContractFunctionParameters.html @@ -0,0 +1 @@ +ContractFunctionParameters | @coinbase/coinbase-sdk

    Type alias ContractFunctionParameters<abi, mutability, functionName, args, deployless, allFunctionNames, allArgs>

    ContractFunctionParameters<abi, mutability, functionName, args, deployless, allFunctionNames, allArgs>: {
        abi: abi;
        args?: (abi extends Abi
            ? UnionWiden<args>
            : never) | allArgs;
        functionName: allFunctionNames | (functionName extends allFunctionNames
            ? functionName
            : never);
    } & (readonly [] extends allArgs
        ? {}
        : {
            args: Widen<args>;
        }) & (deployless extends true
        ? {
            address?: undefined;
            code: Hex;
        }
        : {
            address: Address;
        })

    Type Parameters

    Type declaration

    \ No newline at end of file diff --git a/docs/types/types_contract.ExtractAbiFunctionForArgs.html b/docs/types/types_contract.ExtractAbiFunctionForArgs.html new file mode 100644 index 00000000..c367c22f --- /dev/null +++ b/docs/types/types_contract.ExtractAbiFunctionForArgs.html @@ -0,0 +1 @@ +ExtractAbiFunctionForArgs | @coinbase/coinbase-sdk

    Type alias ExtractAbiFunctionForArgs<abi, mutability, functionName, args>

    ExtractAbiFunctionForArgs<abi, mutability, functionName, args>: ExtractAbiFunction<abi, functionName, mutability> extends infer abiFunction extends AbiFunction
        ? IsUnion<abiFunction> extends true
            ? UnionToTuple<abiFunction> extends infer abiFunctions extends readonly AbiFunction[]
                ? {
                    [k in keyof abiFunctions]: CheckArgs<abiFunctions[k], args>
                }[number]
                : never
            : abiFunction
        : never

    Type Parameters

    \ No newline at end of file diff --git a/docs/types/types_contract.UnionWiden.html b/docs/types/types_contract.UnionWiden.html new file mode 100644 index 00000000..4b3acbf8 --- /dev/null +++ b/docs/types/types_contract.UnionWiden.html @@ -0,0 +1 @@ +UnionWiden | @coinbase/coinbase-sdk
    UnionWiden<type>: type extends any
        ? Widen<type>
        : never

    Type Parameters

    • type
    \ No newline at end of file diff --git a/docs/types/types_contract.Widen.html b/docs/types/types_contract.Widen.html new file mode 100644 index 00000000..4923de7c --- /dev/null +++ b/docs/types/types_contract.Widen.html @@ -0,0 +1 @@ +Widen | @coinbase/coinbase-sdk
    Widen<type>: ([unknown] extends [type]
        ? unknown
        : never) | (type extends Function
        ? type
        : never) | (type extends ResolvedRegister["BigIntType"]
        ? bigint
        : never) | (type extends boolean
        ? boolean
        : never) | (type extends ResolvedRegister["IntType"]
        ? number
        : never) | (type extends string
        ? type extends ResolvedRegister["AddressType"]
            ? ResolvedRegister["AddressType"]
            : type extends ResolvedRegister["BytesType"]["inputs"]
                ? ResolvedRegister["BytesType"]
                : string
        : never) | (type extends readonly []
        ? readonly []
        : never) | (type extends Record<string, unknown>
        ? {
            [K in keyof type]: Widen<type[K]>
        }
        : never) | (type extends {
            length: number;
        }
        ? {
                [K in keyof type]: Widen<type[K]>
            } extends infer Val extends readonly unknown[]
            ? readonly [...Val]
            : never
        : never)

    Type Parameters

    • type
    \ No newline at end of file diff --git a/docs/types/types_misc.Address.html b/docs/types/types_misc.Address.html new file mode 100644 index 00000000..d1f4ec6c --- /dev/null +++ b/docs/types/types_misc.Address.html @@ -0,0 +1 @@ +Address | @coinbase/coinbase-sdk
    Address: `0x${string}`
    \ No newline at end of file diff --git a/docs/types/types_misc.Hash.html b/docs/types/types_misc.Hash.html new file mode 100644 index 00000000..ef3ea0f2 --- /dev/null +++ b/docs/types/types_misc.Hash.html @@ -0,0 +1 @@ +Hash | @coinbase/coinbase-sdk
    Hash: `0x${string}`
    \ No newline at end of file diff --git a/docs/types/types_misc.Hex.html b/docs/types/types_misc.Hex.html new file mode 100644 index 00000000..feb641cc --- /dev/null +++ b/docs/types/types_misc.Hex.html @@ -0,0 +1 @@ +Hex | @coinbase/coinbase-sdk
    Hex: `0x${string}`
    \ No newline at end of file diff --git a/docs/types/types_multicall.GetMulticallContractParameters.html b/docs/types/types_multicall.GetMulticallContractParameters.html new file mode 100644 index 00000000..9f824d44 --- /dev/null +++ b/docs/types/types_multicall.GetMulticallContractParameters.html @@ -0,0 +1 @@ +GetMulticallContractParameters | @coinbase/coinbase-sdk

    Type alias GetMulticallContractParameters<contract, mutability>

    GetMulticallContractParameters<contract, mutability>: contract extends {
            abi: infer abi extends Abi;
        }
        ? contract extends {
                functionName: infer functionName extends ContractFunctionName<abi, mutability>;
            }
            ? contract extends {
                    args: infer args extends ContractFunctionArgs<abi, mutability, functionName>;
                }
                ? ContractFunctionParameters<abi, mutability, functionName, args>
                : ContractFunctionParameters<abi, mutability, functionName>
            : Abi extends abi
                ? ContractFunctionParameters
                : ContractFunctionParameters<abi, mutability>
        : ContractFunctionParameters<readonly unknown[]>

    Type Parameters

    • contract
    • mutability extends AbiStateMutability
    \ No newline at end of file diff --git a/docs/types/types_utils.Assign.html b/docs/types/types_utils.Assign.html new file mode 100644 index 00000000..e2fc90af --- /dev/null +++ b/docs/types/types_utils.Assign.html @@ -0,0 +1,4 @@ +Assign | @coinbase/coinbase-sdk
    Assign<T, U>: Assign_<T, U> & U

    Type Parameters

    • T
    • U

    Description

    Assigns the properties of U onto T.

    +

    Example

    Assign<{ a: string, b: number }, { a: undefined, c: boolean }>
    => { a: undefined, b: number, c: boolean } +
    +
    \ No newline at end of file diff --git a/docs/types/types_utils.Evaluate.html b/docs/types/types_utils.Evaluate.html new file mode 100644 index 00000000..763539b4 --- /dev/null +++ b/docs/types/types_utils.Evaluate.html @@ -0,0 +1 @@ +Evaluate | @coinbase/coinbase-sdk

    Type alias Evaluate<type>Internal

    Evaluate<type>: {
        [key in keyof type]: type[key]
    } & {}

    Type Parameters

    • type

    Type declaration

      \ No newline at end of file diff --git a/docs/types/types_utils.ExactPartial.html b/docs/types/types_utils.ExactPartial.html new file mode 100644 index 00000000..c9bdd1c3 --- /dev/null +++ b/docs/types/types_utils.ExactPartial.html @@ -0,0 +1 @@ +ExactPartial | @coinbase/coinbase-sdk
      ExactPartial<type>: {
          [key in keyof type]?: type[key]
      }

      Type Parameters

      • type
      \ No newline at end of file diff --git a/docs/types/types_utils.ExactRequired.html b/docs/types/types_utils.ExactRequired.html new file mode 100644 index 00000000..56880491 --- /dev/null +++ b/docs/types/types_utils.ExactRequired.html @@ -0,0 +1 @@ +ExactRequired | @coinbase/coinbase-sdk
      ExactRequired<type>: {
          [P in keyof type]-?: Exclude<type[P], undefined>
      }

      Type Parameters

      • type
      \ No newline at end of file diff --git a/docs/types/types_utils.Filter.html b/docs/types/types_utils.Filter.html new file mode 100644 index 00000000..304e1a16 --- /dev/null +++ b/docs/types/types_utils.Filter.html @@ -0,0 +1,7 @@ +Filter | @coinbase/coinbase-sdk

      Type alias Filter<T, P, Acc>

      Filter<T, P, Acc>: T extends readonly [infer F, ...(infer Rest extends readonly unknown[])]
          ? [F] extends [P]
              ? Filter<Rest, P, [...Acc, F]>
              : Filter<Rest, P, Acc>
          : readonly [...Acc]

      Filters out all members of T that are not P

      +

      Type Parameters

      • T extends readonly unknown[]

        Items to filter

        +
      • P

        Type to filter out

        +
      • Acc extends readonly unknown[] = []

      Returns

      Filtered items

      +

      Example

      type Result = Filter<['a', 'b', 'c'], 'b'>
      // ^? type Result = ['a', 'c'] +
      +
      \ No newline at end of file diff --git a/docs/types/types_utils.IsNarrowable.html b/docs/types/types_utils.IsNarrowable.html new file mode 100644 index 00000000..a71f578d --- /dev/null +++ b/docs/types/types_utils.IsNarrowable.html @@ -0,0 +1,6 @@ +IsNarrowable | @coinbase/coinbase-sdk
      IsNarrowable<T, U>: IsNever<(T extends U
              ? true
              : false) & (U extends T
              ? false
              : true)> extends true
          ? false
          : true

      Type Parameters

      • T

        Type to check

        +
      • U

        Type to against

        +

      Description

      Checks if T can be narrowed further than U

      +

      Example

      type Result = IsNarrowable<'foo', string>
      // ^? true +
      +
      \ No newline at end of file diff --git a/docs/types/types_utils.IsNever.html b/docs/types/types_utils.IsNever.html new file mode 100644 index 00000000..9a339ab5 --- /dev/null +++ b/docs/types/types_utils.IsNever.html @@ -0,0 +1,5 @@ +IsNever | @coinbase/coinbase-sdk
      IsNever<T>: [T] extends [never]
          ? true
          : false

      Type Parameters

      • T

        Type to check

        +

      Description

      Checks if T is never

      +

      Example

      type Result = IsNever<never>
      // ^? type Result = true +
      +
      \ No newline at end of file diff --git a/docs/types/types_utils.IsUndefined.html b/docs/types/types_utils.IsUndefined.html new file mode 100644 index 00000000..f9dc7e1e --- /dev/null +++ b/docs/types/types_utils.IsUndefined.html @@ -0,0 +1,5 @@ +IsUndefined | @coinbase/coinbase-sdk
      IsUndefined<T>: [undefined] extends [T]
          ? true
          : false

      Type Parameters

      • T

        Type to check

        +

      Description

      Checks if T is undefined

      +

      Example

      type Result = IsUndefined<undefined>
      // ^? type Result = true +
      +
      \ No newline at end of file diff --git a/docs/types/types_utils.IsUnion.html b/docs/types/types_utils.IsUnion.html new file mode 100644 index 00000000..cdcc91d4 --- /dev/null +++ b/docs/types/types_utils.IsUnion.html @@ -0,0 +1 @@ +IsUnion | @coinbase/coinbase-sdk

      Type alias IsUnion<union, union2>

      IsUnion<union, union2>: union extends union2
          ? [union2] extends [union]
              ? false
              : true
          : never

      Type Parameters

      \ No newline at end of file diff --git a/docs/types/types_utils.LooseOmit.html b/docs/types/types_utils.LooseOmit.html new file mode 100644 index 00000000..450699db --- /dev/null +++ b/docs/types/types_utils.LooseOmit.html @@ -0,0 +1,2 @@ +LooseOmit | @coinbase/coinbase-sdk

      Type alias LooseOmit<type, keys>Internal

      LooseOmit<type, keys>: Pick<type, Exclude<keyof type, keys>>

      Loose version of Omit

      +

      Type Parameters

      • type
      • keys extends string
      \ No newline at end of file diff --git a/docs/types/types_utils.MaybePartial.html b/docs/types/types_utils.MaybePartial.html new file mode 100644 index 00000000..2a88adcf --- /dev/null +++ b/docs/types/types_utils.MaybePartial.html @@ -0,0 +1 @@ +MaybePartial | @coinbase/coinbase-sdk

      Type alias MaybePartial<type, enabled>

      MaybePartial<type, enabled>: enabled extends true
          ? Prettify<ExactPartial<type>>
          : type

      Type Parameters

      • type
      • enabled extends boolean | undefined
      \ No newline at end of file diff --git a/docs/types/types_utils.MaybePromise.html b/docs/types/types_utils.MaybePromise.html new file mode 100644 index 00000000..b2f5f438 --- /dev/null +++ b/docs/types/types_utils.MaybePromise.html @@ -0,0 +1 @@ +MaybePromise | @coinbase/coinbase-sdk
      MaybePromise<T>: T | Promise<T>

      Type Parameters

      • T
      \ No newline at end of file diff --git a/docs/types/types_utils.MaybeRequired.html b/docs/types/types_utils.MaybeRequired.html new file mode 100644 index 00000000..ceef0af7 --- /dev/null +++ b/docs/types/types_utils.MaybeRequired.html @@ -0,0 +1,4 @@ +MaybeRequired | @coinbase/coinbase-sdk

      Type alias MaybeRequired<T, required>

      MaybeRequired<T, required>: required extends true
          ? ExactRequired<T>
          : T

      Type Parameters

      • T
      • required extends boolean

      Description

      Makes attributes on the type T required if required is true.

      +

      Example

      MaybeRequired<{ a: string, b?: number }, true>
      => { a: string, b: number }

      MaybeRequired<{ a: string, b?: number }, false>
      => { a: string, b?: number } +
      +
      \ No newline at end of file diff --git a/docs/types/types_utils.Mutable.html b/docs/types/types_utils.Mutable.html new file mode 100644 index 00000000..1e64ee0d --- /dev/null +++ b/docs/types/types_utils.Mutable.html @@ -0,0 +1,2 @@ +Mutable | @coinbase/coinbase-sdk
      Mutable<type>: {
          -readonly [key in keyof type]: type[key]
      }

      Removes readonly from all properties of an object.

      +

      Type Parameters

      • type extends object
      \ No newline at end of file diff --git a/docs/types/types_utils.NoInfer.html b/docs/types/types_utils.NoInfer.html new file mode 100644 index 00000000..a1a13c98 --- /dev/null +++ b/docs/types/types_utils.NoInfer.html @@ -0,0 +1 @@ +NoInfer | @coinbase/coinbase-sdk
      NoInfer<type>: [type][type extends any
          ? 0
          : never]

      Type Parameters

      • type
      \ No newline at end of file diff --git a/docs/types/types_utils.NoUndefined.html b/docs/types/types_utils.NoUndefined.html new file mode 100644 index 00000000..555a4ee8 --- /dev/null +++ b/docs/types/types_utils.NoUndefined.html @@ -0,0 +1,4 @@ +NoUndefined | @coinbase/coinbase-sdk

      Type alias NoUndefined<T>Internal

      NoUndefined<T>: T extends undefined
          ? never
          : T

      Type Parameters

      • T

      Description

      Constructs a type by excluding undefined from T.

      +

      Example

      NoUndefined<string | undefined>
      => string

      @internal +
      +
      \ No newline at end of file diff --git a/docs/types/types_utils.Omit.html b/docs/types/types_utils.Omit.html new file mode 100644 index 00000000..9e0deec1 --- /dev/null +++ b/docs/types/types_utils.Omit.html @@ -0,0 +1,2 @@ +Omit | @coinbase/coinbase-sdk

      Type alias Omit<type, keys>

      Omit<type, keys>: Pick<type, Exclude<keyof type, keys>>

      Strict version of built-in Omit type

      +

      Type Parameters

      • type
      • keys extends keyof type
      \ No newline at end of file diff --git a/docs/types/types_utils.OneOf.html b/docs/types/types_utils.OneOf.html new file mode 100644 index 00000000..91b5df24 --- /dev/null +++ b/docs/types/types_utils.OneOf.html @@ -0,0 +1 @@ +OneOf | @coinbase/coinbase-sdk

      Type alias OneOf<union, fallback, keys>

      OneOf<union, fallback, keys>: union extends infer item
          ? Prettify<item & {
              [key in Exclude<keys, keyof item>]?: fallback extends object
                  ? key extends keyof fallback
                      ? fallback[key]
                      : undefined
                  : undefined
          }>
          : never

      Type Parameters

      • union extends object
      • fallback extends object | undefined = undefined
      • keys extends KeyofUnion<union> = KeyofUnion<union>
      \ No newline at end of file diff --git a/docs/types/types_utils.Or.html b/docs/types/types_utils.Or.html new file mode 100644 index 00000000..ea7e8dd7 --- /dev/null +++ b/docs/types/types_utils.Or.html @@ -0,0 +1,10 @@ +Or | @coinbase/coinbase-sdk
      Or<T>: T extends readonly [infer Head, ...(infer Tail)]
          ? Head extends true
              ? true
              : Or<Tail>
          : false

      Type Parameters

      • T extends readonly unknown[]

        Type to check

        +
          +
        • +
        +

      Description

      Evaluates boolean "or" condition for T properties.

      +

      Example

      type Result = Or<[false, true, false]>
      // ^? type Result = true +
      +

      Example

      type Result = Or<[false, false, false]>
      // ^? type Result = false +
      +
      \ No newline at end of file diff --git a/docs/types/types_utils.PartialBy.html b/docs/types/types_utils.PartialBy.html new file mode 100644 index 00000000..77009931 --- /dev/null +++ b/docs/types/types_utils.PartialBy.html @@ -0,0 +1,4 @@ +PartialBy | @coinbase/coinbase-sdk
      PartialBy<T, K>: Omit<T, K> & ExactPartial<Pick<T, K>>

      Type Parameters

      • T
      • K extends keyof T

      Description

      Creates a type that is a partial of T, but with the required keys K.

      +

      Example

      PartialBy<{ a: string, b: number }, 'a'>
      => { a?: string, b: number } +
      +
      \ No newline at end of file diff --git a/docs/types/types_utils.Prettify.html b/docs/types/types_utils.Prettify.html new file mode 100644 index 00000000..2ab8f54f --- /dev/null +++ b/docs/types/types_utils.Prettify.html @@ -0,0 +1,5 @@ +Prettify | @coinbase/coinbase-sdk
      Prettify<T>: {
          [K in keyof T]: T[K]
      } & {}

      Type Parameters

      • T

      Type declaration

        Description

        Combines members of an intersection into a readable type.

        +

        See

        https://twitter.com/mattpocockuk/status/1622730173446557697?s=20&t=NdpAcmEFXY01xkqU3KO0Mg

        +

        Example

        Prettify<{ a: string } & { b: string } & { c: number, d: bigint }>
        => { a: string, b: string, c: number, d: bigint } +
        +
        \ No newline at end of file diff --git a/docs/types/types_utils.RequiredBy.html b/docs/types/types_utils.RequiredBy.html new file mode 100644 index 00000000..1e7678d9 --- /dev/null +++ b/docs/types/types_utils.RequiredBy.html @@ -0,0 +1,4 @@ +RequiredBy | @coinbase/coinbase-sdk
        RequiredBy<T, K>: Omit<T, K> & ExactRequired<Pick<T, K>>

        Type Parameters

        • T
        • K extends keyof T

        Description

        Creates a type that is T with the required keys K.

        +

        Example

        RequiredBy<{ a?: string, b: number }, 'a'>
        => { a: string, b: number } +
        +
        \ No newline at end of file diff --git a/docs/types/types_utils.Some.html b/docs/types/types_utils.Some.html new file mode 100644 index 00000000..0bdbcf6c --- /dev/null +++ b/docs/types/types_utils.Some.html @@ -0,0 +1,4 @@ +Some | @coinbase/coinbase-sdk

        Type alias Some<array, value>

        Some<array, value>: array extends readonly [value, ...unknown[]]
            ? true
            : array extends readonly [unknown, ...(infer rest)]
                ? Some<rest, value>
                : false

        Type Parameters

        • array extends readonly unknown[]
        • value

        Description

        Returns truthy if array contains value.

        +

        Example

        Some<[1, 2, 3], 2>
        => true +
        +
        \ No newline at end of file diff --git a/docs/types/types_utils.UnionEvaluate.html b/docs/types/types_utils.UnionEvaluate.html new file mode 100644 index 00000000..11832fbd --- /dev/null +++ b/docs/types/types_utils.UnionEvaluate.html @@ -0,0 +1 @@ +UnionEvaluate | @coinbase/coinbase-sdk
        UnionEvaluate<type>: type extends object
            ? Prettify<type>
            : type

        Type Parameters

        • type
        \ No newline at end of file diff --git a/docs/types/types_utils.UnionLooseOmit.html b/docs/types/types_utils.UnionLooseOmit.html new file mode 100644 index 00000000..d9c4365e --- /dev/null +++ b/docs/types/types_utils.UnionLooseOmit.html @@ -0,0 +1 @@ +UnionLooseOmit | @coinbase/coinbase-sdk

        Type alias UnionLooseOmit<type, keys>

        UnionLooseOmit<type, keys>: type extends any
            ? LooseOmit<type, keys>
            : never

        Type Parameters

        • type
        • keys extends string
        \ No newline at end of file diff --git a/docs/types/types_utils.UnionOmit.html b/docs/types/types_utils.UnionOmit.html new file mode 100644 index 00000000..eb374268 --- /dev/null +++ b/docs/types/types_utils.UnionOmit.html @@ -0,0 +1,4 @@ +UnionOmit | @coinbase/coinbase-sdk

        Type alias UnionOmit<type, keys>

        UnionOmit<type, keys>: type extends any
            ? Omit<type, keys>
            : never

        Type Parameters

        • type
        • keys extends keyof type

        Description

        Construct a type with the properties of union type T except for those in type K.

        +

        Example

        type Result = UnionOmit<{ a: string, b: number } | { a: string, b: undefined, c: number }, 'a'>
        => { b: number } | { b: undefined, c: number } +
        +
        \ No newline at end of file diff --git a/docs/types/types_utils.UnionPartialBy.html b/docs/types/types_utils.UnionPartialBy.html new file mode 100644 index 00000000..7e75f901 --- /dev/null +++ b/docs/types/types_utils.UnionPartialBy.html @@ -0,0 +1,4 @@ +UnionPartialBy | @coinbase/coinbase-sdk
        UnionPartialBy<T, K>: T extends any
            ? PartialBy<T, K>
            : never

        Type Parameters

        • T
        • K extends keyof T

        Description

        Creates a type that is a partial of T, but with the required keys K.

        +

        Example

        PartialBy<{ a: string, b: number } | { a: string, b: undefined, c: number }, 'a'>
        => { a?: string, b: number } | { a?: string, b: undefined, c: number } +
        +
        \ No newline at end of file diff --git a/docs/types/types_utils.UnionPick.html b/docs/types/types_utils.UnionPick.html new file mode 100644 index 00000000..a719072f --- /dev/null +++ b/docs/types/types_utils.UnionPick.html @@ -0,0 +1,4 @@ +UnionPick | @coinbase/coinbase-sdk

        Type alias UnionPick<type, keys>

        UnionPick<type, keys>: type extends any
            ? Pick<type, keys>
            : never

        Type Parameters

        • type
        • keys extends keyof type

        Description

        Construct a type with the properties of union type T except for those in type K.

        +

        Example

        type Result = UnionOmit<{ a: string, b: number } | { a: string, b: undefined, c: number }, 'a'>
        => { b: number } | { b: undefined, c: number } +
        +
        \ No newline at end of file diff --git a/docs/types/types_utils.UnionRequiredBy.html b/docs/types/types_utils.UnionRequiredBy.html new file mode 100644 index 00000000..cde369f1 --- /dev/null +++ b/docs/types/types_utils.UnionRequiredBy.html @@ -0,0 +1,4 @@ +UnionRequiredBy | @coinbase/coinbase-sdk

        Type alias UnionRequiredBy<T, K>

        UnionRequiredBy<T, K>: T extends any
            ? RequiredBy<T, K>
            : never

        Type Parameters

        • T
        • K extends keyof T

        Description

        Creates a type that is T with the required keys K.

        +

        Example

        RequiredBy<{ a?: string, b: number } | { a?: string, c?: number }, 'a'>
        => { a: string, b: number } | { a: string, c?: number } +
        +
        \ No newline at end of file diff --git a/docs/types/types_utils.UnionToTuple.html b/docs/types/types_utils.UnionToTuple.html new file mode 100644 index 00000000..d6df3d1d --- /dev/null +++ b/docs/types/types_utils.UnionToTuple.html @@ -0,0 +1 @@ +UnionToTuple | @coinbase/coinbase-sdk

        Type alias UnionToTuple<union, last>

        UnionToTuple<union, last>: [union] extends [never]
            ? []
            : [...UnionToTuple<Exclude<union, last>>, last]

        Type Parameters

        • union
        • last = LastInUnion<union>
        \ No newline at end of file diff --git a/docs/types/types_utils.ValueOf.html b/docs/types/types_utils.ValueOf.html new file mode 100644 index 00000000..ad4c03dd --- /dev/null +++ b/docs/types/types_utils.ValueOf.html @@ -0,0 +1,4 @@ +ValueOf | @coinbase/coinbase-sdk

        Type alias ValueOf<T>Internal

        ValueOf<T>: T[keyof T]

        Type Parameters

        • T

        Description

        Creates a type that extracts the values of T.

        +

        Example

        ValueOf<{ a: string, b: number }>
        => string | number

        @internal +
        +
        \ No newline at end of file diff --git a/docs/types/utils_wait.WaitOptions.html b/docs/types/utils_wait.WaitOptions.html new file mode 100644 index 00000000..f7eab725 --- /dev/null +++ b/docs/types/utils_wait.WaitOptions.html @@ -0,0 +1,4 @@ +WaitOptions | @coinbase/coinbase-sdk
        WaitOptions: {
            intervalSeconds?: number;
            timeoutSeconds?: number;
        }

        Options for the wait function

        +

        Type declaration

        • Optional intervalSeconds?: number

          Interval between retries in seconds. Defaults to 0.2

          +
        • Optional timeoutSeconds?: number

          Maximum time to wait before timing out in seconds. Defaults to 10

          +
        \ No newline at end of file diff --git a/docs/types/wallets_createSmartWallet.CreateSmartWalletOptions.html b/docs/types/wallets_createSmartWallet.CreateSmartWalletOptions.html new file mode 100644 index 00000000..15d9a056 --- /dev/null +++ b/docs/types/wallets_createSmartWallet.CreateSmartWalletOptions.html @@ -0,0 +1,3 @@ +CreateSmartWalletOptions | @coinbase/coinbase-sdk
        CreateSmartWalletOptions: {
            signer: Signer;
        }

        Options for creating a smart wallet

        +

        Type declaration

        • signer: Signer

          The signer object that will own the smart wallet

          +
        \ No newline at end of file diff --git a/docs/types/wallets_toSmartWallet.ToSmartWalletOptions.html b/docs/types/wallets_toSmartWallet.ToSmartWalletOptions.html new file mode 100644 index 00000000..645c9255 --- /dev/null +++ b/docs/types/wallets_toSmartWallet.ToSmartWalletOptions.html @@ -0,0 +1,4 @@ +ToSmartWalletOptions | @coinbase/coinbase-sdk
        ToSmartWalletOptions: {
            signer: Signer;
            smartWalletAddress: Address;
        }

        Options for converting a smart wallet address and signer to a SmartWallet instance

        +

        Type declaration

        • signer: Signer

          The signer that will own the smart wallet

          +
        • smartWalletAddress: Address

          The address of the smart wallet

          +
        \ No newline at end of file diff --git a/docs/types/wallets_types.NetworkScopedSmartWallet.html b/docs/types/wallets_types.NetworkScopedSmartWallet.html new file mode 100644 index 00000000..7c2024f6 --- /dev/null +++ b/docs/types/wallets_types.NetworkScopedSmartWallet.html @@ -0,0 +1,2 @@ +NetworkScopedSmartWallet | @coinbase/coinbase-sdk
        NetworkScopedSmartWallet: Prettify<Omit<SmartWallet, "sendUserOperation"> & {
            network: Network;
            paymasterUrl?: string;
            sendUserOperation: (<T>(options) => Promise<SendUserOperationReturnType>);
        }>

        A smart wallet that's configured for a specific network

        +
        \ No newline at end of file diff --git a/docs/types/wallets_types.Signer.html b/docs/types/wallets_types.Signer.html new file mode 100644 index 00000000..d0d622b5 --- /dev/null +++ b/docs/types/wallets_types.Signer.html @@ -0,0 +1,4 @@ +Signer | @coinbase/coinbase-sdk
        Signer: {
            address: Address;
            sign: ((parameters) => Promise<Hex>);
        }

        Represents a signer that can sign messages

        +

        Type declaration

        • address: Address

          The address of the signer

          +
        • sign: ((parameters) => Promise<Hex>)

          Signs a message hash and returns the signature as a hex string

          +
            • (parameters): Promise<Hex>
            • Parameters

              • parameters: {
                    hash: Hash;
                }

              Returns Promise<Hex>

        \ No newline at end of file diff --git a/docs/types/wallets_types.SmartWallet.html b/docs/types/wallets_types.SmartWallet.html new file mode 100644 index 00000000..6ed27131 --- /dev/null +++ b/docs/types/wallets_types.SmartWallet.html @@ -0,0 +1,10 @@ +SmartWallet | @coinbase/coinbase-sdk
        SmartWallet: {
            address: Address;
            owners: Signer[];
            sendUserOperation: (<T>(options) => Promise<SendUserOperationReturnType>);
            type: "smart";
            useNetwork: ((options) => NetworkScopedSmartWallet);
        }

        Represents a SmartWallet with user operation capabilities

        +

        Type declaration

        • address: Address

          The smart wallet's address

          +
        • owners: Signer[]

          Array of signers that own the wallet (currently only supports one owner)

          +
        • sendUserOperation: (<T>(options) => Promise<SendUserOperationReturnType>)

          Sends a user operation to the network

          +

          Returns

          The result of the user operation

          +

          Example

          import { sendUserOperation } from "@coinbase/coinbase-sdk";
          import { parseEther } from "viem";

          const result = await sendUserOperation(wallet, {
          calls: [
          {
          to: "0x1234567890123456789012345678901234567890",
          abi: erc20Abi,
          functionName: "transfer",
          args: [to, amount],
          },
          {
          to: "0x1234567890123456789012345678901234567890",
          data: "0x",
          value: parseEther("0.0000005"),
          },
          ],
          chainId: 1,
          paymasterUrl: "https://api.developer.coinbase.com/rpc/v1/base/someapikey",
          }); +
          +
        • type: "smart"

          Identifier for the wallet type

          +
        • useNetwork: ((options) => NetworkScopedSmartWallet)

          Configures the wallet for a specific network

          +
        \ No newline at end of file diff --git a/docs/types/wallets_types.SmartWalletNetworkOptions.html b/docs/types/wallets_types.SmartWalletNetworkOptions.html new file mode 100644 index 00000000..e1d283b2 --- /dev/null +++ b/docs/types/wallets_types.SmartWalletNetworkOptions.html @@ -0,0 +1,4 @@ +SmartWalletNetworkOptions | @coinbase/coinbase-sdk
        SmartWalletNetworkOptions: {
            chainId: SupportedChainId;
            paymasterUrl?: string;
        }

        Options for configuring a SmartWallet for a specific network

        +

        Type declaration

        • chainId: SupportedChainId

          The chain ID of the network to connect to

          +
        • Optional paymasterUrl?: string

          Optional URL for the paymaster service

          +
        \ No newline at end of file diff --git a/docs/variables/client_api.FetchStakingRewardsRequestFormatEnum-1.html b/docs/variables/client_api.FetchStakingRewardsRequestFormatEnum-1.html deleted file mode 100644 index a0c1f4d7..00000000 --- a/docs/variables/client_api.FetchStakingRewardsRequestFormatEnum-1.html +++ /dev/null @@ -1 +0,0 @@ -FetchStakingRewardsRequestFormatEnum | @coinbase/coinbase-sdk

        Variable FetchStakingRewardsRequestFormatEnumConst

        FetchStakingRewardsRequestFormatEnum: {
            Native: "native";
            Usd: "usd";
        } = ...

        Type declaration

        • Readonly Native: "native"
        • Readonly Usd: "usd"
        \ No newline at end of file diff --git a/docs/variables/client_api.FundOperationStatusEnum-1.html b/docs/variables/client_api.FundOperationStatusEnum-1.html new file mode 100644 index 00000000..9731c0ff --- /dev/null +++ b/docs/variables/client_api.FundOperationStatusEnum-1.html @@ -0,0 +1 @@ +FundOperationStatusEnum | @coinbase/coinbase-sdk

        Variable FundOperationStatusEnumConst

        FundOperationStatusEnum: {
            Complete: "complete";
            Failed: "failed";
            Pending: "pending";
        } = ...

        Type declaration

        • Readonly Complete: "complete"
        • Readonly Failed: "failed"
        • Readonly Pending: "pending"
        \ No newline at end of file diff --git a/docs/variables/client_api.NetworkProtocolFamilyEnum-1.html b/docs/variables/client_api.NetworkProtocolFamilyEnum-1.html new file mode 100644 index 00000000..3b67a47b --- /dev/null +++ b/docs/variables/client_api.NetworkProtocolFamilyEnum-1.html @@ -0,0 +1 @@ +NetworkProtocolFamilyEnum | @coinbase/coinbase-sdk

        Variable NetworkProtocolFamilyEnumConst

        NetworkProtocolFamilyEnum: {
            Evm: "evm";
            Solana: "solana";
        } = ...

        Type declaration

        • Readonly Evm: "evm"
        • Readonly Solana: "solana"
        \ No newline at end of file diff --git a/docs/variables/client_api.PayloadSignatureStatusEnum-1.html b/docs/variables/client_api.PayloadSignatureStatusEnum-1.html new file mode 100644 index 00000000..a67d60f1 --- /dev/null +++ b/docs/variables/client_api.PayloadSignatureStatusEnum-1.html @@ -0,0 +1 @@ +PayloadSignatureStatusEnum | @coinbase/coinbase-sdk

        Variable PayloadSignatureStatusEnumConst

        PayloadSignatureStatusEnum: {
            Failed: "failed";
            Pending: "pending";
            Signed: "signed";
        } = ...

        Type declaration

        • Readonly Failed: "failed"
        • Readonly Pending: "pending"
        • Readonly Signed: "signed"
        \ No newline at end of file diff --git a/docs/variables/client_api.ResolveIdentityByAddressRolesEnum-1.html b/docs/variables/client_api.ResolveIdentityByAddressRolesEnum-1.html new file mode 100644 index 00000000..a8dab27b --- /dev/null +++ b/docs/variables/client_api.ResolveIdentityByAddressRolesEnum-1.html @@ -0,0 +1 @@ +ResolveIdentityByAddressRolesEnum | @coinbase/coinbase-sdk

        Variable ResolveIdentityByAddressRolesEnumConst

        ResolveIdentityByAddressRolesEnum: {
            Managed: "managed";
            Owned: "owned";
        } = ...

        Type declaration

        • Readonly Managed: "managed"
        • Readonly Owned: "owned"

        Export

        \ No newline at end of file diff --git a/docs/variables/client_api.SolidityValueTypeEnum-1.html b/docs/variables/client_api.SolidityValueTypeEnum-1.html new file mode 100644 index 00000000..206d33c7 --- /dev/null +++ b/docs/variables/client_api.SolidityValueTypeEnum-1.html @@ -0,0 +1 @@ +SolidityValueTypeEnum | @coinbase/coinbase-sdk

        Variable SolidityValueTypeEnumConst

        SolidityValueTypeEnum: {
            Address: "address";
            Array: "array";
            Bool: "bool";
            Bytes: "bytes";
            Bytes1: "bytes1";
            Bytes10: "bytes10";
            Bytes11: "bytes11";
            Bytes12: "bytes12";
            Bytes13: "bytes13";
            Bytes14: "bytes14";
            Bytes15: "bytes15";
            Bytes16: "bytes16";
            Bytes17: "bytes17";
            Bytes18: "bytes18";
            Bytes19: "bytes19";
            Bytes2: "bytes2";
            Bytes20: "bytes20";
            Bytes21: "bytes21";
            Bytes22: "bytes22";
            Bytes23: "bytes23";
            Bytes24: "bytes24";
            Bytes25: "bytes25";
            Bytes26: "bytes26";
            Bytes27: "bytes27";
            Bytes28: "bytes28";
            Bytes29: "bytes29";
            Bytes3: "bytes3";
            Bytes30: "bytes30";
            Bytes31: "bytes31";
            Bytes32: "bytes32";
            Bytes4: "bytes4";
            Bytes5: "bytes5";
            Bytes6: "bytes6";
            Bytes7: "bytes7";
            Bytes8: "bytes8";
            Bytes9: "bytes9";
            Int128: "int128";
            Int16: "int16";
            Int24: "int24";
            Int256: "int256";
            Int32: "int32";
            Int56: "int56";
            Int64: "int64";
            Int8: "int8";
            String: "string";
            Tuple: "tuple";
            Uint128: "uint128";
            Uint16: "uint16";
            Uint160: "uint160";
            Uint256: "uint256";
            Uint32: "uint32";
            Uint64: "uint64";
            Uint8: "uint8";
        } = ...

        Type declaration

        • Readonly Address: "address"
        • Readonly Array: "array"
        • Readonly Bool: "bool"
        • Readonly Bytes: "bytes"
        • Readonly Bytes1: "bytes1"
        • Readonly Bytes10: "bytes10"
        • Readonly Bytes11: "bytes11"
        • Readonly Bytes12: "bytes12"
        • Readonly Bytes13: "bytes13"
        • Readonly Bytes14: "bytes14"
        • Readonly Bytes15: "bytes15"
        • Readonly Bytes16: "bytes16"
        • Readonly Bytes17: "bytes17"
        • Readonly Bytes18: "bytes18"
        • Readonly Bytes19: "bytes19"
        • Readonly Bytes2: "bytes2"
        • Readonly Bytes20: "bytes20"
        • Readonly Bytes21: "bytes21"
        • Readonly Bytes22: "bytes22"
        • Readonly Bytes23: "bytes23"
        • Readonly Bytes24: "bytes24"
        • Readonly Bytes25: "bytes25"
        • Readonly Bytes26: "bytes26"
        • Readonly Bytes27: "bytes27"
        • Readonly Bytes28: "bytes28"
        • Readonly Bytes29: "bytes29"
        • Readonly Bytes3: "bytes3"
        • Readonly Bytes30: "bytes30"
        • Readonly Bytes31: "bytes31"
        • Readonly Bytes32: "bytes32"
        • Readonly Bytes4: "bytes4"
        • Readonly Bytes5: "bytes5"
        • Readonly Bytes6: "bytes6"
        • Readonly Bytes7: "bytes7"
        • Readonly Bytes8: "bytes8"
        • Readonly Bytes9: "bytes9"
        • Readonly Int128: "int128"
        • Readonly Int16: "int16"
        • Readonly Int24: "int24"
        • Readonly Int256: "int256"
        • Readonly Int32: "int32"
        • Readonly Int56: "int56"
        • Readonly Int64: "int64"
        • Readonly Int8: "int8"
        • Readonly String: "string"
        • Readonly Tuple: "tuple"
        • Readonly Uint128: "uint128"
        • Readonly Uint16: "uint16"
        • Readonly Uint160: "uint160"
        • Readonly Uint256: "uint256"
        • Readonly Uint32: "uint32"
        • Readonly Uint64: "uint64"
        • Readonly Uint8: "uint8"
        \ No newline at end of file diff --git a/docs/variables/client_api.SponsoredSendStatusEnum-1.html b/docs/variables/client_api.SponsoredSendStatusEnum-1.html new file mode 100644 index 00000000..119c7e4f --- /dev/null +++ b/docs/variables/client_api.SponsoredSendStatusEnum-1.html @@ -0,0 +1 @@ +SponsoredSendStatusEnum | @coinbase/coinbase-sdk

        Variable SponsoredSendStatusEnumConst

        SponsoredSendStatusEnum: {
            Complete: "complete";
            Failed: "failed";
            Pending: "pending";
            Signed: "signed";
            Submitted: "submitted";
        } = ...

        Type declaration

        • Readonly Complete: "complete"
        • Readonly Failed: "failed"
        • Readonly Pending: "pending"
        • Readonly Signed: "signed"
        • Readonly Submitted: "submitted"
        \ No newline at end of file diff --git a/docs/variables/client_api.StakingOperationStatusEnum-1.html b/docs/variables/client_api.StakingOperationStatusEnum-1.html new file mode 100644 index 00000000..621318f4 --- /dev/null +++ b/docs/variables/client_api.StakingOperationStatusEnum-1.html @@ -0,0 +1 @@ +StakingOperationStatusEnum | @coinbase/coinbase-sdk

        Variable StakingOperationStatusEnumConst

        StakingOperationStatusEnum: {
            Complete: "complete";
            Failed: "failed";
            Initialized: "initialized";
            Unspecified: "unspecified";
        } = ...

        Type declaration

        • Readonly Complete: "complete"
        • Readonly Failed: "failed"
        • Readonly Initialized: "initialized"
        • Readonly Unspecified: "unspecified"
        \ No newline at end of file diff --git a/docs/variables/client_api.StakingRewardStateEnum-1.html b/docs/variables/client_api.StakingRewardStateEnum-1.html index 2425fb76..1c6b6daa 100644 --- a/docs/variables/client_api.StakingRewardStateEnum-1.html +++ b/docs/variables/client_api.StakingRewardStateEnum-1.html @@ -1 +1 @@ -StakingRewardStateEnum | @coinbase/coinbase-sdk

        Variable StakingRewardStateEnumConst

        StakingRewardStateEnum: {
            Distributed: "distributed";
            Pending: "pending";
        } = ...

        Type declaration

        • Readonly Distributed: "distributed"
        • Readonly Pending: "pending"
        \ No newline at end of file +StakingRewardStateEnum | @coinbase/coinbase-sdk

        Variable StakingRewardStateEnumConst

        StakingRewardStateEnum: {
            Distributed: "distributed";
            Pending: "pending";
        } = ...

        Type declaration

        • Readonly Distributed: "distributed"
        • Readonly Pending: "pending"
        \ No newline at end of file diff --git a/docs/variables/client_api.TransactionStatusEnum-1.html b/docs/variables/client_api.TransactionStatusEnum-1.html index 88ea2b73..de535668 100644 --- a/docs/variables/client_api.TransactionStatusEnum-1.html +++ b/docs/variables/client_api.TransactionStatusEnum-1.html @@ -1 +1 @@ -TransactionStatusEnum | @coinbase/coinbase-sdk

        Variable TransactionStatusEnumConst

        TransactionStatusEnum: {
            Broadcast: "broadcast";
            Complete: "complete";
            Failed: "failed";
            Pending: "pending";
        } = ...

        Type declaration

        • Readonly Broadcast: "broadcast"
        • Readonly Complete: "complete"
        • Readonly Failed: "failed"
        • Readonly Pending: "pending"
        \ No newline at end of file +TransactionStatusEnum | @coinbase/coinbase-sdk

        Variable TransactionStatusEnumConst

        TransactionStatusEnum: {
            Broadcast: "broadcast";
            Complete: "complete";
            Failed: "failed";
            Pending: "pending";
            Signed: "signed";
            Unspecified: "unspecified";
        } = ...

        Type declaration

        • Readonly Broadcast: "broadcast"
        • Readonly Complete: "complete"
        • Readonly Failed: "failed"
        • Readonly Pending: "pending"
        • Readonly Signed: "signed"
        • Readonly Unspecified: "unspecified"
        \ No newline at end of file diff --git a/docs/variables/client_api.TransferStatusEnum-1.html b/docs/variables/client_api.TransferStatusEnum-1.html deleted file mode 100644 index bdab848c..00000000 --- a/docs/variables/client_api.TransferStatusEnum-1.html +++ /dev/null @@ -1 +0,0 @@ -TransferStatusEnum | @coinbase/coinbase-sdk
        TransferStatusEnum: {
            Broadcast: "broadcast";
            Complete: "complete";
            Failed: "failed";
            Pending: "pending";
        } = ...

        Type declaration

        • Readonly Broadcast: "broadcast"
        • Readonly Complete: "complete"
        • Readonly Failed: "failed"
        • Readonly Pending: "pending"
        \ No newline at end of file diff --git a/docs/variables/client_api.UserOperationStatusEnum-1.html b/docs/variables/client_api.UserOperationStatusEnum-1.html new file mode 100644 index 00000000..ec7fbf2f --- /dev/null +++ b/docs/variables/client_api.UserOperationStatusEnum-1.html @@ -0,0 +1 @@ +UserOperationStatusEnum | @coinbase/coinbase-sdk

        Variable UserOperationStatusEnumConst

        UserOperationStatusEnum: {
            Broadcast: "broadcast";
            Complete: "complete";
            Failed: "failed";
            Pending: "pending";
            Signed: "signed";
        } = ...

        Type declaration

        • Readonly Broadcast: "broadcast"
        • Readonly Complete: "complete"
        • Readonly Failed: "failed"
        • Readonly Pending: "pending"
        • Readonly Signed: "signed"
        \ No newline at end of file diff --git a/docs/variables/client_api.WalletServerSignerStatusEnum-1.html b/docs/variables/client_api.WalletServerSignerStatusEnum-1.html index fbf7d88a..944eb720 100644 --- a/docs/variables/client_api.WalletServerSignerStatusEnum-1.html +++ b/docs/variables/client_api.WalletServerSignerStatusEnum-1.html @@ -1 +1 @@ -WalletServerSignerStatusEnum | @coinbase/coinbase-sdk

        Variable WalletServerSignerStatusEnumConst

        WalletServerSignerStatusEnum: {
            ActiveSeed: "active_seed";
            PendingSeedCreation: "pending_seed_creation";
        } = ...

        Type declaration

        • Readonly ActiveSeed: "active_seed"
        • Readonly PendingSeedCreation: "pending_seed_creation"
        \ No newline at end of file +WalletServerSignerStatusEnum | @coinbase/coinbase-sdk

        Variable WalletServerSignerStatusEnumConst

        WalletServerSignerStatusEnum: {
            ActiveSeed: "active_seed";
            PendingSeedCreation: "pending_seed_creation";
        } = ...

        Type declaration

        • Readonly ActiveSeed: "active_seed"
        • Readonly PendingSeedCreation: "pending_seed_creation"
        \ No newline at end of file diff --git a/docs/variables/client_base.BASE_PATH.html b/docs/variables/client_base.BASE_PATH.html index 619b88d4..6fea6a4b 100644 --- a/docs/variables/client_base.BASE_PATH.html +++ b/docs/variables/client_base.BASE_PATH.html @@ -1 +1 @@ -BASE_PATH | @coinbase/coinbase-sdk
        BASE_PATH: string = ...
        \ No newline at end of file +BASE_PATH | @coinbase/coinbase-sdk
        BASE_PATH: string = ...
        \ No newline at end of file diff --git a/docs/variables/client_base.COLLECTION_FORMATS.html b/docs/variables/client_base.COLLECTION_FORMATS.html index 5e645cdc..b7bcccc5 100644 --- a/docs/variables/client_base.COLLECTION_FORMATS.html +++ b/docs/variables/client_base.COLLECTION_FORMATS.html @@ -1 +1 @@ -COLLECTION_FORMATS | @coinbase/coinbase-sdk
        COLLECTION_FORMATS: {
            csv: string;
            pipes: string;
            ssv: string;
            tsv: string;
        } = ...

        Type declaration

        • csv: string
        • pipes: string
        • ssv: string
        • tsv: string

        Export

        \ No newline at end of file +COLLECTION_FORMATS | @coinbase/coinbase-sdk
        COLLECTION_FORMATS: {
            csv: string;
            pipes: string;
            ssv: string;
            tsv: string;
        } = ...

        Type declaration

        • csv: string
        • pipes: string
        • ssv: string
        • tsv: string

        Export

        \ No newline at end of file diff --git a/docs/variables/client_base.operationServerMap.html b/docs/variables/client_base.operationServerMap.html index a9fc3492..3d80bd77 100644 --- a/docs/variables/client_base.operationServerMap.html +++ b/docs/variables/client_base.operationServerMap.html @@ -1 +1 @@ -operationServerMap | @coinbase/coinbase-sdk
        operationServerMap: ServerMap = {}

        Export

        \ No newline at end of file +operationServerMap | @coinbase/coinbase-sdk
        operationServerMap: ServerMap = {}

        Export

        \ No newline at end of file diff --git a/docs/variables/client_common.DUMMY_BASE_URL.html b/docs/variables/client_common.DUMMY_BASE_URL.html index b8907007..0bdf41d4 100644 --- a/docs/variables/client_common.DUMMY_BASE_URL.html +++ b/docs/variables/client_common.DUMMY_BASE_URL.html @@ -1 +1 @@ -DUMMY_BASE_URL | @coinbase/coinbase-sdk
        DUMMY_BASE_URL: "https://example.com" = 'https://example.com'

        Export

        \ No newline at end of file +DUMMY_BASE_URL | @coinbase/coinbase-sdk
        DUMMY_BASE_URL: "https://example.com" = 'https://example.com'

        Export

        \ No newline at end of file diff --git a/docs/variables/coinbase_constants.ATOMIC_UNITS_PER_USDC.html b/docs/variables/coinbase_constants.ATOMIC_UNITS_PER_USDC.html deleted file mode 100644 index d547efed..00000000 --- a/docs/variables/coinbase_constants.ATOMIC_UNITS_PER_USDC.html +++ /dev/null @@ -1 +0,0 @@ -ATOMIC_UNITS_PER_USDC | @coinbase/coinbase-sdk
        ATOMIC_UNITS_PER_USDC: Decimal = ...
        \ No newline at end of file diff --git a/docs/variables/coinbase_constants.GWEI_DECIMALS.html b/docs/variables/coinbase_constants.GWEI_DECIMALS.html index e3e96ce9..2cc236ad 100644 --- a/docs/variables/coinbase_constants.GWEI_DECIMALS.html +++ b/docs/variables/coinbase_constants.GWEI_DECIMALS.html @@ -1 +1 @@ -GWEI_DECIMALS | @coinbase/coinbase-sdk
        GWEI_DECIMALS: 9 = 9
        \ No newline at end of file +GWEI_DECIMALS | @coinbase/coinbase-sdk
        GWEI_DECIMALS: 9 = 9
        \ No newline at end of file diff --git a/docs/variables/coinbase_constants.WEI_PER_ETHER.html b/docs/variables/coinbase_constants.WEI_PER_ETHER.html deleted file mode 100644 index 7c46ca12..00000000 --- a/docs/variables/coinbase_constants.WEI_PER_ETHER.html +++ /dev/null @@ -1 +0,0 @@ -WEI_PER_ETHER | @coinbase/coinbase-sdk
        WEI_PER_ETHER: Decimal = ...
        \ No newline at end of file diff --git a/docs/variables/types_chain.CHAIN_ID_TO_NETWORK_ID.html b/docs/variables/types_chain.CHAIN_ID_TO_NETWORK_ID.html new file mode 100644 index 00000000..fb2ffe88 --- /dev/null +++ b/docs/variables/types_chain.CHAIN_ID_TO_NETWORK_ID.html @@ -0,0 +1,2 @@ +CHAIN_ID_TO_NETWORK_ID | @coinbase/coinbase-sdk

        Variable CHAIN_ID_TO_NETWORK_IDConst

        CHAIN_ID_TO_NETWORK_ID: {
            8453: "base-mainnet";
            84532: "base-sepolia";
        } = ...

        Maps chain IDs to their corresponding Coinbase network IDs. Only SmartWallet related chains are listed here right now.

        +

        Type declaration

        • Readonly 8453: "base-mainnet"
        • Readonly 84532: "base-sepolia"
        \ No newline at end of file diff --git a/jest.config.js b/jest.config.js index 9f264eae..d594a723 100644 --- a/jest.config.js +++ b/jest.config.js @@ -2,18 +2,19 @@ module.exports = { preset: "ts-jest", testEnvironment: "node", extensionsToTreatAsEsm: [".ts"], - coveragePathIgnorePatterns: ["node_modules", "client", "__tests__"], + testMatch: ["**/src/**/*.test.ts", "**/src/tests/**/*.ts"], + coveragePathIgnorePatterns: ["node_modules", "client", "__tests__", "/src/tests/"], collectCoverage: true, - collectCoverageFrom: ["./src/coinbase/**"], + collectCoverageFrom: ["./src/**/*.ts"], coverageReporters: ["html"], verbose: true, maxWorkers: 1, coverageThreshold: { - "./src/coinbase/**": { - branches: 80, - functions: 90, - statements: 95, - lines: 95, + "./src/**/*.ts": { + branches: 75, + functions: 85, + statements: 85, + lines: 85, }, }, }; diff --git a/package-lock.json b/package-lock.json index 9e1a0381..f715ac1f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,29 +1,32 @@ { "name": "@coinbase/coinbase-sdk", - "version": "0.0.8", + "version": "0.25.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@coinbase/coinbase-sdk", - "version": "0.0.8", + "version": "0.25.0", "license": "ISC", "dependencies": { "@scure/bip32": "^1.4.0", + "abitype": "^1.0.6", "axios": "^1.6.8", "axios-mock-adapter": "^1.22.0", + "axios-retry": "^4.4.1", "bip32": "^4.0.0", "bip39": "^3.1.0", "decimal.js": "^10.4.3", "dotenv": "^16.4.5", + "ed2curve": "^0.3.0", "ethers": "^6.12.1", - "node-jose": "^2.2.0", - "secp256k1": "^5.0.0" + "jose": "^5.10.0", + "secp256k1": "^5.0.0", + "viem": "^2.21.26" }, "devDependencies": { "@types/jest": "^29.5.12", "@types/node": "^20.12.11", - "@types/node-jose": "^1.1.13", "@types/secp256k1": "^4.0.6", "@typescript-eslint/eslint-plugin": "^7.8.0", "@typescript-eslint/parser": "^7.8.0", @@ -36,6 +39,7 @@ "prettier": "^3.2.5", "ts-jest": "^29.1.2", "ts-node": "^10.9.2", + "tsd": "^0.31.2", "typedoc": "^0.25.13", "typescript": "^5.4.5" } @@ -43,13 +47,15 @@ "node_modules/@adraffy/ens-normalize": { "version": "1.10.1", "resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.10.1.tgz", - "integrity": "sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw==" + "integrity": "sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw==", + "license": "MIT" }, "node_modules/@ampproject/remapping": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", "dev": true, + "license": "Apache-2.0", "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.24" @@ -59,12 +65,14 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.24.2", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz", - "integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", + "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/highlight": "^7.24.2", + "@babel/helper-validator-identifier": "^7.25.9", + "js-tokens": "^4.0.0", "picocolors": "^1.0.0" }, "engines": { @@ -72,30 +80,32 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.4.tgz", - "integrity": "sha512-vg8Gih2MLK+kOkHJp4gBEIkyaIi00jgWot2D9QOmmfLC8jINSOzmCLta6Bvz/JSBCqnegV0L80jhxkol5GWNfQ==", + "version": "7.26.8", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.8.tgz", + "integrity": "sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.5.tgz", - "integrity": "sha512-tVQRucExLQ02Boi4vdPp49svNGcfL2GhdTCT9aldhXgCJVAI21EtRfBettiuLUwce/7r6bFdgs6JFkcdTiFttA==", + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.9.tgz", + "integrity": "sha512-lWBYIrF7qK5+GjY5Uy+/hEgp8OJWOD/rpy74GplYRhEauvbHDeFB8t5hPOZxCZ0Oxf4Cc36tK51/l3ymJysrKw==", "dev": true, + "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.24.2", - "@babel/generator": "^7.24.5", - "@babel/helper-compilation-targets": "^7.23.6", - "@babel/helper-module-transforms": "^7.24.5", - "@babel/helpers": "^7.24.5", - "@babel/parser": "^7.24.5", - "@babel/template": "^7.24.0", - "@babel/traverse": "^7.24.5", - "@babel/types": "^7.24.5", + "@babel/code-frame": "^7.26.2", + "@babel/generator": "^7.26.9", + "@babel/helper-compilation-targets": "^7.26.5", + "@babel/helper-module-transforms": "^7.26.0", + "@babel/helpers": "^7.26.9", + "@babel/parser": "^7.26.9", + "@babel/template": "^7.26.9", + "@babel/traverse": "^7.26.9", + "@babel/types": "^7.26.9", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -115,34 +125,38 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" } }, "node_modules/@babel/generator": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.5.tgz", - "integrity": "sha512-x32i4hEXvr+iI0NEoEfDKzlemF8AmtOP8CcrRaEcpzysWuoEb1KknpcvMsHKPONoKZiDuItklgWhB18xEhr9PA==", + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.9.tgz", + "integrity": "sha512-kEWdzjOAUMW4hAyrzJ0ZaTOu9OmpyDIQicIh0zg0EEcEkYXZb2TjtBhnHi2ViX7PKwZqF4xwqfAm299/QMP3lg==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.24.5", + "@babel/parser": "^7.26.9", + "@babel/types": "^7.26.9", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", - "jsesc": "^2.5.1" + "jsesc": "^3.0.2" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz", - "integrity": "sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==", + "version": "7.26.5", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.26.5.tgz", + "integrity": "sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.23.5", - "@babel/helper-validator-option": "^7.23.5", - "browserslist": "^4.22.2", + "@babel/compat-data": "^7.26.5", + "@babel/helper-validator-option": "^7.25.9", + "browserslist": "^4.24.0", "lru-cache": "^5.1.1", "semver": "^6.3.1" }, @@ -155,67 +169,35 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" } }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", - "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", - "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", - "dev": true, - "dependencies": { - "@babel/template": "^7.22.15", - "@babel/types": "^7.23.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-module-imports": { - "version": "7.24.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.3.tgz", - "integrity": "sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz", + "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.24.0" + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.5.tgz", - "integrity": "sha512-9GxeY8c2d2mdQUP1Dye0ks3VDyIMS98kt/llQ2nUId8IsWqTF0l1LkSX0/uP7l7MCDrzXS009Hyhe2gzTiGW8A==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz", + "integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-module-imports": "^7.24.3", - "@babel/helper-simple-access": "^7.24.5", - "@babel/helper-split-export-declaration": "^7.24.5", - "@babel/helper-validator-identifier": "^7.24.5" + "@babel/helper-module-imports": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9", + "@babel/traverse": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -225,170 +207,68 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.5.tgz", - "integrity": "sha512-xjNLDopRzW2o6ba0gKbkZq5YWEBaK3PCyTOY1K2P/O07LGMhMqlMXPxwN4S5/RhWuCobT8z0jrlKGlYmeR1OhQ==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.5.tgz", - "integrity": "sha512-uH3Hmf5q5n7n8mz7arjUlDOCbttY/DW4DYhE6FUsjKJ/oYC1kQQUvwEQWxRwUpX9qQKRXeqLwWxrqilMrf32sQ==", - "dev": true, - "dependencies": { - "@babel/types": "^7.24.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.5.tgz", - "integrity": "sha512-5CHncttXohrHk8GWOFCcCl4oRD9fKosWlIRgWm4ql9VYioKm52Mk2xsmoohvm7f3JoiLSM5ZgJuRaf5QZZYd3Q==", + "version": "7.26.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.26.5.tgz", + "integrity": "sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg==", "dev": true, - "dependencies": { - "@babel/types": "^7.24.5" - }, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz", - "integrity": "sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.5.tgz", - "integrity": "sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz", - "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz", + "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.5.tgz", - "integrity": "sha512-CiQmBMMpMQHwM5m01YnrM6imUG1ebgYJ+fAIW4FZe6m4qHTPaRHti+R8cggAwkdz4oXhtO4/K9JWlh+8hIfR2Q==", - "dev": true, - "dependencies": { - "@babel/template": "^7.24.0", - "@babel/traverse": "^7.24.5", - "@babel/types": "^7.24.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.5.tgz", - "integrity": "sha512-8lLmua6AVh/8SLJRRVD6V8p73Hir9w5mJrhE+IPpILG31KKlI9iz5zmBYKcWPS59qSfgP9RaSBQSHHE81WKuEw==", + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.9.tgz", + "integrity": "sha512-Mz/4+y8udxBKdmzt/UjPACs4G3j5SshJJEFFKxlCGPydG4JAHXxjWjAwjd09tf6oINvl1VfMJo+nB7H2YKQ0dA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.24.5", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" + "@babel/template": "^7.26.9", + "@babel/types": "^7.26.9" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "node_modules/@babel/parser": { + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.9.tgz", + "integrity": "sha512-81NWa1njQblgZbQHxWHpxxCzNsa3ZwvFqpUg7P+NNUU6f3UU2jBEg4OlF/J6rl8+PQGh1q6/zWScd001YwcA5A==", "dev": true, + "license": "MIT", "dependencies": { - "has-flag": "^3.0.0" + "@babel/types": "^7.26.9" }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/parser": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.5.tgz", - "integrity": "sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg==", - "dev": true, "bin": { "parser": "bin/babel-parser.js" }, @@ -401,6 +281,7 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -413,6 +294,7 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -425,6 +307,7 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.12.13" }, @@ -432,11 +315,44 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-attributes": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.26.0.tgz", + "integrity": "sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-import-meta": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, @@ -449,6 +365,7 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -457,12 +374,13 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.1.tgz", - "integrity": "sha512-2eCtxZXf+kbkMIsXS4poTvT4Yu5rXiRa+9xGVT56raghjmBTKMpFNc9R4IDiB4emao9eO22Ox7CxuJG7BgExqA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.9.tgz", + "integrity": "sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -476,6 +394,7 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, @@ -488,6 +407,7 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -500,6 +420,7 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, @@ -512,6 +433,7 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -524,6 +446,7 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -536,6 +459,7 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -543,11 +467,28 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-top-level-await": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" }, @@ -559,12 +500,13 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.1.tgz", - "integrity": "sha512-Yhnmvy5HZEnHUty6i++gcfH1/l68AHnItFHnaCv6hn9dNh0hQvvQJsxpi4BMBFN5DLeHBuucT/0DgzXif/OyRw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.9.tgz", + "integrity": "sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -574,33 +516,32 @@ } }, "node_modules/@babel/template": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", - "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.26.9.tgz", + "integrity": "sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.23.5", - "@babel/parser": "^7.24.0", - "@babel/types": "^7.24.0" + "@babel/code-frame": "^7.26.2", + "@babel/parser": "^7.26.9", + "@babel/types": "^7.26.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.5.tgz", - "integrity": "sha512-7aaBLeDQ4zYcUFDUD41lJc1fG8+5IU9DaNSJAgal866FGvmD5EbWQgnEC6kO1gGLsX0esNkfnJSndbTXA3r7UA==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.24.2", - "@babel/generator": "^7.24.5", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.24.5", - "@babel/parser": "^7.24.5", - "@babel/types": "^7.24.5", + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.9.tgz", + "integrity": "sha512-ZYW7L+pL8ahU5fXmNbPF+iZFHCv5scFak7MZ9bwaRPLUhHh7QQEMjZUg0HevihoqCM5iSYHN61EyCoZvqC+bxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.26.2", + "@babel/generator": "^7.26.9", + "@babel/parser": "^7.26.9", + "@babel/template": "^7.26.9", + "@babel/types": "^7.26.9", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -613,19 +554,20 @@ "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/@babel/types": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.5.tgz", - "integrity": "sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ==", + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.9.tgz", + "integrity": "sha512-Y3IR1cRnOxOCDvMmNiym7XpXQ93iGDDPHx+Zj+NM+rg0fBaShfQLkg+hKPaZCEvg5N/LeCo4+Rj/i3FuJsIQaw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.24.1", - "@babel/helper-validator-identifier": "^7.24.5", - "to-fast-properties": "^2.0.0" + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -635,13 +577,15 @@ "version": "0.2.3", "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", "dev": true, + "license": "MIT", "dependencies": { "@jridgewell/trace-mapping": "0.3.9" }, @@ -654,22 +598,21 @@ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", "dev": true, + "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" } }, "node_modules/@es-joy/jsdoccomment": { - "version": "0.43.0", - "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.43.0.tgz", - "integrity": "sha512-Q1CnsQrytI3TlCB1IVWXWeqUIPGVEKGaE7IbVdt13Nq/3i0JESAkQQERrfiQkmlpijl+++qyqPgaS31Bvc1jRQ==", + "version": "0.46.0", + "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.46.0.tgz", + "integrity": "sha512-C3Axuq1xd/9VqFZpW4YAzOx5O9q/LP46uIQy/iNDpHG3fmPa6TBtvfglMCs3RBiBxAIi0Go97r8+jvTt55XMyQ==", "dev": true, + "license": "MIT", "dependencies": { - "@types/eslint": "^8.56.5", - "@types/estree": "^1.0.5", - "@typescript-eslint/types": "^7.2.0", "comment-parser": "1.4.1", - "esquery": "^1.5.0", + "esquery": "^1.6.0", "jsdoc-type-pratt-parser": "~4.0.0" }, "engines": { @@ -677,25 +620,30 @@ } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", + "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", "dev": true, + "license": "MIT", "dependencies": { - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.3" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, + "funding": { + "url": "https://opencollective.com/eslint" + }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, "node_modules/@eslint-community/regexpp": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", - "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", "dev": true, + "license": "MIT", "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } @@ -705,6 +653,7 @@ "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, + "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", @@ -728,6 +677,7 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -738,6 +688,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -746,21 +697,24 @@ } }, "node_modules/@eslint/js": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", "dev": true, + "license": "MIT", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", + "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", + "deprecated": "Use @eslint/config-array instead", "dev": true, + "license": "Apache-2.0", "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", + "@humanwhocodes/object-schema": "^2.0.3", "debug": "^4.3.1", "minimatch": "^3.0.5" }, @@ -773,6 +727,7 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -783,6 +738,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -795,6 +751,7 @@ "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=12.22" }, @@ -807,13 +764,16 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", - "dev": true + "deprecated": "Use @eslint/object-schema instead", + "dev": true, + "license": "BSD-3-Clause" }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", "dev": true, + "license": "ISC", "dependencies": { "camelcase": "^5.3.1", "find-up": "^4.1.0", @@ -830,6 +790,7 @@ "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, + "license": "MIT", "dependencies": { "sprintf-js": "~1.0.2" } @@ -839,6 +800,7 @@ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, + "license": "MIT", "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -852,6 +814,7 @@ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, + "license": "MIT", "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -865,6 +828,7 @@ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, + "license": "MIT", "dependencies": { "p-locate": "^4.1.0" }, @@ -877,6 +841,7 @@ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, + "license": "MIT", "dependencies": { "p-try": "^2.0.0" }, @@ -892,6 +857,7 @@ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, + "license": "MIT", "dependencies": { "p-limit": "^2.2.0" }, @@ -904,6 +870,7 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -913,6 +880,7 @@ "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -922,6 +890,7 @@ "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", "dev": true, + "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", "@types/node": "*", @@ -939,6 +908,7 @@ "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", "dev": true, + "license": "MIT", "dependencies": { "@jest/console": "^29.7.0", "@jest/reporters": "^29.7.0", @@ -986,6 +956,7 @@ "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", "dev": true, + "license": "MIT", "dependencies": { "@jest/fake-timers": "^29.7.0", "@jest/types": "^29.6.3", @@ -1001,6 +972,7 @@ "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", "dev": true, + "license": "MIT", "dependencies": { "expect": "^29.7.0", "jest-snapshot": "^29.7.0" @@ -1014,6 +986,7 @@ "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", "dev": true, + "license": "MIT", "dependencies": { "jest-get-type": "^29.6.3" }, @@ -1026,6 +999,7 @@ "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", "dev": true, + "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", "@sinonjs/fake-timers": "^10.0.2", @@ -1043,6 +1017,7 @@ "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", "dev": true, + "license": "MIT", "dependencies": { "@jest/environment": "^29.7.0", "@jest/expect": "^29.7.0", @@ -1058,6 +1033,7 @@ "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", "dev": true, + "license": "MIT", "dependencies": { "@bcoe/v8-coverage": "^0.2.3", "@jest/console": "^29.7.0", @@ -1101,6 +1077,7 @@ "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", "dev": true, + "license": "MIT", "dependencies": { "@sinclair/typebox": "^0.27.8" }, @@ -1113,6 +1090,7 @@ "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", "dev": true, + "license": "MIT", "dependencies": { "@jridgewell/trace-mapping": "^0.3.18", "callsites": "^3.0.0", @@ -1127,6 +1105,7 @@ "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", "dev": true, + "license": "MIT", "dependencies": { "@jest/console": "^29.7.0", "@jest/types": "^29.6.3", @@ -1142,6 +1121,7 @@ "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", "dev": true, + "license": "MIT", "dependencies": { "@jest/test-result": "^29.7.0", "graceful-fs": "^4.2.9", @@ -1157,6 +1137,7 @@ "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", "dev": true, + "license": "MIT", "dependencies": { "@babel/core": "^7.11.6", "@jest/types": "^29.6.3", @@ -1183,6 +1164,7 @@ "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", "dev": true, + "license": "MIT", "dependencies": { "@jest/schemas": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", @@ -1196,10 +1178,11 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", + "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", "dev": true, + "license": "MIT", "dependencies": { "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -1214,6 +1197,7 @@ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.0.0" } @@ -1223,43 +1207,51 @@ "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true, + "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.25", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, + "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "node_modules/@noble/curves": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.0.tgz", - "integrity": "sha512-p+4cb332SFCrReJkCYe8Xzm0OWi4Jji5jVdIZRL/PmacmDkFNw6MrrV+gGpiPxLHbV+zKFRywUWbaseT+tZRXg==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.8.1.tgz", + "integrity": "sha512-warwspo+UYUPep0Q+vtdVB4Ugn8GGQj8iyB3gnRWsztmUHTI3S1nhdiWNsPUGL0vud7JlRRk1XEu7Lq1KGTnMQ==", + "license": "MIT", "dependencies": { - "@noble/hashes": "1.4.0" + "@noble/hashes": "1.7.1" + }, + "engines": { + "node": "^14.21.3 || >=16" }, "funding": { "url": "https://paulmillr.com/funding/" } }, "node_modules/@noble/hashes": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", - "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.7.1.tgz", + "integrity": "sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ==", + "license": "MIT", "engines": { - "node": ">= 16" + "node": "^14.21.3 || >=16" }, "funding": { "url": "https://paulmillr.com/funding/" @@ -1270,6 +1262,7 @@ "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, + "license": "MIT", "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -1283,6 +1276,7 @@ "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, + "license": "MIT", "engines": { "node": ">= 8" } @@ -1292,6 +1286,7 @@ "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, + "license": "MIT", "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -1305,6 +1300,7 @@ "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", "dev": true, + "license": "MIT", "engines": { "node": "^12.20.0 || ^14.18.0 || >=16.0.0" }, @@ -1313,21 +1309,36 @@ } }, "node_modules/@scure/base": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.6.tgz", - "integrity": "sha512-ok9AWwhcgYuGG3Zfhyqg+zwl+Wn5uE+dwC0NV/2qQkx4dABbb/bx96vWu8NSj+BNjjSjno+JRYRjle1jV08k3g==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.4.tgz", + "integrity": "sha512-5Yy9czTO47mqz+/J8GM6GIId4umdCk1wc1q8rKERQulIoc8VP9pzDcghv10Tl2E7R96ZUx/PhND3ESYUQX8NuQ==", + "license": "MIT", "funding": { "url": "https://paulmillr.com/funding/" } }, "node_modules/@scure/bip32": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", - "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.6.2.tgz", + "integrity": "sha512-t96EPDMbtGgtb7onKKqxRLfE5g05k7uHnHRM2xdE6BP/ZmxaLtPek4J4KfVn/90IQNrU1IOAqMgiDtUdtbe3nw==", + "license": "MIT", + "dependencies": { + "@noble/curves": "~1.8.1", + "@noble/hashes": "~1.7.1", + "@scure/base": "~1.2.2" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip39": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.5.4.tgz", + "integrity": "sha512-TFM4ni0vKvCfBpohoh+/lY05i9gRbSwXWngAsF4CABQxoaOHijxuaZ2R6cStDQ5CHtHO9aGJTr4ksVJASRRyMA==", + "license": "MIT", "dependencies": { - "@noble/curves": "~1.4.0", - "@noble/hashes": "~1.4.0", - "@scure/base": "~1.1.6" + "@noble/hashes": "~1.7.1", + "@scure/base": "~1.2.4" }, "funding": { "url": "https://paulmillr.com/funding/" @@ -1337,13 +1348,15 @@ "version": "0.27.8", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@sinonjs/commons": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "type-detect": "4.0.8" } @@ -1353,6 +1366,7 @@ "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "@sinonjs/commons": "^3.0.0" } @@ -1361,31 +1375,46 @@ "version": "1.0.11", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@tsconfig/node12": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@tsconfig/node14": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@tsconfig/node16": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", - "dev": true + "dev": true, + "license": "MIT" + }, + "node_modules/@tsd/typescript": { + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/@tsd/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-saiCxzHRhUrRxQV2JhH580aQUZiKQUXI38FcAcikcfOomAil4G4lxT0RfrrKywoAYP/rqAdYXYmNRLppcd+hQQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.17" + } }, "node_modules/@types/babel__core": { "version": "7.20.5", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", "dev": true, + "license": "MIT", "dependencies": { "@babel/parser": "^7.20.7", "@babel/types": "^7.20.7", @@ -1399,6 +1428,7 @@ "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", "dev": true, + "license": "MIT", "dependencies": { "@babel/types": "^7.0.0" } @@ -1408,41 +1438,48 @@ "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", "dev": true, + "license": "MIT", "dependencies": { "@babel/parser": "^7.1.0", "@babel/types": "^7.0.0" } }, "node_modules/@types/babel__traverse": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.5.tgz", - "integrity": "sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ==", + "version": "7.20.6", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.6.tgz", + "integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==", "dev": true, + "license": "MIT", "dependencies": { "@babel/types": "^7.20.7" } }, "node_modules/@types/eslint": { - "version": "8.56.10", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.10.tgz", - "integrity": "sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ==", + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", + "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", "dev": true, + "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@types/estree": "*", "@types/json-schema": "*" } }, "node_modules/@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", - "dev": true + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "dev": true, + "license": "MIT" }, "node_modules/@types/graceful-fs": { "version": "4.1.9", "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*" } @@ -1451,13 +1488,15 @@ "version": "2.0.6", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/istanbul-lib-report": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", "dev": true, + "license": "MIT", "dependencies": { "@types/istanbul-lib-coverage": "*" } @@ -1467,15 +1506,17 @@ "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", "dev": true, + "license": "MIT", "dependencies": { "@types/istanbul-lib-report": "*" } }, "node_modules/@types/jest": { - "version": "29.5.12", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.12.tgz", - "integrity": "sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==", + "version": "29.5.14", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.14.tgz", + "integrity": "sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==", "dev": true, + "license": "MIT", "dependencies": { "expect": "^29.0.0", "pretty-format": "^29.0.0" @@ -1485,52 +1526,56 @@ "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true + "dev": true, + "license": "MIT" + }, + "node_modules/@types/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==", + "dev": true, + "license": "MIT" }, "node_modules/@types/node": { - "version": "20.12.11", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.11.tgz", - "integrity": "sha512-vDg9PZ/zi+Nqp6boSOT7plNuthRugEKixDv5sFTIpkE89MmNtEArAShI4mxuX2+UrLEe9pxC1vm2cjm9YlWbJw==", + "version": "20.17.19", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.19.tgz", + "integrity": "sha512-LEwC7o1ifqg/6r2gn9Dns0f1rhK+fPFDoMiceTJ6kWmVk6bgXBI/9IOWfVan4WiAavK9pIVWdX0/e3J+eEUh5A==", "dev": true, + "license": "MIT", "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~6.19.2" } }, - "node_modules/@types/node-jose": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/@types/node-jose/-/node-jose-1.1.13.tgz", - "integrity": "sha512-QjMd4yhwy1EvSToQn0YI3cD29YhyfxFwj7NecuymjLys2/P0FwxWnkgBlFxCai6Y3aBCe7rbwmqwJJawxlgcXw==", + "node_modules/@types/normalize-package-data": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", + "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", "dev": true, - "dependencies": { - "@types/node": "*" - } + "license": "MIT" }, "node_modules/@types/secp256k1": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.6.tgz", "integrity": "sha512-hHxJU6PAEUn0TP4S/ZOzuTUvJWuZ6eIKeNKb5RBpODvSl6hp1Wrw4s7ATY50rklRCScUDpHzVA/DQdSjJ3UoYQ==", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*" } }, - "node_modules/@types/semver": { - "version": "7.5.8", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", - "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", - "dev": true - }, "node_modules/@types/stack-utils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "version": "17.0.33", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", + "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", "dev": true, + "license": "MIT", "dependencies": { "@types/yargs-parser": "*" } @@ -1539,24 +1584,24 @@ "version": "21.0.3", "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.8.0.tgz", - "integrity": "sha512-gFTT+ezJmkwutUPmB0skOj3GZJtlEGnlssems4AjkVweUPGj7jRwwqg0Hhg7++kPGJqKtTYx+R05Ftww372aIg==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.18.0.tgz", + "integrity": "sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==", "dev": true, + "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "7.8.0", - "@typescript-eslint/type-utils": "7.8.0", - "@typescript-eslint/utils": "7.8.0", - "@typescript-eslint/visitor-keys": "7.8.0", - "debug": "^4.3.4", + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/type-utils": "7.18.0", + "@typescript-eslint/utils": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", - "semver": "^7.6.0", "ts-api-utils": "^1.3.0" }, "engines": { @@ -1577,15 +1622,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.8.0.tgz", - "integrity": "sha512-KgKQly1pv0l4ltcftP59uQZCi4HUYswCLbTqVZEJu7uLX8CTLyswqMLqLN+2QFz4jCptqWVV4SB7vdxcH2+0kQ==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.18.0.tgz", + "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/scope-manager": "7.8.0", - "@typescript-eslint/types": "7.8.0", - "@typescript-eslint/typescript-estree": "7.8.0", - "@typescript-eslint/visitor-keys": "7.8.0", + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/typescript-estree": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", "debug": "^4.3.4" }, "engines": { @@ -1605,13 +1651,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.8.0.tgz", - "integrity": "sha512-viEmZ1LmwsGcnr85gIq+FCYI7nO90DVbE37/ll51hjv9aG+YZMb4WDE2fyWpUR4O/UrhGRpYXK/XajcGTk2B8g==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", + "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/types": "7.8.0", - "@typescript-eslint/visitor-keys": "7.8.0" + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -1622,13 +1669,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.8.0.tgz", - "integrity": "sha512-H70R3AefQDQpz9mGv13Uhi121FNMh+WEaRqcXTX09YEDky21km4dV1ZXJIp8QjXc4ZaVkXVdohvWDzbnbHDS+A==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.18.0.tgz", + "integrity": "sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "7.8.0", - "@typescript-eslint/utils": "7.8.0", + "@typescript-eslint/typescript-estree": "7.18.0", + "@typescript-eslint/utils": "7.18.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -1649,10 +1697,11 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.8.0.tgz", - "integrity": "sha512-wf0peJ+ZGlcH+2ZS23aJbOv+ztjeeP8uQ9GgwMJGVLx/Nj9CJt17GWgWWoSmoRVKAX2X+7fzEnAjxdvK2gqCLw==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", + "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", "dev": true, + "license": "MIT", "engines": { "node": "^18.18.0 || >=20.0.0" }, @@ -1662,13 +1711,14 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.8.0.tgz", - "integrity": "sha512-5pfUCOwK5yjPaJQNy44prjCwtr981dO8Qo9J9PwYXZ0MosgAbfEMB008dJ5sNo3+/BN6ytBPuSvXUg9SAqB0dg==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", + "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "7.8.0", - "@typescript-eslint/visitor-keys": "7.8.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -1690,18 +1740,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.8.0.tgz", - "integrity": "sha512-L0yFqOCflVqXxiZyXrDr80lnahQfSOfc9ELAAZ75sqicqp2i36kEZZGuUymHNFoYOqxRT05up760b4iGsl02nQ==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.18.0.tgz", + "integrity": "sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==", "dev": true, + "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@types/json-schema": "^7.0.15", - "@types/semver": "^7.5.8", - "@typescript-eslint/scope-manager": "7.8.0", - "@typescript-eslint/types": "7.8.0", - "@typescript-eslint/typescript-estree": "7.8.0", - "semver": "^7.6.0" + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/typescript-estree": "7.18.0" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -1715,12 +1763,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.8.0.tgz", - "integrity": "sha512-q4/gibTNBQNA0lGyYQCmWRS5D15n8rXh4QjK3KV+MBPlTYHpfBUT3D3PaPR/HeNiI9W6R7FvlkcGhNyAoP+caA==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", + "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/types": "7.8.0", + "@typescript-eslint/types": "7.18.0", "eslint-visitor-keys": "^3.4.3" }, "engines": { @@ -1732,16 +1781,39 @@ } }, "node_modules/@ungap/structured-clone": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", - "dev": true + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", + "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==", + "dev": true, + "license": "ISC" + }, + "node_modules/abitype": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/abitype/-/abitype-1.0.8.tgz", + "integrity": "sha512-ZeiI6h3GnW06uYDLx0etQtX/p8E24UaHHBj57RSjK7YBFe7iuVn07EDpOeP451D06sF27VOz9JJPlIKJmXgkEg==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/wevm" + }, + "peerDependencies": { + "typescript": ">=5.0.4", + "zod": "^3 >=3.22.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + }, + "zod": { + "optional": true + } + } }, "node_modules/acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", "dev": true, + "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -1754,15 +1826,20 @@ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, + "license": "MIT", "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "node_modules/acorn-walk": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz", - "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==", + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.11.0" + }, "engines": { "node": ">=0.4.0" } @@ -1770,13 +1847,15 @@ "node_modules/aes-js": { "version": "4.0.0-beta.5", "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz", - "integrity": "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==" + "integrity": "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==", + "license": "MIT" }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -1793,6 +1872,7 @@ "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", "dev": true, + "license": "MIT", "dependencies": { "type-fest": "^0.21.3" }, @@ -1808,6 +1888,7 @@ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", "dev": true, + "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -1820,21 +1901,24 @@ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/ansi-sequence-parser": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz", - "integrity": "sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg==", - "dev": true + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.3.tgz", + "integrity": "sha512-+fksAx9eG3Ab6LDnLs3ZqZa8KVJ/jYnX+D4Qe1azX+LFGFAXqynCQLOdLpNYN/l9e7l6hMWwZbrnctqr6eSQSw==", + "dev": true, + "license": "MIT" }, "node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -1850,6 +1934,7 @@ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, + "license": "ISC", "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -1863,6 +1948,7 @@ "resolved": "https://registry.npmjs.org/are-docs-informative/-/are-docs-informative-0.0.2.tgz", "integrity": "sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==", "dev": true, + "license": "MIT", "engines": { "node": ">=14" } @@ -1871,32 +1957,54 @@ "version": "4.1.3", "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true + "dev": true, + "license": "Python-2.0" }, "node_modules/array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, + "node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "dev": true, + "license": "MIT" + }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" }, "node_modules/axios": { - "version": "1.6.8", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz", - "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", + "version": "1.7.9", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz", + "integrity": "sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==", + "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", @@ -1907,6 +2015,7 @@ "version": "1.22.0", "resolved": "https://registry.npmjs.org/axios-mock-adapter/-/axios-mock-adapter-1.22.0.tgz", "integrity": "sha512-dmI0KbkyAhntUR05YY96qg2H6gg0XMl2+qTW0xmYg6Up+BFBAJYRLROMXRdDEL06/Wqwa0TJThAYvFtSFdRCZw==", + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.3", "is-buffer": "^2.0.5" @@ -1915,11 +2024,24 @@ "axios": ">= 0.17.0" } }, + "node_modules/axios-retry": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/axios-retry/-/axios-retry-4.5.0.tgz", + "integrity": "sha512-aR99oXhpEDGo0UuAlYcn2iGRds30k366Zfa05XWScR9QaQD4JYiP3/1Qt1u7YlefUOK+cn0CcwoL1oefavQUlQ==", + "license": "Apache-2.0", + "dependencies": { + "is-retry-allowed": "^2.2.0" + }, + "peerDependencies": { + "axios": "0.x || 1.x" + } + }, "node_modules/babel-jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", "dev": true, + "license": "MIT", "dependencies": { "@jest/transform": "^29.7.0", "@types/babel__core": "^7.1.14", @@ -1941,6 +2063,7 @@ "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "@babel/helper-plugin-utils": "^7.0.0", "@istanbuljs/load-nyc-config": "^1.0.0", @@ -1957,6 +2080,7 @@ "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "@babel/core": "^7.12.3", "@babel/parser": "^7.14.7", @@ -1973,6 +2097,7 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" } @@ -1982,6 +2107,7 @@ "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", "dev": true, + "license": "MIT", "dependencies": { "@babel/template": "^7.3.3", "@babel/types": "^7.3.3", @@ -1993,23 +2119,27 @@ } }, "node_modules/babel-preset-current-node-syntax": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", - "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz", + "integrity": "sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==", "dev": true, + "license": "MIT", "dependencies": { "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-import-attributes": "^7.24.7", + "@babel/plugin-syntax-import-meta": "^7.10.4", "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-top-level-await": "^7.8.3" + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5" }, "peerDependencies": { "@babel/core": "^7.0.0" @@ -2020,6 +2150,7 @@ "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", "dev": true, + "license": "MIT", "dependencies": { "babel-plugin-jest-hoist": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0" @@ -2035,47 +2166,23 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/base-x": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", - "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.10.tgz", + "integrity": "sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ==", + "license": "MIT", "dependencies": { "safe-buffer": "^5.0.1" } }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/base64url": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz", - "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==", - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/bip32": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/bip32/-/bip32-4.0.0.tgz", "integrity": "sha512-aOGy88DDlVUhspIXJN+dVEtclhIsfAUppD43V0j40cPTld3pv/0X/MlrZSZ6jowIaQQzFwP8M6rFU2z2mVYjDQ==", + "license": "MIT", "dependencies": { "@noble/hashes": "^1.2.0", "@scure/base": "^1.1.1", @@ -2090,20 +2197,23 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/bip39/-/bip39-3.1.0.tgz", "integrity": "sha512-c9kiwdk45Do5GL0vJMe7tS95VjCii65mYAH7DfWl3uW8AVzXKQVUm64i3hzVybBDMp9r7j9iNxR85+ul8MdN/A==", + "license": "ISC", "dependencies": { "@noble/hashes": "^1.2.0" } }, "node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz", + "integrity": "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==", + "license": "MIT" }, "node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } @@ -2113,6 +2223,7 @@ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, + "license": "MIT", "dependencies": { "fill-range": "^7.1.1" }, @@ -2123,12 +2234,13 @@ "node_modules/brorand": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==" + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", + "license": "MIT" }, "node_modules/browserslist": { - "version": "4.23.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", - "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", + "version": "4.24.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz", + "integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==", "dev": true, "funding": [ { @@ -2144,11 +2256,12 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001587", - "electron-to-chromium": "^1.4.668", - "node-releases": "^2.0.14", - "update-browserslist-db": "^1.0.13" + "caniuse-lite": "^1.0.30001688", + "electron-to-chromium": "^1.5.73", + "node-releases": "^2.0.19", + "update-browserslist-db": "^1.1.1" }, "bin": { "browserslist": "cli.js" @@ -2162,6 +2275,7 @@ "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", "dev": true, + "license": "MIT", "dependencies": { "fast-json-stable-stringify": "2.x" }, @@ -2173,6 +2287,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "license": "MIT", "dependencies": { "base-x": "^3.0.2" } @@ -2181,6 +2296,7 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "license": "MIT", "dependencies": { "bs58": "^4.0.0", "create-hash": "^1.1.0", @@ -2192,49 +2308,29 @@ "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", "dev": true, + "license": "Apache-2.0", "dependencies": { "node-int64": "^0.4.0" } }, - "node_modules/buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "node_modules/builtin-modules": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", - "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", "dev": true, - "engines": { - "node": ">=6" + "license": "MIT" + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">= 0.4" } }, "node_modules/callsites": { @@ -2242,6 +2338,7 @@ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -2251,14 +2348,33 @@ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, + "node_modules/camelcase-keys": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", + "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "camelcase": "^5.3.1", + "map-obj": "^4.0.0", + "quick-lru": "^4.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/caniuse-lite": { - "version": "1.0.30001617", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001617.tgz", - "integrity": "sha512-mLyjzNI9I+Pix8zwcrpxEbGlfqOkF9kM3ptzmKNw5tizSyYwMe+nGLTqMK9cO+0E+Bh6TsBxNAaHWEM8xwSsmA==", + "version": "1.0.30001700", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001700.tgz", + "integrity": "sha512-2S6XIXwaE7K7erT8dY+kLQcpa5ms63XlRkMkReXjle+kf6c5g38vyMl+Z5y8dSxOFDhcFe+nxnn261PLxBSQsQ==", "dev": true, "funding": [ { @@ -2273,13 +2389,15 @@ "type": "github", "url": "https://github.com/sponsors/ai" } - ] + ], + "license": "CC-BY-4.0" }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -2296,6 +2414,7 @@ "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" } @@ -2311,30 +2430,37 @@ "url": "https://github.com/sponsors/sibiraj-s" } ], + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.6.tgz", + "integrity": "sha512-3Ek9H3X6pj5TgenXYtNWdaBon1tgYCaebd+XPg0keyjEbEfkD4KkmAxkQ/i1vYvxdcT5nscLBfq9VJRmCBcFSw==", + "license": "MIT", "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "inherits": "^2.0.4", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 0.10" } }, "node_modules/cjs-module-lexer": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.3.1.tgz", - "integrity": "sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q==", - "dev": true + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz", + "integrity": "sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==", + "dev": true, + "license": "MIT" }, "node_modules/cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, + "license": "ISC", "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", @@ -2349,6 +2475,7 @@ "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", "dev": true, + "license": "MIT", "engines": { "iojs": ">= 1.0.0", "node": ">= 0.12.0" @@ -2358,13 +2485,15 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -2376,12 +2505,14 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", "dependencies": { "delayed-stream": "~1.0.0" }, @@ -2394,6 +2525,7 @@ "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.1.tgz", "integrity": "sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 12.0.0" } @@ -2402,18 +2534,21 @@ "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/create-hash": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "license": "MIT", "dependencies": { "cipher-base": "^1.0.1", "inherits": "^2.0.1", @@ -2427,6 +2562,7 @@ "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", "dev": true, + "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", "chalk": "^4.0.0", @@ -2447,13 +2583,15 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -2464,12 +2602,13 @@ } }, "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, + "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -2480,16 +2619,55 @@ } } }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decamelize-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.1.tgz", + "integrity": "sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==", + "dev": true, + "license": "MIT", + "dependencies": { + "decamelize": "^1.1.0", + "map-obj": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/decamelize-keys/node_modules/map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/decimal.js": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", - "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==" + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.5.0.tgz", + "integrity": "sha512-8vDa8Qxvr/+d94hSh5P3IJwI5t8/c0KsMp+g8bNw9cY2icONa5aPfvKeieW1WlG0WQYwwhJ7mjui2xtiePQSXw==", + "license": "MIT" }, "node_modules/dedent": { "version": "1.5.3", "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz", "integrity": "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==", "dev": true, + "license": "MIT", "peerDependencies": { "babel-plugin-macros": "^3.1.0" }, @@ -2503,13 +2681,15 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/deepmerge": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -2518,6 +2698,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", "engines": { "node": ">=0.4.0" } @@ -2527,6 +2708,7 @@ "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -2536,6 +2718,7 @@ "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } @@ -2545,6 +2728,7 @@ "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", "dev": true, + "license": "MIT", "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } @@ -2554,6 +2738,7 @@ "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", "dev": true, + "license": "MIT", "dependencies": { "path-type": "^4.0.0" }, @@ -2566,6 +2751,7 @@ "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, + "license": "Apache-2.0", "dependencies": { "esutils": "^2.0.2" }, @@ -2574,9 +2760,10 @@ } }, "node_modules/dotenv": { - "version": "16.4.5", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", - "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", + "version": "16.4.7", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", + "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==", + "license": "BSD-2-Clause", "engines": { "node": ">=12" }, @@ -2584,16 +2771,57 @@ "url": "https://dotenvx.com" } }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ed2curve": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/ed2curve/-/ed2curve-0.3.0.tgz", + "integrity": "sha512-8w2fmmq3hv9rCrcI7g9hms2pMunQr1JINfcjwR9tAyZqhtyaMN991lF/ZfHfr5tzZQ8c7y7aBgZbjfbd0fjFwQ==", + "license": "Unlicense", + "dependencies": { + "tweetnacl": "1.x.x" + } + }, + "node_modules/ejs": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "jake": "^10.8.5" + }, + "bin": { + "ejs": "bin/cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/electron-to-chromium": { - "version": "1.4.763", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.763.tgz", - "integrity": "sha512-k4J8NrtJ9QrvHLRo8Q18OncqBCB7tIUyqxRcJnlonQ0ioHKYB988GcDFF3ZePmnb8eHEopDs/wPHR/iGAFgoUQ==", - "dev": true + "version": "1.5.102", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.102.tgz", + "integrity": "sha512-eHhqaja8tE/FNpIiBrvBjFV/SSKpyWHLvxuR9dPTdo+3V9ppdLmFB7ZZQ98qNovcngPLYIz0oOBF9P0FfZef5Q==", + "dev": true, + "license": "ISC" }, "node_modules/elliptic": { - "version": "6.5.5", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.5.tgz", - "integrity": "sha512-7EjbcmUm17NQFu4Pmgmq2olYMj8nwMnpcddByChSUjArp8F5DQWcIcpriwO4ZToLNAJig0yiyjswfyGNje/ixw==", + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", + "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", + "license": "MIT", "dependencies": { "bn.js": "^4.11.9", "brorand": "^1.1.0", @@ -2609,6 +2837,7 @@ "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -2620,27 +2849,77 @@ "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, + "license": "MIT", "dependencies": { "is-arrayish": "^0.2.1" } }, - "node_modules/es6-promise": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", - "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-module-lexer": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.6.0.tgz", + "integrity": "sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } }, "node_modules/escalade": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", - "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -2650,6 +2929,7 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -2658,16 +2938,18 @@ } }, "node_modules/eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", + "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", "dev": true, + "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", + "@eslint/js": "8.57.1", + "@humanwhocodes/config-array": "^0.13.0", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "@ungap/structured-clone": "^1.2.0", @@ -2717,6 +2999,7 @@ "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", "dev": true, + "license": "MIT", "bin": { "eslint-config-prettier": "bin/cli.js" }, @@ -2724,21 +3007,58 @@ "eslint": ">=7.0.0" } }, + "node_modules/eslint-formatter-pretty": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/eslint-formatter-pretty/-/eslint-formatter-pretty-4.1.0.tgz", + "integrity": "sha512-IsUTtGxF1hrH6lMWiSl1WbGaiP01eT6kzywdY1U+zLc0MP+nwEnUiS9UI8IaOTUhTeQJLlCEWIbXINBH4YJbBQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/eslint": "^7.2.13", + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.0", + "eslint-rule-docs": "^1.1.5", + "log-symbols": "^4.0.0", + "plur": "^4.0.0", + "string-width": "^4.2.0", + "supports-hyperlinks": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-formatter-pretty/node_modules/@types/eslint": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.29.0.tgz", + "integrity": "sha512-VNcvioYDH8/FxaeTKkM4/TiTwt6pBV9E3OfGmvaw8tPl0rrHCJ4Ll15HRT+pMiFAf/MLQvAzC+6RzUMEL9Ceng==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, "node_modules/eslint-plugin-jsdoc": { - "version": "48.2.5", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-48.2.5.tgz", - "integrity": "sha512-ZeTfKV474W1N9niWfawpwsXGu+ZoMXu4417eBROX31d7ZuOk8zyG66SO77DpJ2+A9Wa2scw/jRqBPnnQo7VbcQ==", + "version": "48.11.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-48.11.0.tgz", + "integrity": "sha512-d12JHJDPNo7IFwTOAItCeJY1hcqoIxE0lHA8infQByLilQ9xkqrRa6laWCnsuCrf+8rUnvxXY1XuTbibRBNylA==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { - "@es-joy/jsdoccomment": "~0.43.0", + "@es-joy/jsdoccomment": "~0.46.0", "are-docs-informative": "^0.0.2", "comment-parser": "1.4.1", - "debug": "^4.3.4", + "debug": "^4.3.5", "escape-string-regexp": "^4.0.0", - "esquery": "^1.5.0", - "is-builtin-module": "^3.2.1", - "semver": "^7.6.1", - "spdx-expression-parse": "^4.0.0" + "espree": "^10.1.0", + "esquery": "^1.6.0", + "parse-imports": "^2.1.1", + "semver": "^7.6.3", + "spdx-expression-parse": "^4.0.0", + "synckit": "^0.9.1" }, "engines": { "node": ">=18" @@ -2747,14 +3067,46 @@ "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0" } }, + "node_modules/eslint-plugin-jsdoc/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-plugin-jsdoc/node_modules/espree": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", + "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.14.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/eslint-plugin-prettier": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.3.tgz", - "integrity": "sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==", + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.3.tgz", + "integrity": "sha512-qJ+y0FfCp/mQYQ/vWQ3s7eUlFEL4PyKfAJxsnYTJ4YT73nsJBWqmEpFryxV9OeUiqmsTsYJ5Y+KDNaeP31wrRw==", "dev": true, + "license": "MIT", "dependencies": { "prettier-linter-helpers": "^1.0.0", - "synckit": "^0.8.6" + "synckit": "^0.9.1" }, "engines": { "node": "^14.18.0 || >=16.0.0" @@ -2777,11 +3129,19 @@ } } }, + "node_modules/eslint-rule-docs": { + "version": "1.1.235", + "resolved": "https://registry.npmjs.org/eslint-rule-docs/-/eslint-rule-docs-1.1.235.tgz", + "integrity": "sha512-+TQ+x4JdTnDoFEXXb3fDvfGOwnyNV7duH8fXWTPD1ieaBmB8omj7Gw/pMBBu4uI2uJCCU8APDaQJzWuXnTsH4A==", + "dev": true, + "license": "MIT" + }, "node_modules/eslint-scope": { "version": "7.2.2", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" @@ -2798,6 +3158,7 @@ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, + "license": "Apache-2.0", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -2810,6 +3171,7 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2820,6 +3182,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -2832,6 +3195,7 @@ "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", @@ -2849,6 +3213,7 @@ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true, + "license": "BSD-2-Clause", "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -2858,10 +3223,11 @@ } }, "node_modules/esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "estraverse": "^5.1.0" }, @@ -2874,6 +3240,7 @@ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "estraverse": "^5.2.0" }, @@ -2886,6 +3253,7 @@ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } @@ -2895,14 +3263,15 @@ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=0.10.0" } }, "node_modules/ethers": { - "version": "6.13.1", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.13.1.tgz", - "integrity": "sha512-hdJ2HOxg/xx97Lm9HdCWk949BfYqYWpyw4//78SiwOLgASyfrNszfMUNB2joKjvGUdwhHfaiMMFFwacVVoLR9A==", + "version": "6.13.5", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.13.5.tgz", + "integrity": "sha512-+knKNieu5EKRThQJWwqaJ10a6HE9sSehGeqWN65//wE7j47ZpFhKAnHB/JJFibwwg61I/koxaPsXbXpD/skNOQ==", "funding": [ { "type": "individual", @@ -2913,13 +3282,14 @@ "url": "https://www.buymeacoffee.com/ricmoo" } ], + "license": "MIT", "dependencies": { "@adraffy/ens-normalize": "1.10.1", "@noble/curves": "1.2.0", "@noble/hashes": "1.3.2", - "@types/node": "18.15.13", + "@types/node": "22.7.5", "aes-js": "4.0.0-beta.5", - "tslib": "2.4.0", + "tslib": "2.7.0", "ws": "8.17.1" }, "engines": { @@ -2930,6 +3300,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", + "license": "MIT", "dependencies": { "@noble/hashes": "1.3.2" }, @@ -2941,6 +3312,7 @@ "version": "1.3.2", "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", + "license": "MIT", "engines": { "node": ">= 16" }, @@ -2949,15 +3321,26 @@ } }, "node_modules/ethers/node_modules/@types/node": { - "version": "18.15.13", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz", - "integrity": "sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==" + "version": "22.7.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.5.tgz", + "integrity": "sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==", + "license": "MIT", + "dependencies": { + "undici-types": "~6.19.2" + } + }, + "node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "license": "MIT" }, "node_modules/execa": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, + "license": "MIT", "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", @@ -2990,6 +3373,7 @@ "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", "dev": true, + "license": "MIT", "dependencies": { "@jest/expect-utils": "^29.7.0", "jest-get-type": "^29.6.3", @@ -3004,25 +3388,28 @@ "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "license": "MIT" }, "node_modules/fast-diff": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", - "dev": true + "dev": true, + "license": "Apache-2.0" }, "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", "dev": true, + "license": "MIT", "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.2", "merge2": "^1.3.0", - "micromatch": "^4.0.4" + "micromatch": "^4.0.8" }, "engines": { "node": ">=8.6.0" @@ -3033,6 +3420,7 @@ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, + "license": "ISC", "dependencies": { "is-glob": "^4.0.1" }, @@ -3044,19 +3432,22 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fastq": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.0.tgz", + "integrity": "sha512-7SFSRCNjBQIZH/xZR3iy5iQYR8aGBE0h3VG6/cwlbrpdciNYBMotQav8c1XI3HjHH+NikUpP53nPdlZSdWmFzA==", "dev": true, + "license": "ISC", "dependencies": { "reusify": "^1.0.4" } @@ -3066,6 +3457,7 @@ "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", "dev": true, + "license": "Apache-2.0", "dependencies": { "bser": "2.1.1" } @@ -3075,6 +3467,7 @@ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, + "license": "MIT", "dependencies": { "flat-cache": "^3.0.4" }, @@ -3082,11 +3475,35 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/filelist": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", + "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "minimatch": "^5.0.1" + } + }, + "node_modules/filelist/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, + "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -3099,6 +3516,7 @@ "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, + "license": "MIT", "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -3115,6 +3533,7 @@ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", "dev": true, + "license": "MIT", "dependencies": { "flatted": "^3.2.9", "keyv": "^4.5.3", @@ -3125,21 +3544,23 @@ } }, "node_modules/flatted": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", - "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", - "dev": true + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "dev": true, + "license": "ISC" }, "node_modules/follow-redirects": { - "version": "1.15.6", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", - "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", "funding": [ { "type": "individual", "url": "https://github.com/sponsors/RubenVerborgh" } ], + "license": "MIT", "engines": { "node": ">=4.0" }, @@ -3150,12 +3571,14 @@ } }, "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz", + "integrity": "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==", + "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", "mime-types": "^2.1.12" }, "engines": { @@ -3166,7 +3589,8 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/fsevents": { "version": "2.3.3", @@ -3174,6 +3598,7 @@ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "hasInstallScript": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -3186,7 +3611,7 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -3196,6 +3621,7 @@ "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -3205,24 +3631,64 @@ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true, + "license": "ISC", "engines": { "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/get-intrinsic": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.7.tgz", + "integrity": "sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "function-bind": "^1.1.2", + "get-proto": "^1.0.0", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/get-package-type": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=8.0.0" } }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/get-stream": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -3234,7 +3700,9 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -3255,6 +3723,7 @@ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, + "license": "ISC", "dependencies": { "is-glob": "^4.0.3" }, @@ -3267,6 +3736,7 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -3277,6 +3747,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -3289,6 +3760,7 @@ "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, + "license": "MIT", "dependencies": { "type-fest": "^0.20.2" }, @@ -3304,6 +3776,7 @@ "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, + "license": "MIT", "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", @@ -3319,31 +3792,84 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/graphemer": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true + "dev": true, + "license": "MIT" + }, + "node_modules/hard-rejection": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", + "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/hash-base": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "license": "MIT", "dependencies": { "inherits": "^2.0.4", "readable-stream": "^3.6.0", @@ -3357,6 +3883,7 @@ "version": "1.1.7", "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "license": "MIT", "dependencies": { "inherits": "^2.0.3", "minimalistic-assert": "^1.0.1" @@ -3366,7 +3893,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, + "license": "MIT", "dependencies": { "function-bind": "^1.1.2" }, @@ -3378,60 +3905,79 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "license": "MIT", "dependencies": { "hash.js": "^1.0.3", "minimalistic-assert": "^1.0.0", "minimalistic-crypto-utils": "^1.0.1" } }, - "node_modules/html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true - }, - "node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "node_modules/hosted-git-info": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", + "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, "engines": { - "node": ">=10.17.0" + "node": ">=10" } }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] + "node_modules/hosted-git-info/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/hosted-git-info/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true, + "license": "MIT" + }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.17.0" + } }, "node_modules/ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, + "license": "MIT", "engines": { "node": ">= 4" } }, "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", "dev": true, + "license": "MIT", "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -3444,10 +3990,11 @@ } }, "node_modules/import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", "dev": true, + "license": "MIT", "dependencies": { "pkg-dir": "^4.2.0", "resolve-cwd": "^3.0.0" @@ -3467,15 +4014,28 @@ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8.19" } }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", "dev": true, + "license": "ISC", "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -3484,13 +4044,25 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/irregular-plurals": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-3.5.0.tgz", + "integrity": "sha512-1ANGLZ+Nkv1ptFb2pa8oG8Lem4krflKuX/gINiHJHjJUKaJHk/SXk5x6K3J+39/p0h1RQ2saROclJJ+QLvETCQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } }, "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/is-buffer": { "version": "2.0.5", @@ -3510,32 +4082,22 @@ "url": "https://feross.org/support" } ], + "license": "MIT", "engines": { "node": ">=4" } }, - "node_modules/is-builtin-module": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", - "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==", + "node_modules/is-core-module": { + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", "dev": true, + "license": "MIT", "dependencies": { - "builtin-modules": "^3.3.0" + "hasown": "^2.0.2" }, "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-core-module": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", - "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", - "dev": true, - "dependencies": { - "hasown": "^2.0.0" + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3546,6 +4108,7 @@ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -3555,6 +4118,7 @@ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -3564,6 +4128,7 @@ "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -3573,6 +4138,7 @@ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, + "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, @@ -3585,6 +4151,7 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.12.0" } @@ -3594,15 +4161,39 @@ "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, + "node_modules/is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-retry-allowed": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-2.2.0.tgz", + "integrity": "sha512-XVm7LOeLpTW4jV19QSH38vkswxoLud8sQ57YwJVTPWdiaI9I8keEhGFpBlslyVsgdQy4Opg8QOLb8YRgsyZiQg==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -3610,26 +4201,57 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true + "dev": true, + "license": "ISC" + }, + "node_modules/isows": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/isows/-/isows-1.0.6.tgz", + "integrity": "sha512-lPHCayd40oW98/I0uvgaHKWCSvkzY27LjWLbtzOm64yQ+G3Q5npjjbdppU65iZXkK1Zt+kH9pfegli0AYfwYYw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/wevm" + } + ], + "license": "MIT", + "peerDependencies": { + "ws": "*" + } }, "node_modules/istanbul-lib-coverage": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=8" } }, "node_modules/istanbul-lib-instrument": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.2.tgz", - "integrity": "sha512-1WUsZ9R1lA0HtBSohTkm39WTPlNKSJ5iFk7UwqXkBLoHQT+hfqPsfsTDVuZdKGaBwn7din9bS7SsnoAr943hvw==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", + "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "@babel/core": "^7.23.9", "@babel/parser": "^7.23.9", @@ -3646,6 +4268,7 @@ "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "istanbul-lib-coverage": "^3.0.0", "make-dir": "^4.0.0", @@ -3660,6 +4283,7 @@ "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "debug": "^4.1.1", "istanbul-lib-coverage": "^3.0.0", @@ -3674,6 +4298,7 @@ "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "html-escaper": "^2.0.0", "istanbul-lib-report": "^3.0.0" @@ -3682,11 +4307,55 @@ "node": ">=8" } }, + "node_modules/jake": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.2.tgz", + "integrity": "sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "async": "^3.2.3", + "chalk": "^4.0.2", + "filelist": "^1.0.4", + "minimatch": "^3.1.2" + }, + "bin": { + "jake": "bin/cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jake/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/jake/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", "dev": true, + "license": "MIT", "dependencies": { "@jest/core": "^29.7.0", "@jest/types": "^29.6.3", @@ -3713,6 +4382,7 @@ "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", "dev": true, + "license": "MIT", "dependencies": { "execa": "^5.0.0", "jest-util": "^29.7.0", @@ -3727,6 +4397,7 @@ "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", "dev": true, + "license": "MIT", "dependencies": { "@jest/environment": "^29.7.0", "@jest/expect": "^29.7.0", @@ -3758,6 +4429,7 @@ "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", "dev": true, + "license": "MIT", "dependencies": { "@jest/core": "^29.7.0", "@jest/test-result": "^29.7.0", @@ -3791,6 +4463,7 @@ "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", "dev": true, + "license": "MIT", "dependencies": { "@babel/core": "^7.11.6", "@jest/test-sequencer": "^29.7.0", @@ -3836,6 +4509,7 @@ "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", "dev": true, + "license": "MIT", "dependencies": { "chalk": "^4.0.0", "diff-sequences": "^29.6.3", @@ -3851,6 +4525,7 @@ "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", "dev": true, + "license": "MIT", "dependencies": { "detect-newline": "^3.0.0" }, @@ -3863,6 +4538,7 @@ "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", "dev": true, + "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", "chalk": "^4.0.0", @@ -3879,6 +4555,7 @@ "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", "dev": true, + "license": "MIT", "dependencies": { "@jest/environment": "^29.7.0", "@jest/fake-timers": "^29.7.0", @@ -3896,6 +4573,7 @@ "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", "dev": true, + "license": "MIT", "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } @@ -3905,6 +4583,7 @@ "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", "dev": true, + "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", "@types/graceful-fs": "^4.1.3", @@ -3930,6 +4609,7 @@ "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", "dev": true, + "license": "MIT", "dependencies": { "jest-get-type": "^29.6.3", "pretty-format": "^29.7.0" @@ -3943,6 +4623,7 @@ "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", "dev": true, + "license": "MIT", "dependencies": { "chalk": "^4.0.0", "jest-diff": "^29.7.0", @@ -3958,6 +4639,7 @@ "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", "dev": true, + "license": "MIT", "dependencies": { "@babel/code-frame": "^7.12.13", "@jest/types": "^29.6.3", @@ -3978,6 +4660,7 @@ "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", "dev": true, + "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", "@types/node": "*", @@ -3992,6 +4675,7 @@ "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" }, @@ -4009,6 +4693,7 @@ "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", "dev": true, + "license": "MIT", "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } @@ -4018,6 +4703,7 @@ "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", "dev": true, + "license": "MIT", "dependencies": { "chalk": "^4.0.0", "graceful-fs": "^4.2.9", @@ -4038,6 +4724,7 @@ "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", "dev": true, + "license": "MIT", "dependencies": { "jest-regex-util": "^29.6.3", "jest-snapshot": "^29.7.0" @@ -4051,6 +4738,7 @@ "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", "dev": true, + "license": "MIT", "dependencies": { "@jest/console": "^29.7.0", "@jest/environment": "^29.7.0", @@ -4083,6 +4771,7 @@ "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", "dev": true, + "license": "MIT", "dependencies": { "@jest/environment": "^29.7.0", "@jest/fake-timers": "^29.7.0", @@ -4116,6 +4805,7 @@ "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", "dev": true, + "license": "MIT", "dependencies": { "@babel/core": "^7.11.6", "@babel/generator": "^7.7.2", @@ -4147,6 +4837,7 @@ "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", "dev": true, + "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", "@types/node": "*", @@ -4164,6 +4855,7 @@ "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", "dev": true, + "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", "camelcase": "^6.2.0", @@ -4181,6 +4873,7 @@ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -4193,6 +4886,7 @@ "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", "dev": true, + "license": "MIT", "dependencies": { "@jest/test-result": "^29.7.0", "@jest/types": "^29.6.3", @@ -4212,6 +4906,7 @@ "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*", "jest-util": "^29.7.0", @@ -4227,6 +4922,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -4237,17 +4933,27 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/jose": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/jose/-/jose-5.10.0.tgz", + "integrity": "sha512-s+3Al/p9g32Iq+oqXxkW//7jk2Vig6FF1CFqzVXoTUXt2qz89YWbL+OwS17NFYEvxC35n0FKeGO2LGYSxeM2Gg==", + "funding": { + "url": "https://github.com/sponsors/panva" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, + "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -4260,51 +4966,58 @@ "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.0.0.tgz", "integrity": "sha512-YtOli5Cmzy3q4dP26GraSOeAhqecewG04hoO8DY56CH4KJ9Fvv5qKWUCCo3HZob7esJQHCv6/+bnTy72xZZaVQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=12.0.0" } }, "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", "dev": true, + "license": "MIT", "bin": { "jsesc": "bin/jsesc" }, "engines": { - "node": ">=4" + "node": ">=6" } }, "node_modules/json-buffer": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true, + "license": "MIT", "bin": { "json5": "lib/cli.js" }, @@ -4313,25 +5026,38 @@ } }, "node_modules/jsonc-parser": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz", - "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==", - "dev": true + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz", + "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==", + "dev": true, + "license": "MIT" }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "dev": true, + "license": "MIT", "dependencies": { "json-buffer": "3.0.1" } }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/kleur": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -4341,6 +5067,7 @@ "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -4350,6 +5077,7 @@ "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, + "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -4362,13 +5090,15 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, + "license": "MIT", "dependencies": { "p-locate": "^5.0.0" }, @@ -4379,33 +5109,43 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, "node_modules/lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true + "dev": true, + "license": "MIT" }, - "node_modules/long": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", - "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, + "license": "ISC", "dependencies": { "yallist": "^3.0.2" } @@ -4414,13 +5154,15 @@ "version": "2.3.9", "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/make-dir": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", "dev": true, + "license": "MIT", "dependencies": { "semver": "^7.5.3" }, @@ -4435,22 +5177,38 @@ "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/makeerror": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "tmpl": "1.0.5" } }, + "node_modules/map-obj": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", + "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/marked": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", "dev": true, + "license": "MIT", "bin": { "marked": "bin/marked.js" }, @@ -4458,38 +5216,101 @@ "node": ">= 12" } }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/md5.js": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "license": "MIT", "dependencies": { "hash-base": "^3.0.0", "inherits": "^2.0.1", "safe-buffer": "^5.1.2" } }, + "node_modules/meow": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-9.0.0.tgz", + "integrity": "sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/minimist": "^1.2.0", + "camelcase-keys": "^6.2.2", + "decamelize": "^1.2.0", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "4.1.0", + "normalize-package-data": "^3.0.0", + "read-pkg-up": "^7.0.1", + "redent": "^3.0.0", + "trim-newlines": "^3.0.0", + "type-fest": "^0.18.0", + "yargs-parser": "^20.2.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/meow/node_modules/type-fest": { + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", + "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/meow/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 8" } }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, + "license": "MIT", "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -4500,6 +5321,7 @@ "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -4508,6 +5330,7 @@ "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", "dependencies": { "mime-db": "1.52.0" }, @@ -4520,25 +5343,39 @@ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, + "node_modules/min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "license": "ISC" }, "node_modules/minimalistic-crypto-utils": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==" + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", + "license": "MIT" }, "node_modules/minimatch": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -4549,44 +5386,56 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/minimist-options": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", + "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0", + "kind-of": "^6.0.3" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/mock-fs": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-5.2.0.tgz", - "integrity": "sha512-2dF2R6YMSZbpip1V1WHKGLNjr/k48uQClqMVb5H3MOvwc9qhYis3/IWbj02qIg/Y8MDXKFF4c5v0rxx2o6xTZw==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-5.5.0.tgz", + "integrity": "sha512-d/P1M/RacgM3dB0sJ8rjeRNXxtapkPCUnMGmIN0ixJ16F/E4GUZCvWcSGfWGz8eaXYvn1s9baUwNjI4LOPEjiA==", "dev": true, + "license": "MIT", "engines": { "node": ">=12.0.0" } }, "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/node-addon-api": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", - "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==" - }, - "node_modules/node-forge": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", - "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==", - "engines": { - "node": ">= 6.13.0" - } + "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==", + "license": "MIT" }, "node_modules/node-gyp-build": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.1.tgz", - "integrity": "sha512-OSs33Z9yWr148JZcbZd5WiAXhh/n9z8TxQcdMhIOlpN9AhWpLfvVFO73+m77bBABQMaY9XSvIa+qk0jlI7Gcaw==", + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz", + "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", + "license": "MIT", "bin": { "node-gyp-build": "bin.js", "node-gyp-build-optional": "optional.js", @@ -4597,35 +5446,38 @@ "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", - "dev": true + "dev": true, + "license": "MIT" }, - "node_modules/node-jose": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/node-jose/-/node-jose-2.2.0.tgz", - "integrity": "sha512-XPCvJRr94SjLrSIm4pbYHKLEaOsDvJCpyFw/6V/KK/IXmyZ6SFBzAUDO9HQf4DB/nTEFcRGH87mNciOP23kFjw==", + "node_modules/node-releases": { + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", + "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", + "dev": true, + "license": "MIT" + }, + "node_modules/normalize-package-data": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", + "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", + "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "base64url": "^3.0.1", - "buffer": "^6.0.3", - "es6-promise": "^4.2.8", - "lodash": "^4.17.21", - "long": "^5.2.0", - "node-forge": "^1.2.1", - "pako": "^2.0.4", - "process": "^0.11.10", - "uuid": "^9.0.0" + "hosted-git-info": "^4.0.1", + "is-core-module": "^2.5.0", + "semver": "^7.3.4", + "validate-npm-package-license": "^3.0.1" + }, + "engines": { + "node": ">=10" } }, - "node_modules/node-releases": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", - "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", - "dev": true - }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -4635,6 +5487,7 @@ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.0.0" }, @@ -4647,6 +5500,7 @@ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, + "license": "ISC", "dependencies": { "wrappy": "1" } @@ -4656,6 +5510,7 @@ "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, + "license": "MIT", "dependencies": { "mimic-fn": "^2.1.0" }, @@ -4671,6 +5526,7 @@ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, + "license": "MIT", "dependencies": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", @@ -4683,13 +5539,43 @@ "node": ">= 0.8.0" } }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, + "node_modules/ox": { + "version": "0.6.7", + "resolved": "https://registry.npmjs.org/ox/-/ox-0.6.7.tgz", + "integrity": "sha512-17Gk/eFsFRAZ80p5eKqv89a57uXjd3NgIf1CaXojATPBuujVc/fQSVhBeAU9JCRB+k7J50WQAyWTxK19T9GgbA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/wevm" + } + ], + "license": "MIT", "dependencies": { - "yocto-queue": "^0.1.0" + "@adraffy/ens-normalize": "^1.10.1", + "@noble/curves": "^1.6.0", + "@noble/hashes": "^1.5.0", + "@scure/bip32": "^1.5.0", + "@scure/bip39": "^1.4.0", + "abitype": "^1.0.6", + "eventemitter3": "5.0.1" + }, + "peerDependencies": { + "typescript": ">=5.4.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" }, "engines": { "node": ">=10" @@ -4703,6 +5589,7 @@ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, + "license": "MIT", "dependencies": { "p-limit": "^3.0.2" }, @@ -4718,20 +5605,17 @@ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, - "node_modules/pako": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", - "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==" - }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, + "license": "MIT", "dependencies": { "callsites": "^3.0.0" }, @@ -4739,11 +5623,26 @@ "node": ">=6" } }, + "node_modules/parse-imports": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/parse-imports/-/parse-imports-2.2.1.tgz", + "integrity": "sha512-OL/zLggRp8mFhKL0rNORUTR4yBYujK/uU+xZL+/0Rgm2QE4nLO9v8PzEweSJEbMGKmDRjJE4R3IMJlL2di4JeQ==", + "dev": true, + "license": "Apache-2.0 AND MIT", + "dependencies": { + "es-module-lexer": "^1.5.3", + "slashes": "^3.0.12" + }, + "engines": { + "node": ">= 18" + } + }, "node_modules/parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", "dev": true, + "license": "MIT", "dependencies": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", @@ -4762,6 +5661,7 @@ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -4771,6 +5671,7 @@ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -4780,6 +5681,7 @@ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -4788,28 +5690,32 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, + "license": "MIT", "engines": { "node": ">=8.6" }, @@ -4822,6 +5728,7 @@ "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 6" } @@ -4831,6 +5738,7 @@ "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "dev": true, + "license": "MIT", "dependencies": { "find-up": "^4.0.0" }, @@ -4843,6 +5751,7 @@ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, + "license": "MIT", "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -4856,6 +5765,7 @@ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, + "license": "MIT", "dependencies": { "p-locate": "^4.1.0" }, @@ -4868,6 +5778,7 @@ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, + "license": "MIT", "dependencies": { "p-try": "^2.0.0" }, @@ -4883,6 +5794,7 @@ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, + "license": "MIT", "dependencies": { "p-limit": "^2.2.0" }, @@ -4890,20 +5802,38 @@ "node": ">=8" } }, + "node_modules/plur": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/plur/-/plur-4.0.0.tgz", + "integrity": "sha512-4UGewrYgqDFw9vV6zNV+ADmPAUAfJPKtGvb/VdpQAx25X5f3xXdGdyOEVFwkl8Hl/tl7+xbeHqSEM+D5/TirUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "irregular-plurals": "^3.2.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8.0" } }, "node_modules/prettier": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", - "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.1.tgz", + "integrity": "sha512-hPpFQvHwL3Qv5AdRvBFMhnKo4tYxp0ReXiPn2bxkiohEX6mBeBwEpBSQTkD458RaaDKQMYSp4hX4UtfUTA5wDw==", "dev": true, + "license": "MIT", "bin": { "prettier": "bin/prettier.cjs" }, @@ -4919,6 +5849,7 @@ "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", "dev": true, + "license": "MIT", "dependencies": { "fast-diff": "^1.1.2" }, @@ -4931,6 +5862,7 @@ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, + "license": "MIT", "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", @@ -4945,6 +5877,7 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -4952,19 +5885,12 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", - "engines": { - "node": ">= 0.6.0" - } - }, "node_modules/prompts": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", "dev": true, + "license": "MIT", "dependencies": { "kleur": "^3.0.3", "sisteransi": "^1.0.5" @@ -4976,13 +5902,15 @@ "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "license": "MIT" }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -5001,7 +5929,8 @@ "type": "opencollective", "url": "https://opencollective.com/fast-check" } - ] + ], + "license": "MIT" }, "node_modules/queue-microtask": { "version": "1.2.3", @@ -5021,18 +5950,171 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" + }, + "node_modules/quick-lru": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", + "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } }, "node_modules/react-is": { "version": "18.3.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", - "dev": true + "dev": true, + "license": "MIT" + }, + "node_modules/read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-pkg-up/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-pkg-up/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg/node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true, + "license": "ISC" + }, + "node_modules/read-pkg/node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/read-pkg/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/read-pkg/node_modules/type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=8" + } }, "node_modules/readable-stream": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -5042,28 +6124,47 @@ "node": ">= 6" } }, + "node_modules/redent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", + "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "indent-string": "^4.0.0", + "strip-indent": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "version": "1.22.10", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", + "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", "dev": true, + "license": "MIT", "dependencies": { - "is-core-module": "^2.13.0", + "is-core-module": "^2.16.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": { "resolve": "bin/resolve" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -5073,6 +6174,7 @@ "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", "dev": true, + "license": "MIT", "dependencies": { "resolve-from": "^5.0.0" }, @@ -5085,6 +6187,7 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -5094,15 +6197,17 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/resolve.exports": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", - "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.3.tgz", + "integrity": "sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" } @@ -5112,6 +6217,7 @@ "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true, + "license": "MIT", "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" @@ -5121,7 +6227,9 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", "dev": true, + "license": "ISC", "dependencies": { "glob": "^7.1.3" }, @@ -5136,6 +6244,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "license": "MIT", "dependencies": { "hash-base": "^3.0.0", "inherits": "^2.0.1" @@ -5160,6 +6269,7 @@ "url": "https://feross.org/support" } ], + "license": "MIT", "dependencies": { "queue-microtask": "^1.2.2" } @@ -5181,27 +6291,30 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/secp256k1": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-5.0.0.tgz", - "integrity": "sha512-TKWX8xvoGHrxVdqbYeZM9w+izTF4b9z3NhSaDkdn81btvuh+ivbIMGT/zQvDtTFWhRlThpoz6LEYTr7n8A5GcA==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-5.0.1.tgz", + "integrity": "sha512-lDFs9AAIaWP9UCdtWrotXWWF9t8PWgQDcxqgAnpM9rMqxb3Oaq2J0thzPVSxBwdJgyQtkU/sYtFtbM1RSt/iYA==", "hasInstallScript": true, + "license": "MIT", "dependencies": { - "elliptic": "^6.5.4", + "elliptic": "^6.5.7", "node-addon-api": "^5.0.0", "node-gyp-build": "^4.2.0" }, "engines": { - "node": ">=14.0.0" + "node": ">=18.0.0" } }, "node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -5213,6 +6326,7 @@ "version": "2.4.11", "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "license": "(MIT AND BSD-3-Clause)", "dependencies": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" @@ -5226,6 +6340,7 @@ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, + "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" }, @@ -5238,6 +6353,7 @@ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -5247,6 +6363,7 @@ "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.7.tgz", "integrity": "sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg==", "dev": true, + "license": "MIT", "dependencies": { "ansi-sequence-parser": "^1.1.0", "jsonc-parser": "^3.2.0", @@ -5258,28 +6375,39 @@ "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, + "node_modules/slashes": { + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/slashes/-/slashes-3.0.12.tgz", + "integrity": "sha512-Q9VME8WyGkc7pJf6QEkj3wE+2CnvZMI+XJhwdTPR8Z/kWQRXi7boAWLDibRPyHRTUTPx5FaU7MsyrjI3yLB4HA==", + "dev": true, + "license": "ISC" + }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -5289,44 +6417,72 @@ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", "dev": true, + "license": "MIT", "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" } }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-correct/node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, "node_modules/spdx-exceptions": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", - "dev": true + "dev": true, + "license": "CC-BY-3.0" }, "node_modules/spdx-expression-parse": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-4.0.0.tgz", "integrity": "sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==", "dev": true, + "license": "MIT", "dependencies": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" } }, "node_modules/spdx-license-ids": { - "version": "3.0.17", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.17.tgz", - "integrity": "sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg==", - "dev": true + "version": "3.0.21", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.21.tgz", + "integrity": "sha512-Bvg/8F5XephndSK3JffaRqdT+gyhfqIPwDHpX80tJrF8QQRYMo8sNMeaZ2Dp5+jhwKnUmIOyFFQfHRkjJm5nXg==", + "dev": true, + "license": "CC0-1.0" }, "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true + "dev": true, + "license": "BSD-3-Clause" }, "node_modules/stack-utils": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", "dev": true, + "license": "MIT", "dependencies": { "escape-string-regexp": "^2.0.0" }, @@ -5339,6 +6495,7 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -5347,6 +6504,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "license": "MIT", "dependencies": { "safe-buffer": "~5.2.0" } @@ -5356,6 +6514,7 @@ "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", "dev": true, + "license": "MIT", "dependencies": { "char-regex": "^1.0.2", "strip-ansi": "^6.0.0" @@ -5369,6 +6528,7 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, + "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -5383,6 +6543,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -5395,6 +6556,7 @@ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -5404,15 +6566,30 @@ "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, + "node_modules/strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "min-indent": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -5425,6 +6602,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -5432,11 +6610,26 @@ "node": ">=8" } }, + "node_modules/supports-hyperlinks": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz", + "integrity": "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -5445,10 +6638,11 @@ } }, "node_modules/synckit": { - "version": "0.8.8", - "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.8.tgz", - "integrity": "sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==", + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.2.tgz", + "integrity": "sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==", "dev": true, + "license": "MIT", "dependencies": { "@pkgr/core": "^0.1.0", "tslib": "^2.6.2" @@ -5460,17 +6654,12 @@ "url": "https://opencollective.com/unts" } }, - "node_modules/synckit/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", - "dev": true - }, "node_modules/test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", "dev": true, + "license": "ISC", "dependencies": { "@istanbuljs/schema": "^0.1.2", "glob": "^7.1.4", @@ -5485,6 +6674,7 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -5495,6 +6685,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -5506,28 +6697,22 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", - "dev": true - }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", "dev": true, - "engines": { - "node": ">=4" - } + "license": "BSD-3-Clause" }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, + "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -5535,11 +6720,22 @@ "node": ">=8.0" } }, + "node_modules/trim-newlines": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", + "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/ts-api-utils": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", - "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", + "integrity": "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==", "dev": true, + "license": "MIT", "engines": { "node": ">=16" }, @@ -5548,28 +6744,31 @@ } }, "node_modules/ts-jest": { - "version": "29.1.2", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.2.tgz", - "integrity": "sha512-br6GJoH/WUX4pu7FbZXuWGKGNDuU7b8Uj77g/Sp7puZV6EXzuByl6JrECvm0MzVzSTkSHWTihsXt+5XYER5b+g==", + "version": "29.2.5", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.5.tgz", + "integrity": "sha512-KD8zB2aAZrcKIdGk4OwpJggeLcH1FgrICqDSROWqlnJXGCXK4Mn6FcdK2B6670Xr73lHMG1kHw8R87A0ecZ+vA==", "dev": true, + "license": "MIT", "dependencies": { - "bs-logger": "0.x", - "fast-json-stable-stringify": "2.x", + "bs-logger": "^0.2.6", + "ejs": "^3.1.10", + "fast-json-stable-stringify": "^2.1.0", "jest-util": "^29.0.0", "json5": "^2.2.3", - "lodash.memoize": "4.x", - "make-error": "1.x", - "semver": "^7.5.3", - "yargs-parser": "^21.0.1" + "lodash.memoize": "^4.1.2", + "make-error": "^1.3.6", + "semver": "^7.6.3", + "yargs-parser": "^21.1.1" }, "bin": { "ts-jest": "cli.js" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" }, "peerDependencies": { "@babel/core": ">=7.0.0-beta.0 <8", + "@jest/transform": "^29.0.0", "@jest/types": "^29.0.0", "babel-jest": "^29.0.0", "jest": "^29.0.0", @@ -5579,6 +6778,9 @@ "@babel/core": { "optional": true }, + "@jest/transform": { + "optional": true + }, "@jest/types": { "optional": true }, @@ -5595,6 +6797,7 @@ "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "dev": true, + "license": "MIT", "dependencies": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", @@ -5633,16 +6836,45 @@ } } }, + "node_modules/tsd": { + "version": "0.31.2", + "resolved": "https://registry.npmjs.org/tsd/-/tsd-0.31.2.tgz", + "integrity": "sha512-VplBAQwvYrHzVihtzXiUVXu5bGcr7uH1juQZ1lmKgkuGNGT+FechUCqmx9/zk7wibcqR2xaNEwCkDyKh+VVZnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@tsd/typescript": "~5.4.3", + "eslint-formatter-pretty": "^4.1.0", + "globby": "^11.0.1", + "jest-diff": "^29.0.3", + "meow": "^9.0.0", + "path-exists": "^4.0.0", + "read-pkg-up": "^7.0.0" + }, + "bin": { + "tsd": "dist/cli.js" + }, + "engines": { + "node": ">=14.16" + } + }, "node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", + "license": "0BSD" + }, + "node_modules/tweetnacl": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", + "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==" }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, + "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1" }, @@ -5655,6 +6887,7 @@ "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -5664,6 +6897,7 @@ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, + "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -5676,6 +6910,7 @@ "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.25.13.tgz", "integrity": "sha512-pQqiwiJ+Z4pigfOnnysObszLiU3mVLWAExSPf+Mu06G/qsc3wzbuM56SZQvONhHLncLUhYzOVkjFFpFfL5AzhQ==", "dev": true, + "license": "Apache-2.0", "dependencies": { "lunr": "^2.3.9", "marked": "^4.3.0", @@ -5695,13 +6930,15 @@ "node_modules/typeforce": { "version": "1.18.0", "resolved": "https://registry.npmjs.org/typeforce/-/typeforce-1.18.0.tgz", - "integrity": "sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g==" + "integrity": "sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g==", + "license": "MIT" }, "node_modules/typescript": { "version": "5.4.5", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", - "dev": true, + "devOptional": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -5711,15 +6948,15 @@ } }, "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "dev": true + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "license": "MIT" }, "node_modules/update-browserslist-db": { - "version": "1.0.15", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.15.tgz", - "integrity": "sha512-K9HWH62x3/EalU1U6sjSZiylm9C8tgq2mSvshZpqc7QE69RaA2qjhkW2HlNA0tFpEbtyFz7HTqbSdN4MSwUodA==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.2.tgz", + "integrity": "sha512-PPypAm5qvlD7XMZC3BujecnaOxwhrtoFR+Dqkk5Aa/6DssiH0ibKoketaj9w8LP7Bont1rYeoV5plxD7RTEPRg==", "dev": true, "funding": [ { @@ -5735,9 +6972,10 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { - "escalade": "^3.1.2", - "picocolors": "^1.0.0" + "escalade": "^3.2.0", + "picocolors": "^1.1.1" }, "bin": { "update-browserslist-db": "cli.js" @@ -5751,6 +6989,7 @@ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" } @@ -5758,31 +6997,22 @@ "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" - }, - "node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "bin": { - "uuid": "dist/bin/uuid" - } + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/v8-to-istanbul": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", - "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", "dev": true, + "license": "ISC", "dependencies": { "@jridgewell/trace-mapping": "^0.3.12", "@types/istanbul-lib-coverage": "^2.0.1", @@ -5792,23 +7022,99 @@ "node": ">=10.12.0" } }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/validate-npm-package-license/node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/viem": { + "version": "2.23.3", + "resolved": "https://registry.npmjs.org/viem/-/viem-2.23.3.tgz", + "integrity": "sha512-ON/Uybteajqxn3iFyhV/6Ybm+QKhcrsVyTZf/9v2w0CvYQIoyJYCfHSsQR9zpsbOGrR7d2p62w6jzb6fqzzacg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/wevm" + } + ], + "license": "MIT", + "dependencies": { + "@noble/curves": "1.8.1", + "@noble/hashes": "1.7.1", + "@scure/bip32": "1.6.2", + "@scure/bip39": "1.5.4", + "abitype": "1.0.8", + "isows": "1.0.6", + "ox": "0.6.7", + "ws": "8.18.0" + }, + "peerDependencies": { + "typescript": ">=5.0.4" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/viem/node_modules/ws": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/vscode-oniguruma": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/vscode-textmate": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-8.0.0.tgz", "integrity": "sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/walker": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", "dev": true, + "license": "Apache-2.0", "dependencies": { "makeerror": "1.0.12" } @@ -5818,6 +7124,7 @@ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, + "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -5832,6 +7139,7 @@ "version": "2.0.6", "resolved": "https://registry.npmjs.org/wif/-/wif-2.0.6.tgz", "integrity": "sha512-HIanZn1zmduSF+BQhkE+YXIbEiH0xPr1012QbFEGB0xsKqJii0/SqJjyn8dFv6y36kOznMgMB+LGcbZTJ1xACQ==", + "license": "MIT", "dependencies": { "bs58check": "<3.0.0" } @@ -5841,6 +7149,7 @@ "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -5850,6 +7159,7 @@ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -5866,13 +7176,15 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/write-file-atomic": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", "dev": true, + "license": "ISC", "dependencies": { "imurmurhash": "^0.1.4", "signal-exit": "^3.0.7" @@ -5885,6 +7197,7 @@ "version": "8.17.1", "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", + "license": "MIT", "engines": { "node": ">=10.0.0" }, @@ -5906,6 +7219,7 @@ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true, + "license": "ISC", "engines": { "node": ">=10" } @@ -5914,13 +7228,15 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, + "license": "MIT", "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", @@ -5939,6 +7255,7 @@ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true, + "license": "ISC", "engines": { "node": ">=12" } @@ -5948,6 +7265,7 @@ "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -5957,6 +7275,7 @@ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, diff --git a/package.json b/package.json index 62412db8..97046484 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "license": "ISC", "description": "Coinbase Platform SDK", "repository": "https://github.com/coinbase/coinbase-sdk-nodejs", - "version": "0.0.9", + "version": "0.25.0", "main": "dist/index.js", "types": "dist/index.d.ts", "scripts": { @@ -13,12 +13,14 @@ "format": "prettier -c .prettierrc --write \"**/*.{ts,js,cjs,json,md}\"", "format-check": "prettier -c .prettierrc --check \"**/*.{ts,js,cjs,json,md}\"", "check": "tsc --noEmit", - "test": "npx jest --no-cache --testMatch=**/*_test.ts", + "test": "jest --config jest.config.js --testPathIgnorePatterns src/tests/e2e.ts src/tests/utils.ts src/tests/types.test-d.ts", "test:dry-run": "npm install && npm ci && npm publish --dry-run", "test:e2e": "npx jest --no-cache --testMatch=**/e2e.ts --coverageThreshold '{}'", + "test:e2e:stake": "npx jest --no-cache --testMatch=**/e2e.ts --coverageThreshold '{}' -t Stake", + "test:types": "tsd --files src/tests/types.test-d.ts", "clean": "rm -rf dist/*", "build": "tsc", - "prepack": "tsc", + "prepack": "tsc --skipLibCheck", "docs": "typedoc --entryPoints ./src --entryPointStrategy expand --exclude ./src/tests/**/*.ts" }, "files": [ @@ -26,20 +28,23 @@ ], "dependencies": { "@scure/bip32": "^1.4.0", + "abitype": "^1.0.6", "axios": "^1.6.8", "axios-mock-adapter": "^1.22.0", + "axios-retry": "^4.4.1", "bip32": "^4.0.0", "bip39": "^3.1.0", "decimal.js": "^10.4.3", "dotenv": "^16.4.5", + "ed2curve": "^0.3.0", "ethers": "^6.12.1", - "node-jose": "^2.2.0", - "secp256k1": "^5.0.0" + "jose": "^5.10.0", + "secp256k1": "^5.0.0", + "viem": "^2.21.26" }, "devDependencies": { "@types/jest": "^29.5.12", "@types/node": "^20.12.11", - "@types/node-jose": "^1.1.13", "@types/secp256k1": "^4.0.6", "@typescript-eslint/eslint-plugin": "^7.8.0", "@typescript-eslint/parser": "^7.8.0", @@ -52,6 +57,7 @@ "prettier": "^3.2.5", "ts-jest": "^29.1.2", "ts-node": "^10.9.2", + "tsd": "^0.31.2", "typedoc": "^0.25.13", "typescript": "^5.4.5" } diff --git a/quickstart-template/README.md b/quickstart-template/README.md new file mode 100644 index 00000000..45db6e5c --- /dev/null +++ b/quickstart-template/README.md @@ -0,0 +1,82 @@ +# Quickstart template for Platform SDK + +This is a template repository for quickly getting started with the Platform SDK. It provides a simple example of how to use the SDK. + +## Create a Wallet, Fund, and Transfer + +To set up the template, run the following commands: + +```bash +npm install +npm run start +``` + +This command will create a developer-custodial wallet, deposit testnet funds to it and perform a transfer to another wallet. + +## Wallet transaction history + +To set up the template, run the following commands: + +```bash +npm install +npm run start-wallet-history +``` + +This command will create a developer-custodial wallet, deposit testnet funds to it and perform a few transfers to another wallet and back. Then list all the transactions on that wallet. + +## Trade Assets + +To set up the template, run the following commands: + +```bash +npm install +npm run start-trade-assets +``` + +This command will create a developer-custodial wallet on Base Mainnet and trade ETH for USDC. + +## Mass Payout + +To set up the template, run the following commands: + +```bash +npm install +npm run start-mass-payout +``` + +This command will demonstrate how to automatically send batched payments from a CSV file with a non-MPC API Wallet. + +## Webhook + +If you don't already have a URL setup for event notification, +you can follow these [instructions to setup a simple Webhook App](./webhook/README.md). + +To set up the template, run the following commands: + +```bash +npm install +npm run start-webhook +``` + +This command will demonstrate how to create a webhook for ERC20 transfer events on USDC. + +You can also use [CDP Portal](https://portal.cdp.coinbase.com/products/webhooks) for Webhook configurations. + +### Webhook - transfer between wallets + +We also have a template for setting up two wallets and a webhook and receiving the transfer information between those two wallets on your webhook. + +To set up the template, run the following commands: + +```bash +npm install +npm run start-webhook-wallet-transfer +``` + +On this template, we'll demonstrate how to do a ERC20 transfer between two wallets and receive that transfer on your webhook. + +_Note: Although usually transactions are sent to webhook within a minute, it may take several minutes for it to be sent to the webhook._ + +You can find more information about webhooks in the [documentation](https://docs.cdp.coinbase.com/onchain-data/docs/webhooks). + +_____________________ diff --git a/quickstart-template/bridge-usdc.js b/quickstart-template/bridge-usdc.js new file mode 100644 index 00000000..4ef5d4f9 --- /dev/null +++ b/quickstart-template/bridge-usdc.js @@ -0,0 +1,181 @@ +import { Coinbase, Wallet } from "@coinbase/coinbase-sdk"; +import { createPublicClient, decodeAbiParameters, http, keccak256, toBytes } from "viem"; +import { base } from "viem/chains"; +import os from "os"; +import dotenv from "dotenv"; + +dotenv.config(); + +// https://developers.circle.com/stablecoins/evm-smart-contracts contains the CCTP contract addresses +const BASE_TOKEN_MESSENGER_ADDRESS = "0x1682Ae6375C4E4A97e4B583BC394c861A46D8962"; +const ARBITRUM_MESSAGE_TRANSMITTER_ADDRESS = "0xC30362313FBBA5cf9163F0bb16a0e01f01A896ca"; + +// https://developers.circle.com/stablecoins/usdc-on-main-networks contains the USDC contract addresses on chains +const USDC_BASE_ADDRESS = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"; + +const tokenMessengerAbi = [ + { + inputs: [ + { internalType: "uint256", name: "amount", type: "uint256" }, + { internalType: "uint32", name: "destinationDomain", type: "uint32" }, + { internalType: "bytes32", name: "mintRecipient", type: "bytes32" }, + { internalType: "address", name: "burnToken", type: "address" }, + ], + name: "depositForBurn", + outputs: [{ internalType: "uint64", name: "_nonce", type: "uint64" }], + stateMutability: "nonpayable", + type: "function", + }, +]; + +const messageTransmitterAbi = [ + { + inputs: [ + { internalType: "bytes", name: "message", type: "bytes" }, + { internalType: "bytes", name: "attestation", type: "bytes" }, + ], + name: "receiveMessage", + outputs: [{ internalType: "bool", name: "success", type: "bool" }], + stateMutability: "nonpayable", + type: "function", + }, +]; + +async function bridgeUSDC(baseWallet, arbitrumWallet, usdcAmount) { + const baseUSDCBalance = await baseWallet.getBalance("usdc"); + const arbitrumUSDCBalance = await arbitrumWallet.getBalance("usdc"); + console.log( + "Base USDC initial balance:", + baseUSDCBalance, + "| Arbitrum USDC initial balance:", + arbitrumUSDCBalance, + ); + + // pad the recipient address + const arbitrumRecipientAddress = padAddress((await arbitrumWallet.getDefaultAddress()).getId()); + + // step 1 - approve TokenMessenger as the spender on base + const approveTx = await baseWallet.invokeContract({ + contractAddress: USDC_BASE_ADDRESS, + method: "approve", + args: { + spender: BASE_TOKEN_MESSENGER_ADDRESS, + value: usdcAmount.toString(), + }, + }); + await approveTx.wait(); + console.log("Approve transaction completed:", approveTx.getTransactionHash()); + + // step 2 - call depositForBurn + const depositTx = await baseWallet.invokeContract({ + contractAddress: BASE_TOKEN_MESSENGER_ADDRESS, + method: "depositForBurn", + args: { + amount: usdcAmount.toString(), // uint256 as string + destinationDomain: "3", // uint32 as string + mintRecipient: arbitrumRecipientAddress, // already padded bytes32 as hex string + burnToken: USDC_BASE_ADDRESS, + }, + abi: tokenMessengerAbi, + }); + await depositTx.wait(); + console.log("Deposit transaction completed:", depositTx.getTransactionHash()); + + // step 3 - get the messageHash from the transaction receipt logs + const transactionReceipt = await getTransactionReceipt(depositTx.getTransactionHash()); + const eventTopic = keccak256(toBytes("MessageSent(bytes)")); + const log = transactionReceipt.logs.find(l => l.topics[0] === eventTopic); + if (!log) { + throw new Error("MessageSent event not found in transaction logs"); + } + const messageBytes = decodeAbiParameters([{ type: "bytes" }], log.data)[0]; + const messageHash = keccak256(messageBytes); + console.log("Message hash:", messageHash); + + // step 4 - wait for attestation on the message + let attestationResponse = { status: "pending" }; + while (attestationResponse.status != "complete") { + const response = await fetch(`https://iris-api.circle.com/attestations/${messageHash}`); + attestationResponse = await response.json(); + await new Promise(r => setTimeout(r, 2000)); + } + + const attestationSignature = attestationResponse.attestation; + console.log("Received attestation signature from Circle's Iris service:", attestationSignature); + + // step 5 - call receiveMessage on the arbitrum wallet MessageTransmitter + const receiveMessageTx = await arbitrumWallet.invokeContract({ + contractAddress: ARBITRUM_MESSAGE_TRANSMITTER_ADDRESS, + method: "receiveMessage", + args: { + message: messageBytes, + attestation: attestationSignature, + }, + abi: messageTransmitterAbi, + }); + await receiveMessageTx.wait(); + console.log("Receive message transaction completed:", receiveMessageTx.getTransactionHash()); + + const finalBaseUSDCBalance = await baseWallet.getBalance("usdc"); + const finalArbitrumUSDCBalance = await arbitrumWallet.getBalance("usdc"); + console.log( + "Base USDC final balance:", + finalBaseUSDCBalance, + "| Arbitrum USDC final balance:", + finalArbitrumUSDCBalance, + ); +} + +function padAddress(address) { + address = address.replace(/^0x/, ""); + return "0x" + address.padStart(64, "0"); +} + +async function getTransactionReceipt(txHash) { + const publicClient = createPublicClient({ + chain: base, + transport: http(), + }); + const receipt = await publicClient.getTransactionReceipt({ + hash: txHash, + }); + return receipt; +} + +async function fetchWalletAndLoadSeed(walletId, seedFilePath) { + try { + const wallet = await Wallet.fetch(walletId); + await wallet.loadSeedFromFile(seedFilePath); + + console.log(`Successfully loaded funded wallet: `, wallet.getId()); + return wallet; + } catch (error) { + console.error( + `Error loading funded wallet ${walletId} from seed file ${seedFilePath}: `, + error, + ); + } +} + +async function main() { + try { + const { BASE_WALLET_ID, ARBITRUM_WALLET_ID, SEED_FILE_PATH } = process.env; + + // Configure location to CDP API Key. + Coinbase.configureFromJson({ + filePath: `${os.homedir()}/Downloads/cdp_api_key.json`, + }); + + // Fetch funded Wallet. + const baseWallet = await fetchWalletAndLoadSeed(BASE_WALLET_ID, SEED_FILE_PATH); + const arbitrumWallet = await fetchWalletAndLoadSeed(ARBITRUM_WALLET_ID, SEED_FILE_PATH); + + // bridge 1 wei of USDC from base to arbitrum (0.000001 USDC) + await bridgeUSDC(baseWallet, arbitrumWallet, 1); + console.log("Bridge USDC completed"); + } catch (error) { + console.error(`Error in bridging USDC: `, error); + } +} + +main(); diff --git a/quickstart-template/discord_tutorial/.env.example b/quickstart-template/discord_tutorial/.env.example new file mode 100644 index 00000000..c47e7be0 --- /dev/null +++ b/quickstart-template/discord_tutorial/.env.example @@ -0,0 +1,2 @@ +DISCORD_URL="https://DISCORD_URL" +WEBHOOK_NOTIFICATION_URL="https://YOUR_NOTIFICATION_URL" \ No newline at end of file diff --git a/quickstart-template/discord_tutorial/.gitignore b/quickstart-template/discord_tutorial/.gitignore new file mode 100644 index 00000000..e985853e --- /dev/null +++ b/quickstart-template/discord_tutorial/.gitignore @@ -0,0 +1 @@ +.vercel diff --git a/quickstart-template/discord_tutorial/README.md b/quickstart-template/discord_tutorial/README.md new file mode 100644 index 00000000..10b2847c --- /dev/null +++ b/quickstart-template/discord_tutorial/README.md @@ -0,0 +1,26 @@ +# CDP Webhooks Discord bot + +This repo contains a bot that posts messages to Discord whenever you receive a message on your webhook. + +More info on the docs: https://docs.cdp.coinbase.com/get-started/docs/webhooks/discord-bot-demo + +## Prerequisites + +You'll need: + +- [CDP API Key](https://portal.cdp.coinbase.com/access/api) +- A [Discord webhook](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks) URL + +## How to run + +1. First install packages: `npm install` + +2. Setup tunneling, using Pinggy: `npm run start-pinggy` + +3. Copy .env.example into .env file on the same folder and replace the `DISCORD_URL` with your Discord webhook URL and `WEBHOOK_NOTIFICATION_URL` with your pinggy HTTPS URL from previous step. + +4. Run your webhook server: `npm run start-server` + +5. The last step is to execute the transfer using our SDK: `npm run start-transfer` + +If everything was successful, after a few seconds, you should see the transfer event data being posted to your Discord channel. diff --git a/quickstart-template/discord_tutorial/app.cjs b/quickstart-template/discord_tutorial/app.cjs new file mode 100644 index 00000000..efed0bbb --- /dev/null +++ b/quickstart-template/discord_tutorial/app.cjs @@ -0,0 +1,46 @@ +require("dotenv/config"); +const express = require("express"); +const axios = require("axios"); +const bodyParser = require("body-parser"); + +const app = express(); +const jsonParser = bodyParser.json(); + +app.get("/", jsonParser, (req, res) => { + res.send("Your https server is working!"); +}); + +app.post("/", jsonParser, (req, res) => { + if (!process.env.DISCORD_URL) { + console.log("DISCORD_URL is missing from env"); + res.sendStatus(400); + return; + } + + const data = req.body; + + let messageContent = "A new " + data.eventType + " event was received from the webhook: \n```"; + messageContent += JSON.stringify(data, null, 2); + messageContent += "```\n"; + messageContent += `Data received at ${new Date().toLocaleString("en-US")}`; + + const postData = { + content: messageContent, + }; + axios + .post(process.env.DISCORD_URL, postData) + .then(() => { + console.log("Successfully posted message to discord"); + res.sendStatus(200); + }) + .catch(e => { + console.error(e); + res.sendStatus(400); + }); +}); + +app.listen(5000, () => { + console.log("Running on port 5000."); +}); + +module.exports = app; diff --git a/quickstart-template/discord_tutorial/package-lock.json b/quickstart-template/discord_tutorial/package-lock.json new file mode 100644 index 00000000..0f667fdb --- /dev/null +++ b/quickstart-template/discord_tutorial/package-lock.json @@ -0,0 +1,1644 @@ +{ + "name": "discord_quick2", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "discord_quick2", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@coinbase/coinbase-sdk": "^0.10.0", + "axios": "^1.7.7", + "body-parser": "^1.20.3", + "dotenv": "^16.4.5", + "express": "^4.21.1" + } + }, + "node_modules/@adraffy/ens-normalize": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.10.1.tgz", + "integrity": "sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw==", + "license": "MIT" + }, + "node_modules/@coinbase/coinbase-sdk": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@coinbase/coinbase-sdk/-/coinbase-sdk-0.10.0.tgz", + "integrity": "sha512-sqLH7dE/0XSn5jHddjVrC1PR77sQUEytYcQAlH2d8STqRARcvddxVAByECUIL32MpbdJY7Wca3KfSa6qo811Mg==", + "license": "ISC", + "dependencies": { + "@scure/bip32": "^1.4.0", + "abitype": "^1.0.6", + "axios": "^1.6.8", + "axios-mock-adapter": "^1.22.0", + "axios-retry": "^4.4.1", + "bip32": "^4.0.0", + "bip39": "^3.1.0", + "decimal.js": "^10.4.3", + "dotenv": "^16.4.5", + "ethers": "^6.12.1", + "node-jose": "^2.2.0", + "secp256k1": "^5.0.0", + "viem": "^2.21.26" + } + }, + "node_modules/@noble/curves": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.6.0.tgz", + "integrity": "sha512-TlaHRXDehJuRNR9TfZDNQ45mMEd5dwUwmicsafcIX4SsNiqnCHKjE/1alYPd/lDRVhxdhUAlv8uEhMCI5zjIJQ==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.5.0" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/hashes": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.5.0.tgz", + "integrity": "sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA==", + "license": "MIT", + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/base": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.9.tgz", + "integrity": "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==", + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.5.0.tgz", + "integrity": "sha512-8EnFYkqEQdnkuGBVpCzKxyIwDCBLDVj3oiX0EKUFre/tOjL/Hqba1D6n/8RcmaQy4f95qQFrO2A8Sr6ybh4NRw==", + "license": "MIT", + "dependencies": { + "@noble/curves": "~1.6.0", + "@noble/hashes": "~1.5.0", + "@scure/base": "~1.1.7" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip39": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.4.0.tgz", + "integrity": "sha512-BEEm6p8IueV/ZTfQLp/0vhw4NPnT9oWf5+28nvmeUICjP99f4vr2d+qc7AVGDDtwRep6ifR43Yed9ERVmiITzw==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "~1.5.0", + "@scure/base": "~1.1.8" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@types/node": { + "version": "22.7.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.5.tgz", + "integrity": "sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==", + "license": "MIT", + "dependencies": { + "undici-types": "~6.19.2" + } + }, + "node_modules/abitype": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/abitype/-/abitype-1.0.6.tgz", + "integrity": "sha512-MMSqYh4+C/aVqI2RQaWqbvI4Kxo5cQV40WQ4QFtDnNzCkqChm8MuENhElmynZlO0qUy/ObkEUaXtKqYnx1Kp3A==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/wevm" + }, + "peerDependencies": { + "typescript": ">=5.0.4", + "zod": "^3 >=3.22.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + }, + "zod": { + "optional": true + } + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/aes-js": { + "version": "4.0.0-beta.5", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz", + "integrity": "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==", + "license": "MIT" + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "license": "MIT" + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "node_modules/axios": { + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", + "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/axios-mock-adapter": { + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/axios-mock-adapter/-/axios-mock-adapter-1.22.0.tgz", + "integrity": "sha512-dmI0KbkyAhntUR05YY96qg2H6gg0XMl2+qTW0xmYg6Up+BFBAJYRLROMXRdDEL06/Wqwa0TJThAYvFtSFdRCZw==", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "is-buffer": "^2.0.5" + }, + "peerDependencies": { + "axios": ">= 0.17.0" + } + }, + "node_modules/axios-retry": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/axios-retry/-/axios-retry-4.5.0.tgz", + "integrity": "sha512-aR99oXhpEDGo0UuAlYcn2iGRds30k366Zfa05XWScR9QaQD4JYiP3/1Qt1u7YlefUOK+cn0CcwoL1oefavQUlQ==", + "license": "Apache-2.0", + "dependencies": { + "is-retry-allowed": "^2.2.0" + }, + "peerDependencies": { + "axios": "0.x || 1.x" + } + }, + "node_modules/base-x": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.10.tgz", + "integrity": "sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/base64url": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz", + "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==", + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/bip32": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/bip32/-/bip32-4.0.0.tgz", + "integrity": "sha512-aOGy88DDlVUhspIXJN+dVEtclhIsfAUppD43V0j40cPTld3pv/0X/MlrZSZ6jowIaQQzFwP8M6rFU2z2mVYjDQ==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "^1.2.0", + "@scure/base": "^1.1.1", + "typeforce": "^1.11.5", + "wif": "^2.0.6" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/bip39": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bip39/-/bip39-3.1.0.tgz", + "integrity": "sha512-c9kiwdk45Do5GL0vJMe7tS95VjCii65mYAH7DfWl3uW8AVzXKQVUm64i3hzVybBDMp9r7j9iNxR85+ul8MdN/A==", + "license": "ISC", + "dependencies": { + "@noble/hashes": "^1.2.0" + } + }, + "node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "license": "MIT" + }, + "node_modules/body-parser": { + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.13.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", + "license": "MIT" + }, + "node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "license": "MIT", + "dependencies": { + "base-x": "^3.0.2" + } + }, + "node_modules/bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "license": "MIT", + "dependencies": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "license": "MIT" + }, + "node_modules/create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "license": "MIT", + "dependencies": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/decimal.js": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", + "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==", + "license": "MIT" + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "license": "MIT", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/dotenv": { + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT" + }, + "node_modules/elliptic": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.0.tgz", + "integrity": "sha512-dpwoQcLc/2WLQvJvLRHKZ+f9FgOdjnq11rurqwekGQygGPsYSK29OMMD2WalatiqQ+XGFDglTNixpPfI+lpaAA==", + "license": "MIT", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", + "license": "MIT" + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ethers": { + "version": "6.13.4", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.13.4.tgz", + "integrity": "sha512-21YtnZVg4/zKkCQPjrDj38B1r4nQvTZLopUGMLQ1ePU2zV/joCfDC3t3iKQjWRzjjjbzR+mdAIoikeBRNkdllA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/ethers-io/" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@adraffy/ens-normalize": "1.10.1", + "@noble/curves": "1.2.0", + "@noble/hashes": "1.3.2", + "@types/node": "22.7.5", + "aes-js": "4.0.0-beta.5", + "tslib": "2.7.0", + "ws": "8.17.1" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/ethers/node_modules/@noble/curves": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", + "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.3.2" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/ethers/node_modules/@noble/hashes": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", + "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/express": { + "version": "4.21.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz", + "integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==", + "license": "MIT", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.3", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.7.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.3.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.3", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.10", + "proxy-addr": "~2.0.7", + "qs": "6.13.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.19.0", + "serve-static": "1.16.2", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "license": "MIT" + }, + "node_modules/finalhandler": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", + "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", + "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "license": "MIT", + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "license": "MIT", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/is-retry-allowed": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-2.2.0.tgz", + "integrity": "sha512-XVm7LOeLpTW4jV19QSH38vkswxoLud8sQ57YwJVTPWdiaI9I8keEhGFpBlslyVsgdQy4Opg8QOLb8YRgsyZiQg==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isows": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/isows/-/isows-1.0.6.tgz", + "integrity": "sha512-lPHCayd40oW98/I0uvgaHKWCSvkzY27LjWLbtzOm64yQ+G3Q5npjjbdppU65iZXkK1Zt+kH9pfegli0AYfwYYw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/wevm" + } + ], + "license": "MIT", + "peerDependencies": { + "ws": "*" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "license": "MIT" + }, + "node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==", + "license": "Apache-2.0" + }, + "node_modules/md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "license": "MIT", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "license": "ISC" + }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", + "license": "MIT" + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/node-addon-api": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", + "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==", + "license": "MIT" + }, + "node_modules/node-forge": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", + "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==", + "license": "(BSD-3-Clause OR GPL-2.0)", + "engines": { + "node": ">= 6.13.0" + } + }, + "node_modules/node-gyp-build": { + "version": "4.8.2", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.2.tgz", + "integrity": "sha512-IRUxE4BVsHWXkV/SFOut4qTlagw2aM8T5/vnTsmrHJvVoKueJHRc/JaFND7QDDc61kLYUJ6qlZM3sqTSyx2dTw==", + "license": "MIT", + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "node_modules/node-jose": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/node-jose/-/node-jose-2.2.0.tgz", + "integrity": "sha512-XPCvJRr94SjLrSIm4pbYHKLEaOsDvJCpyFw/6V/KK/IXmyZ6SFBzAUDO9HQf4DB/nTEFcRGH87mNciOP23kFjw==", + "license": "Apache-2.0", + "dependencies": { + "base64url": "^3.0.1", + "buffer": "^6.0.3", + "es6-promise": "^4.2.8", + "lodash": "^4.17.21", + "long": "^5.2.0", + "node-forge": "^1.2.1", + "pako": "^2.0.4", + "process": "^0.11.10", + "uuid": "^9.0.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/pako": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", + "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==", + "license": "(MIT AND Zlib)" + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz", + "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==", + "license": "MIT" + }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "license": "MIT", + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "license": "MIT" + }, + "node_modules/qs": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "license": "MIT", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/secp256k1": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-5.0.1.tgz", + "integrity": "sha512-lDFs9AAIaWP9UCdtWrotXWWF9t8PWgQDcxqgAnpM9rMqxb3Oaq2J0thzPVSxBwdJgyQtkU/sYtFtbM1RSt/iYA==", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "elliptic": "^6.5.7", + "node-addon-api": "^5.0.0", + "node-gyp-build": "^4.2.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/send": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/serve-static": { + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", + "license": "MIT", + "dependencies": { + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.19.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC" + }, + "node_modules/sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "license": "(MIT AND BSD-3-Clause)", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" + } + }, + "node_modules/side-channel": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/tslib": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", + "license": "0BSD" + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "license": "MIT", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typeforce": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/typeforce/-/typeforce-1.18.0.tgz", + "integrity": "sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g==", + "license": "MIT" + }, + "node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "license": "MIT" + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/viem": { + "version": "2.21.37", + "resolved": "https://registry.npmjs.org/viem/-/viem-2.21.37.tgz", + "integrity": "sha512-JupwyttT4aJNnP9+kD7E8jorMS5VmgpC3hm3rl5zXsO8WNBTsP3JJqZUSg4AG6s2lTrmmpzS/qpmXMZu5gJw5Q==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/wevm" + } + ], + "license": "MIT", + "dependencies": { + "@adraffy/ens-normalize": "1.11.0", + "@noble/curves": "1.6.0", + "@noble/hashes": "1.5.0", + "@scure/bip32": "1.5.0", + "@scure/bip39": "1.4.0", + "abitype": "1.0.6", + "isows": "1.0.6", + "webauthn-p256": "0.0.10", + "ws": "8.18.0" + }, + "peerDependencies": { + "typescript": ">=5.0.4" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/viem/node_modules/@adraffy/ens-normalize": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.11.0.tgz", + "integrity": "sha512-/3DDPKHqqIqxUULp8yP4zODUY1i+2xvVWsv8A79xGWdCAG+8sb0hRh0Rk2QyOJUnnbyPUAZYcpBuRe3nS2OIUg==", + "license": "MIT" + }, + "node_modules/viem/node_modules/ws": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/webauthn-p256": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/webauthn-p256/-/webauthn-p256-0.0.10.tgz", + "integrity": "sha512-EeYD+gmIT80YkSIDb2iWq0lq2zbHo1CxHlQTeJ+KkCILWpVy3zASH3ByD4bopzfk0uCwXxLqKGLqp2W4O28VFA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/wevm" + } + ], + "license": "MIT", + "dependencies": { + "@noble/curves": "^1.4.0", + "@noble/hashes": "^1.4.0" + } + }, + "node_modules/wif": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/wif/-/wif-2.0.6.tgz", + "integrity": "sha512-HIanZn1zmduSF+BQhkE+YXIbEiH0xPr1012QbFEGB0xsKqJii0/SqJjyn8dFv6y36kOznMgMB+LGcbZTJ1xACQ==", + "license": "MIT", + "dependencies": { + "bs58check": "<3.0.0" + } + }, + "node_modules/ws": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + } + } +} diff --git a/quickstart-template/discord_tutorial/package.json b/quickstart-template/discord_tutorial/package.json new file mode 100644 index 00000000..a53c51e4 --- /dev/null +++ b/quickstart-template/discord_tutorial/package.json @@ -0,0 +1,23 @@ +{ + "name": "discord_quick2", + "version": "1.0.0", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "start-server": "node app.cjs", + "start-transfer": "node webhook-transfer.js", + "start-pinggy": "ssh -p 443 -R0:localhost:5000 a.pinggy.io" + }, + "keywords": [], + "author": "", + "license": "ISC", + "description": "", + "type": "module", + "dependencies": { + "@coinbase/coinbase-sdk": "^0.11.0", + "axios": "^1.7.7", + "body-parser": "^1.20.3", + "dotenv": "^16.4.5", + "express": "^4.21.1" + } +} diff --git a/quickstart-template/discord_tutorial/vercel.json b/quickstart-template/discord_tutorial/vercel.json new file mode 100644 index 00000000..6d43300e --- /dev/null +++ b/quickstart-template/discord_tutorial/vercel.json @@ -0,0 +1,16 @@ +{ + "version": 2, + "builds": [ + { + "src": "app.cjs", + "use": "@now/node" + } + ], + "routes": [ + + { + "src": "/(.*)", + "dest": "app.cjs" + } + ] +} \ No newline at end of file diff --git a/quickstart-template/discord_tutorial/webhook-transfer.js b/quickstart-template/discord_tutorial/webhook-transfer.js new file mode 100644 index 00000000..9499c85d --- /dev/null +++ b/quickstart-template/discord_tutorial/webhook-transfer.js @@ -0,0 +1,120 @@ +import "dotenv/config"; +import { Coinbase, Webhook, Wallet } from "@coinbase/coinbase-sdk"; +import fs from "fs"; + +// Change this to the path of your API key file downloaded from CDP portal. +Coinbase.configureFromJson({ filePath: "/Users/jairdarosajunior/Downloads/cdp_api_key.json" }); +const webhookNotificationUri = process.env.WEBHOOK_NOTIFICATION_URL; + +(async function () { + if (!webhookNotificationUri) { + console.log("WEBHOOK_NOTIFICATION_URL is missing from env file."); + return; + } + const seedPath = "wallet_saved_seeds.json"; + + let myWallet; + let anotherWallet = await Wallet.create(); + + // If Wallet exists, load + if (fs.existsSync(seedPath)) { + console.log("🔄 Wallet exists, re-instantiating..."); + const seedData = transformConfig(seedPath); + myWallet = await Wallet.import(seedData); + console.log("✅ Wallet re-instantiated!"); + } + // Create Wallet + else { + myWallet = await Wallet.create(); + const saveSeed = myWallet.saveSeedToFile(seedPath); + console.log("✅ Seed saved: ", saveSeed); + } + + const balance = await myWallet.getBalance(Coinbase.assets.Usdc); + console.log(`💰 Wallet USDC balance:`, balance); + if (balance <= 0) { + // If wallet doesn't have funds we need to add funds to it + const faucetTx = await myWallet.faucet(Coinbase.assets.Usdc); + + // Wait for the faucet transaction to confirm. + await faucetTx.wait(); + + console.log("✅ Funds added!"); + + // Sometimes funds take a few seconds to be available on the wallet, so lets wait 5 secs + await sleep(5000); + } + + // Now use below code to get wallets addresses so we can use it for adding it to the webhook filter. + let myWalletAddress = await myWallet.getDefaultAddress(); + const myWalletAddressId = myWalletAddress.getId(); + + console.log("💳 myWallet address: ", myWalletAddressId); + + const webhooks = await Webhook.list(); + let shouldCreateWebhook = !webhookAlreadyExists(webhooks); + + if (shouldCreateWebhook) { + console.log("🔄 Creating webhook..."); + await Webhook.create({ + networkId: Coinbase.networks.BaseSepolia, + notificationUri: webhookNotificationUri, + eventType: "wallet_activity", + eventTypeFilter: { + addresses: [myWalletAddressId], + }, + }); + console.log("✅ Webhook created!"); + } else { + console.log("⏩ Skipping Webhook creation..."); + } + + // For testing this above example, let's now create a transfer between both wallets: + // Create transfer from myWallet to anotherWallet + const transfer = await myWallet.createTransfer({ + amount: 0.0001, + assetId: Coinbase.assets.Usdc, + destination: anotherWallet, + gasless: true, // for USDC, you can add gasless flag, so you don't need to add ETH funds for paying for gas fees + }); + + // Wait for the transfer to complete or fail on-chain + await transfer.wait({ + intervalSeconds: 1, // check for transfer completion each 1 second + timeoutSeconds: 30, // keep checking for 30 seconds + }); + console.log("✅ Transfer was successful: ", transfer.toString()); +})(); + +// ========================== UTILS FUNCTIONS =================================== +function webhookAlreadyExists(webhooks) { + for (let currentWebhook of webhooks.data) { + if ( + currentWebhook.getEventType() === "wallet_activity" && + currentWebhook.getNotificationURI() === webhookNotificationUri + ) { + return true; + } + } + return false; +} + +function transformConfig(filePath) { + try { + const rawData = fs.readFileSync(filePath, "utf-8"); + const originalConfig = JSON.parse(rawData); + const walletId = Object.keys(originalConfig)[0]; + const { seed } = originalConfig[walletId]; + return { + walletId, + seed, + }; + } catch (error) { + console.error("Error reading or parsing file:", error); + throw error; + } +} + +function sleep(ms) { + return new Promise(resolve => setTimeout(resolve, ms)); +} diff --git a/quickstart-template/index.js b/quickstart-template/index.js new file mode 100644 index 00000000..0ccd7e68 --- /dev/null +++ b/quickstart-template/index.js @@ -0,0 +1,32 @@ +import { Coinbase, Wallet } from "@coinbase/coinbase-sdk"; + +// Change this to the path of your API key file downloaded from CDP portal. +Coinbase.configureFromJson({ filePath: "~/Downloads/cdp_api_key.json" }); + +// Create a Wallet for the User. +let wallet = await Wallet.create(); +console.log(`Wallet successfully created: `, wallet.toString()); + +// Wallets come with a single default Address, accessible via getDefaultAddress: +let address = await wallet.getDefaultAddress(); +console.log(`Default address for the wallet: `, address.toString()); + +const faucetTransaction = await wallet.faucet(); + +// Wait for the faucet transaction to complete or fail on-chain. +await faucetTransaction.wait(); +console.log(`Faucet transaction successfully completed: `, faucetTransaction.toString()); + +let anotherWallet = await Wallet.create(); +console.log(`Second Wallet successfully created: `, anotherWallet.toString()); + +const transfer = await wallet.createTransfer({ + amount: 0.00001, + assetId: Coinbase.assets.Eth, + destination: anotherWallet, +}); + +// Wait for the transfer to complete or fail on-chain. +await transfer.wait(); + +console.log(`Transfer successfully completed: `, transfer.toString()); diff --git a/quickstart-template/mass-payout.js b/quickstart-template/mass-payout.js new file mode 100644 index 00000000..7131b0ab --- /dev/null +++ b/quickstart-template/mass-payout.js @@ -0,0 +1,109 @@ +import { Coinbase, Wallet } from "@coinbase/coinbase-sdk"; +import { createArrayCsvWriter } from "csv-writer"; +import os from "os"; +import fs from "fs"; +import { parse } from "csv-parse"; + +// Create receiving Wallets. +async function createReceivingWallets() { + // Create 5 receiving Wallets and only store Wallet Addresses. + const addresses = []; + + for (let i = 1; i <= 5; i++) { + let receivingWallet = await Wallet.create(); + console.log(`Receiving Wallet${i} successfully created: `, receivingWallet.toString()); + + let receivingAddress = await receivingWallet.getDefaultAddress(); + console.log(`Default address for Wallet${i}: `, receivingAddress.getId()); + addresses.push([receivingAddress.getId()]); // Storing Address as an array. + } + + return addresses; +} + +// Write to CSV file with receiving Wallet Addresses. +async function writeReceivingAddressesToCsv(addresses) { + // Define CSV file. + const csvWriter = createArrayCsvWriter({ + path: "wallet-array.csv", + header: false, + }); + + // Write Wallet Addresses to CSV file. + await csvWriter.writeRecords(addresses); + console.log("The CSV file was written successfully without headers."); +} + +// Create and fund a sending Wallet. +async function createAndFundSendingWallet() { + // Create sending Wallet. + let sendingWallet = await Wallet.create(); + console.log(`sendingWallet successfully created: `, sendingWallet.toString()); + + // Get sending Wallet Address. + let sendingAddress = await sendingWallet.getDefaultAddress(); + console.log(`Default address for sendingWallet: `, sendingAddress.toString()); + + // Fund sending Wallet. + const faucetTransaction = await sendingWallet.faucet(); + + // Wait for the faucet transaction to complete or fail on-chain. + await faucetTransaction.wait(); + console.log(`Faucet transaction successfully completed: `, faucetTransaction.toString()); + + return sendingWallet; +} + +// Read from CSV file and send mass payout. +async function sendMassPayout(sendingWallet) { + // Define amount to send. + const transferAmount = 0.000002; + const assetId = Coinbase.assets.Eth; + + try { + const parser = fs + .createReadStream("./wallet-array.csv") + .pipe(parse({ delimiter: ",", from_line: 1 })); + + for await (const row of parser) { + const address = row[0]; + if (address) { + try { + const transfer = await sendingWallet.createTransfer({ + // Send payment to each Address in CSV. + amount: transferAmount, + assetId: assetId, + destination: address, + }); + + await transfer.wait(); + + console.log(`Transfer to ${address} successful`); + } catch (error) { + console.error(`Error transferring to ${address}: `, error); + } + } + } + } catch (error) { + console.error(`Error processing CSV file: `, error); + } + + console.log("Finished processing CSV file"); +} + +(async () => { + try { + // Manage CDP Api Key for Coinbase SDK. + // Configure location to CDP API Key. + Coinbase.configureFromJson({ + filePath: `${os.homedir()}/Downloads/cdp_api_key.json`, + }); + + const addresses = await createReceivingWallets(); + await writeReceivingAddressesToCsv(addresses); + const sendingWallet = await createAndFundSendingWallet(); + await sendMassPayout(sendingWallet); + } catch (error) { + console.error(`Error in sending mass payout: `, error); + } +})(); diff --git a/quickstart-template/package-lock.json b/quickstart-template/package-lock.json new file mode 100644 index 00000000..c982ea21 --- /dev/null +++ b/quickstart-template/package-lock.json @@ -0,0 +1,1441 @@ +{ + "name": "quickstart-template", + "version": "1.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "quickstart-template", + "version": "1.1.0", + "license": "ISC", + "dependencies": { + "@coinbase/coinbase-sdk": "^0.8.0", + "@solana/web3.js": "^2.0.0-rc.1", + "bs58": "^6.0.0", + "csv-parse": "^5.5.6", + "csv-writer": "^1.6.0", + "viem": "^2.21.6" + } + }, + "node_modules/@adraffy/ens-normalize": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.10.1.tgz", + "integrity": "sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw==" + }, + "node_modules/@coinbase/coinbase-sdk": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@coinbase/coinbase-sdk/-/coinbase-sdk-0.8.0.tgz", + "integrity": "sha512-O827srI/dW1k5utZTfpv8zWGcxoWVNe+UX04JnMWNx23s5kVrnA9p3us7B7kBgswVDA9e+hk4Ixbr8NH6K5V1A==", + "license": "ISC", + "dependencies": { + "@scure/bip32": "^1.4.0", + "axios": "^1.6.8", + "axios-mock-adapter": "^1.22.0", + "axios-retry": "^4.4.1", + "bip32": "^4.0.0", + "bip39": "^3.1.0", + "decimal.js": "^10.4.3", + "dotenv": "^16.4.5", + "ethers": "^6.12.1", + "node-jose": "^2.2.0", + "secp256k1": "^5.0.0" + } + }, + "node_modules/@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "dependencies": { + "@noble/hashes": "1.4.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/base": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.8.tgz", + "integrity": "sha512-6CyAclxj3Nb0XT7GHK6K4zK6k2xJm6E4Ft0Ohjt4WgegiFUHEtFb2CGzmPmGBwoIhrLsqNLYfLr04Y1GePrzZg==", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "dependencies": { + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip39": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.4.0.tgz", + "integrity": "sha512-BEEm6p8IueV/ZTfQLp/0vhw4NPnT9oWf5+28nvmeUICjP99f4vr2d+qc7AVGDDtwRep6ifR43Yed9ERVmiITzw==", + "dependencies": { + "@noble/hashes": "~1.5.0", + "@scure/base": "~1.1.8" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip39/node_modules/@noble/hashes": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.5.0.tgz", + "integrity": "sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA==", + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@solana/accounts": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/accounts/-/accounts-2.0.0-rc.1.tgz", + "integrity": "sha512-au6grz6iIgepKIbN2HUHKatFhg7mvIvdjFMDYpuEx+AGwK7vHnN5PsJqSCGQydthC2nVQwSZC9IgA5MF5wUHdw==", + "license": "MIT", + "dependencies": { + "@solana/addresses": "2.0.0-rc.1", + "@solana/codecs-core": "2.0.0-rc.1", + "@solana/codecs-strings": "2.0.0-rc.1", + "@solana/errors": "2.0.0-rc.1", + "@solana/rpc-spec": "2.0.0-rc.1", + "@solana/rpc-types": "2.0.0-rc.1" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/addresses": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/addresses/-/addresses-2.0.0-rc.1.tgz", + "integrity": "sha512-g31KrLZdECjAKceShlGoYxnWDmEVklpjPs8xOtnj/HWupEk+Mds4vtmTACTAeJkWZW/3x+z0aexMtO86MKA47g==", + "license": "MIT", + "dependencies": { + "@solana/assertions": "2.0.0-rc.1", + "@solana/codecs-core": "2.0.0-rc.1", + "@solana/codecs-strings": "2.0.0-rc.1", + "@solana/errors": "2.0.0-rc.1" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/assertions": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/assertions/-/assertions-2.0.0-rc.1.tgz", + "integrity": "sha512-dvxYCUB7ftZa5lWcsyMYLsGm204H6yVN8Q3ngluMG0rhTtScMBRklVg7Vs39ISwJOkJWJPGToaZ7DjNJ83bm1Q==", + "license": "MIT", + "dependencies": { + "@solana/errors": "2.0.0-rc.1" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/codecs": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/codecs/-/codecs-2.0.0-rc.1.tgz", + "integrity": "sha512-qxoR7VybNJixV51L0G1RD2boZTcxmwUWnKCaJJExQ5qNKwbpSyDdWfFJfM5JhGyKe9DnPVOZB+JHWXnpbZBqrQ==", + "license": "MIT", + "dependencies": { + "@solana/codecs-core": "2.0.0-rc.1", + "@solana/codecs-data-structures": "2.0.0-rc.1", + "@solana/codecs-numbers": "2.0.0-rc.1", + "@solana/codecs-strings": "2.0.0-rc.1", + "@solana/options": "2.0.0-rc.1" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/codecs-core": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/codecs-core/-/codecs-core-2.0.0-rc.1.tgz", + "integrity": "sha512-bauxqMfSs8EHD0JKESaNmNuNvkvHSuN3bbWAF5RjOfDu2PugxHrvRebmYauvSumZ3cTfQ4HJJX6PG5rN852qyQ==", + "license": "MIT", + "dependencies": { + "@solana/errors": "2.0.0-rc.1" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/codecs-data-structures": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/codecs-data-structures/-/codecs-data-structures-2.0.0-rc.1.tgz", + "integrity": "sha512-rinCv0RrAVJ9rE/rmaibWJQxMwC5lSaORSZuwjopSUE6T0nb/MVg6Z1siNCXhh/HFTOg0l8bNvZHgBcN/yvXog==", + "license": "MIT", + "dependencies": { + "@solana/codecs-core": "2.0.0-rc.1", + "@solana/codecs-numbers": "2.0.0-rc.1", + "@solana/errors": "2.0.0-rc.1" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/codecs-numbers": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/codecs-numbers/-/codecs-numbers-2.0.0-rc.1.tgz", + "integrity": "sha512-J5i5mOkvukXn8E3Z7sGIPxsThRCgSdgTWJDQeZvucQ9PT6Y3HiVXJ0pcWiOWAoQ3RX8e/f4I3IC+wE6pZiJzDQ==", + "license": "MIT", + "dependencies": { + "@solana/codecs-core": "2.0.0-rc.1", + "@solana/errors": "2.0.0-rc.1" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/codecs-strings": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/codecs-strings/-/codecs-strings-2.0.0-rc.1.tgz", + "integrity": "sha512-9/wPhw8TbGRTt6mHC4Zz1RqOnuPTqq1Nb4EyuvpZ39GW6O2t2Q7Q0XxiB3+BdoEjwA2XgPw6e2iRfvYgqty44g==", + "license": "MIT", + "dependencies": { + "@solana/codecs-core": "2.0.0-rc.1", + "@solana/codecs-numbers": "2.0.0-rc.1", + "@solana/errors": "2.0.0-rc.1" + }, + "peerDependencies": { + "fastestsmallesttextencoderdecoder": "^1.0.22", + "typescript": ">=5" + } + }, + "node_modules/@solana/errors": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/errors/-/errors-2.0.0-rc.1.tgz", + "integrity": "sha512-ejNvQ2oJ7+bcFAYWj225lyRkHnixuAeb7RQCixm+5mH4n1IA4Qya/9Bmfy5RAAHQzxK43clu3kZmL5eF9VGtYQ==", + "license": "MIT", + "dependencies": { + "chalk": "^5.3.0", + "commander": "^12.1.0" + }, + "bin": { + "errors": "bin/cli.mjs" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/fast-stable-stringify": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/fast-stable-stringify/-/fast-stable-stringify-2.0.0-rc.1.tgz", + "integrity": "sha512-TN8JY+Sbh5NNq4TqdWil8hXKx2d84bTHvY6jfBXNjM29S0fwpUpVRHUzOkuK1mjjWFNkMpfgJfozC0TjdUbkvA==", + "license": "MIT", + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/functional": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/functional/-/functional-2.0.0-rc.1.tgz", + "integrity": "sha512-BmedS5o8HTlU8/NA22I6urJqat9QYIw0oH6rKdMMBisDwX7MtgJhe38W8iLP7QCcxoJeS4526qaD8uD62+Pheg==", + "license": "MIT", + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/instructions": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/instructions/-/instructions-2.0.0-rc.1.tgz", + "integrity": "sha512-zkfL4WBHPbkMrYsuGZc/sekPa/oALIVvVGUw/gwAervMeLZ34cWCUE6WC2uUUh+bq3OFq0/FSFhAg2YbHHDyUw==", + "license": "MIT", + "dependencies": { + "@solana/errors": "2.0.0-rc.1" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/keys": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/keys/-/keys-2.0.0-rc.1.tgz", + "integrity": "sha512-ls3B0KOvfdiBH3/fnEjHhicfXsLLb4zApJlSX4X8NZ+2TmTJ2Jqa+MakgAzrsxL1FJkTJ1RDboR9xx2CHQtKzw==", + "license": "MIT", + "dependencies": { + "@solana/assertions": "2.0.0-rc.1", + "@solana/codecs-core": "2.0.0-rc.1", + "@solana/codecs-strings": "2.0.0-rc.1", + "@solana/errors": "2.0.0-rc.1" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/options": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/options/-/options-2.0.0-rc.1.tgz", + "integrity": "sha512-mLUcR9mZ3qfHlmMnREdIFPf9dpMc/Bl66tLSOOWxw4ml5xMT2ohFn7WGqoKcu/UHkT9CrC6+amEdqCNvUqI7AA==", + "license": "MIT", + "dependencies": { + "@solana/codecs-core": "2.0.0-rc.1", + "@solana/codecs-data-structures": "2.0.0-rc.1", + "@solana/codecs-numbers": "2.0.0-rc.1", + "@solana/codecs-strings": "2.0.0-rc.1", + "@solana/errors": "2.0.0-rc.1" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/programs": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/programs/-/programs-2.0.0-rc.1.tgz", + "integrity": "sha512-wF49DychwSz3sVmTF51R6DTHBGMP7Uhe7EdmCNu+Ef9EgKBJZFfrViOD6M8Q0b3WH//TV63HNlX/2QmHtJjQHg==", + "license": "MIT", + "dependencies": { + "@solana/addresses": "2.0.0-rc.1", + "@solana/errors": "2.0.0-rc.1" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/promises": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/promises/-/promises-2.0.0-rc.1.tgz", + "integrity": "sha512-iIaC52Ka+omGabGn2LHOSgEm9N2gI7Iyik6LE3DDxZ4MuYmGcJ4E315XuE/UVXWnc9qOfOjgtSaaOYhde0vyrQ==", + "license": "MIT", + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/rpc": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/rpc/-/rpc-2.0.0-rc.1.tgz", + "integrity": "sha512-upqR/Ae5syzQDZkffTdU/09k1Vx073Gt4xkkpcWaTBmW0obVhrlvJvH2k5jrOQ13BZd2NVg1MWMEOBcy3+nJjQ==", + "license": "MIT", + "dependencies": { + "@solana/errors": "2.0.0-rc.1", + "@solana/fast-stable-stringify": "2.0.0-rc.1", + "@solana/functional": "2.0.0-rc.1", + "@solana/rpc-api": "2.0.0-rc.1", + "@solana/rpc-spec": "2.0.0-rc.1", + "@solana/rpc-transformers": "2.0.0-rc.1", + "@solana/rpc-transport-http": "2.0.0-rc.1", + "@solana/rpc-types": "2.0.0-rc.1" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/rpc-api": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/rpc-api/-/rpc-api-2.0.0-rc.1.tgz", + "integrity": "sha512-pg/w+0pgj3msBCC/hkZa9/qZHRdqh7MLsHMJInXnenO+Rzj6IyE47Ig6rt6GuI4OxYy+1d714jcPXVMA8p2YWw==", + "license": "MIT", + "dependencies": { + "@solana/addresses": "2.0.0-rc.1", + "@solana/codecs-core": "2.0.0-rc.1", + "@solana/codecs-strings": "2.0.0-rc.1", + "@solana/errors": "2.0.0-rc.1", + "@solana/keys": "2.0.0-rc.1", + "@solana/rpc-parsed-types": "2.0.0-rc.1", + "@solana/rpc-spec": "2.0.0-rc.1", + "@solana/rpc-transformers": "2.0.0-rc.1", + "@solana/rpc-types": "2.0.0-rc.1", + "@solana/transaction-messages": "2.0.0-rc.1", + "@solana/transactions": "2.0.0-rc.1" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/rpc-parsed-types": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/rpc-parsed-types/-/rpc-parsed-types-2.0.0-rc.1.tgz", + "integrity": "sha512-5/AYNiZvR9do56VJgmTscRwnd9myt6x9uG7b0S3V+K5e0xzA9yJF68SzI4TQSNmLfWXCaVC90xGCWWkM19lLIQ==", + "license": "MIT", + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/rpc-spec": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/rpc-spec/-/rpc-spec-2.0.0-rc.1.tgz", + "integrity": "sha512-E81IoNzLbp24T633klEqlRujd2i/rd8xVkJGt04DL/LGS4/cCWJEhkmOnfljxWafCPUundRXlPtNG3ZmHzEYqA==", + "license": "MIT", + "dependencies": { + "@solana/rpc-spec-types": "2.0.0-rc.1" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/rpc-spec-types": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/rpc-spec-types/-/rpc-spec-types-2.0.0-rc.1.tgz", + "integrity": "sha512-Z0gOrzasTYU+kNNnDDG2snZxBoBPMN8oFc0EE9HiDKN9JEsc+asexzKeq+Nea7JVqVFcN5V3bjqrpD86V5EOiQ==", + "license": "MIT", + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/rpc-subscriptions": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/rpc-subscriptions/-/rpc-subscriptions-2.0.0-rc.1.tgz", + "integrity": "sha512-gHrVNWEbMi8uDO8BzpJkuDiHMcfD4SrfLRohROnHx0SfSlEGxvIkBjPnwOYIoS7IkWk95e19s7hJoBNn2TX4kw==", + "license": "MIT", + "dependencies": { + "@solana/errors": "2.0.0-rc.1", + "@solana/fast-stable-stringify": "2.0.0-rc.1", + "@solana/functional": "2.0.0-rc.1", + "@solana/promises": "2.0.0-rc.1", + "@solana/rpc-subscriptions-api": "2.0.0-rc.1", + "@solana/rpc-subscriptions-spec": "2.0.0-rc.1", + "@solana/rpc-subscriptions-transport-websocket": "2.0.0-rc.1", + "@solana/rpc-transformers": "2.0.0-rc.1", + "@solana/rpc-types": "2.0.0-rc.1" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/rpc-subscriptions-api": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/rpc-subscriptions-api/-/rpc-subscriptions-api-2.0.0-rc.1.tgz", + "integrity": "sha512-HmuJmB+RnpYzpiwDWncYFey0lrdFt8KbFvH0JvxEB7NX6V9NgGQIwRY1bfoaeSwX6t93p4nBWr2ckJWLNjXzCw==", + "license": "MIT", + "dependencies": { + "@solana/addresses": "2.0.0-rc.1", + "@solana/keys": "2.0.0-rc.1", + "@solana/rpc-subscriptions-spec": "2.0.0-rc.1", + "@solana/rpc-transformers": "2.0.0-rc.1", + "@solana/rpc-types": "2.0.0-rc.1", + "@solana/transaction-messages": "2.0.0-rc.1", + "@solana/transactions": "2.0.0-rc.1" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/rpc-subscriptions-spec": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/rpc-subscriptions-spec/-/rpc-subscriptions-spec-2.0.0-rc.1.tgz", + "integrity": "sha512-eXRVlMr9zw4JlBoJgVhFRxFs3Iaowhtt35ZIMD+OoTqgKniL62iGiZ3hXsuMDToMvQCBd0UfI+ZVdF2gLQdg9A==", + "license": "MIT", + "dependencies": { + "@solana/errors": "2.0.0-rc.1", + "@solana/rpc-spec-types": "2.0.0-rc.1" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/rpc-subscriptions-transport-websocket": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/rpc-subscriptions-transport-websocket/-/rpc-subscriptions-transport-websocket-2.0.0-rc.1.tgz", + "integrity": "sha512-NxheQmG6Ku9gjF3TyGbM8Nxx6fOU3m89LdfH9SQNu6yME6VXKWuT1LaY24T707yDOoKZJsOWabRrQtNfJ+3HZA==", + "license": "MIT", + "dependencies": { + "@solana/errors": "2.0.0-rc.1", + "@solana/rpc-subscriptions-spec": "2.0.0-rc.1" + }, + "peerDependencies": { + "typescript": ">=5", + "ws": "^8.14.0" + } + }, + "node_modules/@solana/rpc-transformers": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/rpc-transformers/-/rpc-transformers-2.0.0-rc.1.tgz", + "integrity": "sha512-YM25X4Eeh39UR2AoSrCFn74W99bQk0/DLqyPgZpNBRbszzEifGHqu83NNFwBuPMVc9q7ilf5s6r6pqhWP+5JJw==", + "license": "MIT", + "dependencies": { + "@solana/errors": "2.0.0-rc.1", + "@solana/functional": "2.0.0-rc.1", + "@solana/rpc-spec": "2.0.0-rc.1", + "@solana/rpc-subscriptions-spec": "2.0.0-rc.1", + "@solana/rpc-types": "2.0.0-rc.1" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/rpc-transport-http": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/rpc-transport-http/-/rpc-transport-http-2.0.0-rc.1.tgz", + "integrity": "sha512-Byvn2LnaCgTnEyr78wcgh8SrVHo+L6/l1kXQW05cNAjjbS8d8z4meBUBrXDWHmCsWy7RdnrTcBixPPtE+pUebw==", + "license": "MIT", + "dependencies": { + "@solana/errors": "2.0.0-rc.1", + "@solana/rpc-spec": "2.0.0-rc.1", + "undici-types": "^6.19.5" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/rpc-types": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/rpc-types/-/rpc-types-2.0.0-rc.1.tgz", + "integrity": "sha512-EcGx9VXqA0+uYEdaa1lKTaGBVxLyNL8nkecE4GkqQ+ntRyYlNBPecd4b8siQGSleUQa+Tk/VSPUawSkHqNTLug==", + "license": "MIT", + "dependencies": { + "@solana/addresses": "2.0.0-rc.1", + "@solana/codecs-core": "2.0.0-rc.1", + "@solana/codecs-numbers": "2.0.0-rc.1", + "@solana/codecs-strings": "2.0.0-rc.1", + "@solana/errors": "2.0.0-rc.1" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/signers": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/signers/-/signers-2.0.0-rc.1.tgz", + "integrity": "sha512-dv3oKSF+AIaHKpnSkmzEf+jXVcA3nl015+Mp/WQZYzQJS01dlrmnd4N5DOSn2CaPRJ0TLujHkupxkOFXbe149A==", + "license": "MIT", + "dependencies": { + "@solana/addresses": "2.0.0-rc.1", + "@solana/codecs-core": "2.0.0-rc.1", + "@solana/errors": "2.0.0-rc.1", + "@solana/instructions": "2.0.0-rc.1", + "@solana/keys": "2.0.0-rc.1", + "@solana/transaction-messages": "2.0.0-rc.1", + "@solana/transactions": "2.0.0-rc.1" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/sysvars": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/sysvars/-/sysvars-2.0.0-rc.1.tgz", + "integrity": "sha512-nLiuisgbRw7FkJrxPJOBzf0ro7ZCk0gWgMyLQexe9oPoTzdZnWbHI4ldYDmtfdy2dkPBsNTz6sZ6o75HwnGu0A==", + "license": "MIT", + "dependencies": { + "@solana/accounts": "2.0.0-rc.1", + "@solana/codecs": "2.0.0-rc.1", + "@solana/errors": "2.0.0-rc.1", + "@solana/rpc-types": "2.0.0-rc.1" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/transaction-confirmation": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/transaction-confirmation/-/transaction-confirmation-2.0.0-rc.1.tgz", + "integrity": "sha512-ES671CZUDLaXV46Vv3Kxd22coSQE4DlE7y0s9ChzQ7t4bLGv6DeHlHXU9kQBtou9koLR25wiDUWtvwNUyzUbHw==", + "license": "MIT", + "dependencies": { + "@solana/addresses": "2.0.0-rc.1", + "@solana/codecs-strings": "2.0.0-rc.1", + "@solana/errors": "2.0.0-rc.1", + "@solana/keys": "2.0.0-rc.1", + "@solana/promises": "2.0.0-rc.1", + "@solana/rpc": "2.0.0-rc.1", + "@solana/rpc-subscriptions": "2.0.0-rc.1", + "@solana/rpc-types": "2.0.0-rc.1", + "@solana/transaction-messages": "2.0.0-rc.1", + "@solana/transactions": "2.0.0-rc.1" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/transaction-messages": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/transaction-messages/-/transaction-messages-2.0.0-rc.1.tgz", + "integrity": "sha512-pZTetOtRDwfuK/fyE8FKbtRsLQOTgEIQld3tskB85npUHaEgrnCYzp3nJtMhKOLel3w3f/27VtWLNSrRyyAiew==", + "license": "MIT", + "dependencies": { + "@solana/addresses": "2.0.0-rc.1", + "@solana/codecs-core": "2.0.0-rc.1", + "@solana/codecs-data-structures": "2.0.0-rc.1", + "@solana/codecs-numbers": "2.0.0-rc.1", + "@solana/errors": "2.0.0-rc.1", + "@solana/functional": "2.0.0-rc.1", + "@solana/instructions": "2.0.0-rc.1", + "@solana/rpc-types": "2.0.0-rc.1" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/transactions": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/transactions/-/transactions-2.0.0-rc.1.tgz", + "integrity": "sha512-u9MH2Kk4P0E5rNxATdx/ljR2rp34S9VuC3Jzj9nCMKJ0XwvCD+ddTmIDop5Vs+96Ls9SGj0XaKAJtT+9S7SDpw==", + "license": "MIT", + "dependencies": { + "@solana/addresses": "2.0.0-rc.1", + "@solana/codecs-core": "2.0.0-rc.1", + "@solana/codecs-data-structures": "2.0.0-rc.1", + "@solana/codecs-numbers": "2.0.0-rc.1", + "@solana/codecs-strings": "2.0.0-rc.1", + "@solana/errors": "2.0.0-rc.1", + "@solana/functional": "2.0.0-rc.1", + "@solana/instructions": "2.0.0-rc.1", + "@solana/keys": "2.0.0-rc.1", + "@solana/rpc-types": "2.0.0-rc.1", + "@solana/transaction-messages": "2.0.0-rc.1" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@solana/web3.js": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-2.0.0-rc.1.tgz", + "integrity": "sha512-0fE40ZsJuqSOYOWbt8haHBIbhSfGckxJbwWEK+xRQaWr1sY1+MPUDnBawsLf818g9KRSNnS2Y3+/Sve7A3yfBA==", + "license": "MIT", + "dependencies": { + "@solana/accounts": "2.0.0-rc.1", + "@solana/addresses": "2.0.0-rc.1", + "@solana/codecs": "2.0.0-rc.1", + "@solana/errors": "2.0.0-rc.1", + "@solana/functional": "2.0.0-rc.1", + "@solana/instructions": "2.0.0-rc.1", + "@solana/keys": "2.0.0-rc.1", + "@solana/programs": "2.0.0-rc.1", + "@solana/rpc": "2.0.0-rc.1", + "@solana/rpc-parsed-types": "2.0.0-rc.1", + "@solana/rpc-subscriptions": "2.0.0-rc.1", + "@solana/rpc-types": "2.0.0-rc.1", + "@solana/signers": "2.0.0-rc.1", + "@solana/sysvars": "2.0.0-rc.1", + "@solana/transaction-confirmation": "2.0.0-rc.1", + "@solana/transaction-messages": "2.0.0-rc.1", + "@solana/transactions": "2.0.0-rc.1" + }, + "peerDependencies": { + "typescript": ">=5" + } + }, + "node_modules/@types/node": { + "version": "18.15.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz", + "integrity": "sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==" + }, + "node_modules/abitype": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/abitype/-/abitype-1.0.5.tgz", + "integrity": "sha512-YzDhti7cjlfaBhHutMaboYB21Ha3rXR9QTkNJFzYC4kC8YclaiwPBBBJY8ejFdu2wnJeZCVZSMlQJ7fi8S6hsw==", + "funding": { + "url": "https://github.com/sponsors/wevm" + }, + "peerDependencies": { + "typescript": ">=5.0.4", + "zod": "^3 >=3.22.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + }, + "zod": { + "optional": true + } + } + }, + "node_modules/aes-js": { + "version": "4.0.0-beta.5", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz", + "integrity": "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==" + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "node_modules/axios": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.2.tgz", + "integrity": "sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/axios-mock-adapter": { + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/axios-mock-adapter/-/axios-mock-adapter-1.22.0.tgz", + "integrity": "sha512-dmI0KbkyAhntUR05YY96qg2H6gg0XMl2+qTW0xmYg6Up+BFBAJYRLROMXRdDEL06/Wqwa0TJThAYvFtSFdRCZw==", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "is-buffer": "^2.0.5" + }, + "peerDependencies": { + "axios": ">= 0.17.0" + } + }, + "node_modules/axios-retry": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/axios-retry/-/axios-retry-4.5.0.tgz", + "integrity": "sha512-aR99oXhpEDGo0UuAlYcn2iGRds30k366Zfa05XWScR9QaQD4JYiP3/1Qt1u7YlefUOK+cn0CcwoL1oefavQUlQ==", + "dependencies": { + "is-retry-allowed": "^2.2.0" + }, + "peerDependencies": { + "axios": "0.x || 1.x" + } + }, + "node_modules/base-x": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-5.0.0.tgz", + "integrity": "sha512-sMW3VGSX1QWVFA6l8U62MLKz29rRfpTlYdCqLdpLo1/Yd4zZwSbnUaDfciIAowAqvq7YFnWq9hrhdg1KYgc1lQ==", + "license": "MIT" + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/base64url": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz", + "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/bip32": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/bip32/-/bip32-4.0.0.tgz", + "integrity": "sha512-aOGy88DDlVUhspIXJN+dVEtclhIsfAUppD43V0j40cPTld3pv/0X/MlrZSZ6jowIaQQzFwP8M6rFU2z2mVYjDQ==", + "dependencies": { + "@noble/hashes": "^1.2.0", + "@scure/base": "^1.1.1", + "typeforce": "^1.11.5", + "wif": "^2.0.6" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/bip39": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bip39/-/bip39-3.1.0.tgz", + "integrity": "sha512-c9kiwdk45Do5GL0vJMe7tS95VjCii65mYAH7DfWl3uW8AVzXKQVUm64i3hzVybBDMp9r7j9iNxR85+ul8MdN/A==", + "dependencies": { + "@noble/hashes": "^1.2.0" + } + }, + "node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==" + }, + "node_modules/bs58": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-6.0.0.tgz", + "integrity": "sha512-PD0wEnEYg6ijszw/u8s+iI3H17cTymlrwkKhDhPZq+Sokl3AU4htyBFTjAeNAlCCmg0f53g6ih3jATyCKftTfw==", + "license": "MIT", + "dependencies": { + "base-x": "^5.0.0" + } + }, + "node_modules/bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "dependencies": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/bs58check/node_modules/base-x": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.10.tgz", + "integrity": "sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/bs58check/node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "license": "MIT", + "dependencies": { + "base-x": "^3.0.2" + } + }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commander": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dependencies": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "node_modules/csv-parse": { + "version": "5.5.6", + "resolved": "https://registry.npmjs.org/csv-parse/-/csv-parse-5.5.6.tgz", + "integrity": "sha512-uNpm30m/AGSkLxxy7d9yRXpJQFrZzVWLFBkS+6ngPcZkw/5k3L/jjFuj7tVnEpRn+QgmiXr21nDlhCiUK4ij2A==" + }, + "node_modules/csv-writer": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/csv-writer/-/csv-writer-1.6.0.tgz", + "integrity": "sha512-NOx7YDFWEsM/fTRAJjRpPp8t+MKRVvniAg9wQlUKx20MFrPs73WLJhFf5iteqrxNYnsy924K3Iroh3yNHeYd2g==" + }, + "node_modules/decimal.js": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", + "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==" + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/dotenv": { + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/elliptic": { + "version": "6.5.6", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.6.tgz", + "integrity": "sha512-mpzdtpeCLuS3BmE3pO3Cpp5bbjlOPY2Q0PgoF+Od1XZrHLYI28Xe3ossCmYCQt11FQKEYd9+PF8jymTvtWJSHQ==", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" + }, + "node_modules/ethers": { + "version": "6.13.1", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.13.1.tgz", + "integrity": "sha512-hdJ2HOxg/xx97Lm9HdCWk949BfYqYWpyw4//78SiwOLgASyfrNszfMUNB2joKjvGUdwhHfaiMMFFwacVVoLR9A==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/ethers-io/" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@adraffy/ens-normalize": "1.10.1", + "@noble/curves": "1.2.0", + "@noble/hashes": "1.3.2", + "@types/node": "18.15.13", + "aes-js": "4.0.0-beta.5", + "tslib": "2.4.0", + "ws": "8.17.1" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/ethers/node_modules/@noble/curves": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", + "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", + "dependencies": { + "@noble/hashes": "1.3.2" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/ethers/node_modules/@noble/hashes": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", + "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "node_modules/fastestsmallesttextencoderdecoder": { + "version": "1.0.22", + "resolved": "https://registry.npmjs.org/fastestsmallesttextencoderdecoder/-/fastestsmallesttextencoderdecoder-1.0.22.tgz", + "integrity": "sha512-Pb8d48e+oIuY4MaM64Cd7OW1gt4nxCHs7/ddPPZ/Ic3sg8yVGM7O9wDvZ7us6ScaUupzM+pfBolwtYhN1IxBIw==", + "license": "CC0-1.0", + "peer": true + }, + "node_modules/follow-redirects": { + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "dependencies": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "engines": { + "node": ">=4" + } + }, + "node_modules/is-retry-allowed": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-2.2.0.tgz", + "integrity": "sha512-XVm7LOeLpTW4jV19QSH38vkswxoLud8sQ57YwJVTPWdiaI9I8keEhGFpBlslyVsgdQy4Opg8QOLb8YRgsyZiQg==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isows": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/isows/-/isows-1.0.4.tgz", + "integrity": "sha512-hEzjY+x9u9hPmBom9IIAqdJCwNLax+xrPb51vEPpERoFlIxgmZcHzsT5jKG06nvInKOBGvReAVz80Umed5CczQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/wagmi-dev" + } + ], + "peerDependencies": { + "ws": "*" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" + }, + "node_modules/md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==" + }, + "node_modules/node-addon-api": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", + "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==" + }, + "node_modules/node-forge": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", + "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==", + "engines": { + "node": ">= 6.13.0" + } + }, + "node_modules/node-gyp-build": { + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.1.tgz", + "integrity": "sha512-OSs33Z9yWr148JZcbZd5WiAXhh/n9z8TxQcdMhIOlpN9AhWpLfvVFO73+m77bBABQMaY9XSvIa+qk0jlI7Gcaw==", + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "node_modules/node-jose": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/node-jose/-/node-jose-2.2.0.tgz", + "integrity": "sha512-XPCvJRr94SjLrSIm4pbYHKLEaOsDvJCpyFw/6V/KK/IXmyZ6SFBzAUDO9HQf4DB/nTEFcRGH87mNciOP23kFjw==", + "dependencies": { + "base64url": "^3.0.1", + "buffer": "^6.0.3", + "es6-promise": "^4.2.8", + "lodash": "^4.17.21", + "long": "^5.2.0", + "node-forge": "^1.2.1", + "pako": "^2.0.4", + "process": "^0.11.10", + "uuid": "^9.0.0" + } + }, + "node_modules/pako": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", + "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==" + }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/secp256k1": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-5.0.0.tgz", + "integrity": "sha512-TKWX8xvoGHrxVdqbYeZM9w+izTF4b9z3NhSaDkdn81btvuh+ivbIMGT/zQvDtTFWhRlThpoz6LEYTr7n8A5GcA==", + "hasInstallScript": true, + "dependencies": { + "elliptic": "^6.5.4", + "node-addon-api": "^5.0.0", + "node-gyp-build": "^4.2.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + }, + "node_modules/typeforce": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/typeforce/-/typeforce-1.18.0.tgz", + "integrity": "sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g==" + }, + "node_modules/typescript": { + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", + "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", + "license": "Apache-2.0", + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "license": "MIT" + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/viem": { + "version": "2.21.6", + "resolved": "https://registry.npmjs.org/viem/-/viem-2.21.6.tgz", + "integrity": "sha512-YX48IVl6nZ4FRsY4ypv2RrxtQVWysIY146/lBW53tma8u32h8EsiA7vecw9ZbrueNUy/asHR4Egu68Z6FOvDzQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/wevm" + } + ], + "dependencies": { + "@adraffy/ens-normalize": "1.10.0", + "@noble/curves": "1.4.0", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.4.0", + "abitype": "1.0.5", + "isows": "1.0.4", + "webauthn-p256": "0.0.5", + "ws": "8.17.1" + }, + "peerDependencies": { + "typescript": ">=5.0.4" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/viem/node_modules/@adraffy/ens-normalize": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.10.0.tgz", + "integrity": "sha512-nA9XHtlAkYfJxY7bce8DcN7eKxWWCWkU+1GR9d+U6MbNpfwQp8TI7vqOsBsMcHoT4mBu2kypKoSKnghEzOOq5Q==" + }, + "node_modules/viem/node_modules/@noble/curves": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.0.tgz", + "integrity": "sha512-p+4cb332SFCrReJkCYe8Xzm0OWi4Jji5jVdIZRL/PmacmDkFNw6MrrV+gGpiPxLHbV+zKFRywUWbaseT+tZRXg==", + "dependencies": { + "@noble/hashes": "1.4.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/webauthn-p256": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/webauthn-p256/-/webauthn-p256-0.0.5.tgz", + "integrity": "sha512-drMGNWKdaixZNobeORVIqq7k5DsRC9FnG201K2QjeOoQLmtSDaSsVZdkg6n5jUALJKcAG++zBPJXmv6hy0nWFg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/wevm" + } + ], + "dependencies": { + "@noble/curves": "^1.4.0", + "@noble/hashes": "^1.4.0" + } + }, + "node_modules/wif": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/wif/-/wif-2.0.6.tgz", + "integrity": "sha512-HIanZn1zmduSF+BQhkE+YXIbEiH0xPr1012QbFEGB0xsKqJii0/SqJjyn8dFv6y36kOznMgMB+LGcbZTJ1xACQ==", + "dependencies": { + "bs58check": "<3.0.0" + } + }, + "node_modules/ws": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + } + } +} diff --git a/quickstart-template/package.json b/quickstart-template/package.json new file mode 100644 index 00000000..d93e1570 --- /dev/null +++ b/quickstart-template/package.json @@ -0,0 +1,30 @@ +{ + "name": "quickstart-template", + "version": "1.1.0", + "description": "", + "main": "index.js", + "scripts": { + "start-webhook-wallet-transfer": "node webhook-wallet-transfer.js", + "start-wallet-history": "node wallet-history.js", + "start": "node index.js", + "start-trade-assets": "node trade-assets.js", + "start-mass-payout": "node mass-payout.js", + "start-webhook": "node webhook.js", + "solana-list-rewards": "tsx solana_list_rewards.ts", + "solana-stake": "tsx solana_stake.ts", + "start-bridge-usdc": "node bridge-usdc.js", + "start-register-basename": "node register-basename.js" + }, + "keywords": [], + "author": "", + "license": "ISC", + "type": "module", + "dependencies": { + "@solana/web3.js": "^2.0.0-rc.1", + "bs58": "^6.0.0", + "@coinbase/coinbase-sdk": "^0.25.0", + "csv-parse": "^5.5.6", + "csv-writer": "^1.6.0", + "viem": "^2.21.6" + } +} diff --git a/quickstart-template/register-basename.js b/quickstart-template/register-basename.js new file mode 100644 index 00000000..d2a30fc9 --- /dev/null +++ b/quickstart-template/register-basename.js @@ -0,0 +1,168 @@ +import { Coinbase, Wallet } from "@coinbase/coinbase-sdk"; +import { encodeFunctionData, namehash } from "viem"; +import os from "os"; + +// Relevant ABI for L2 Resolver Contract. +const l2ResolverABI = [ + { + inputs: [ + { internalType: "bytes32", name: "node", type: "bytes32" }, + { internalType: "address", name: "a", type: "address" }, + ], + name: "setAddr", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "bytes32", name: "node", type: "bytes32" }, + { internalType: "string", name: "newName", type: "string" }, + ], + name: "setName", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +// Relevant ABI for Basenames Registrar Controller Contract. +const registrarABI = [ + { + inputs: [ + { + components: [ + { + internalType: "string", + name: "name", + type: "string", + }, + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "uint256", + name: "duration", + type: "uint256", + }, + { + internalType: "address", + name: "resolver", + type: "address", + }, + { + internalType: "bytes[]", + name: "data", + type: "bytes[]", + }, + { + internalType: "bool", + name: "reverseRecord", + type: "bool", + }, + ], + internalType: "struct RegistrarController.RegisterRequest", + name: "request", + type: "tuple", + }, + ], + name: "register", + outputs: [], + stateMutability: "payable", + type: "function", + }, +]; + +// Basenames Registrar Controller Contract Address. +const BaseNamesRegistrarControllerAddress = "0x4cCb0BB02FCABA27e82a56646E81d8c5bC4119a5"; + +// L2 Resolver Contract Address. +const L2ResolverAddress = "0xC6d566A56A1aFf6508b41f6c90ff131615583BCD"; + +// Create register contract method arguments. +function createRegisterContractMethodArgs(baseName, addressId) { + const addressData = encodeFunctionData({ + abi: l2ResolverABI, + functionName: "setAddr", + args: [namehash(baseName), addressId], + }); + const nameData = encodeFunctionData({ + abi: l2ResolverABI, + functionName: "setName", + args: [namehash(baseName), baseName], + }); + + const registerArgs = { + request: [ + baseName.replace(/\.base\.eth$/, ""), + addressId, + "31557600", + L2ResolverAddress, + [addressData, nameData], + true, + ], + }; + console.log(`Register contract method arguments constructed: `, registerArgs); + + return registerArgs; +} + +// Register a Basename for the given Wallet. +async function registerBaseName(wallet, registerArgs) { + try { + const contractInvocation = await wallet.invokeContract({ + contractAddress: BaseNamesRegistrarControllerAddress, + method: "register", + abi: registrarABI, + args: registerArgs, + amount: 0.002, + assetId: Coinbase.assets.Eth, + }); + + await contractInvocation.wait(); + + console.log(`Successfully registered Basename ${registerArgs[0]} for wallet: `, wallet); + } catch (error) { + console.error(`Error registering a Basename for ${wallet}: `, error); + } +} + +// Fetch a funded Wallet and load its Seed. +async function fetchWalletAndLoadSeed(walletId, seedFilePath) { + try { + const wallet = await Wallet.fetch(walletId); + await wallet.loadSeedFromFile(seedFilePath); + + console.log(`Successfully loaded funded wallet: `, wallet); + return wallet; + } catch (error) { + console.error( + `Error loading funded wallet ${walletId} from seed file ${seedFilePath}: `, + error, + ); + } +} + +(async () => { + try { + const { BASE_NAME, WALLET_ID, SEED_FILE_PATH } = process.env; + + // Manage CDP API Key for Coinbase SDK. + // Configure location to CDP API Key. + Coinbase.configureFromJson({ + filePath: `${os.homedir()}/Downloads/cdp_api_key.json`, + }); + + // Fetch funded Wallet. + const wallet = await fetchWalletAndLoadSeed(WALLET_ID, SEED_FILE_PATH); + const defaultAddress = await wallet.getDefaultAddress(); + + // Register Basename. + const registerArgs = createRegisterContractMethodArgs(BASE_NAME, defaultAddress.getId()); + await registerBaseName(wallet, registerArgs); + } catch (error) { + console.error(`Error in registering a Basename for my wallet: `, error); + } +})(); diff --git a/quickstart-template/solana_list_rewards.ts b/quickstart-template/solana_list_rewards.ts new file mode 100644 index 00000000..9d9af970 --- /dev/null +++ b/quickstart-template/solana_list_rewards.ts @@ -0,0 +1,35 @@ +import { StakingReward, Coinbase, Address } from "@coinbase/coinbase-sdk"; +import { coinbaseApiKeyPath, getKeypair } from "./solana_wallet"; + +// list solana staking rewards for the provided wallet on solana-mainnet +// then get the historical staking balances for the same wallet. +// use May 2024 until current the today's date. +async function listSolanaStakingRewards(wallet: string) { + const startTime = new Date(2024, 5).toISOString(); + + const rewards = await StakingReward.list( + "solana-mainnet", + Coinbase.assets.Sol, + [wallet], + startTime, + new Date().toISOString(), + ); + console.log(rewards); + + const addr = new Address("solana-mainnet", wallet); + const balances = await addr.historicalStakingBalances( + Coinbase.assets.Sol, + startTime, + new Date().toISOString(), + ); + console.log(balances); +} + +// Initialize the sdk with the api key +Coinbase.configureFromJson({ filePath: coinbaseApiKeyPath() }); + +// GetKeypair will try to read the default path of the solana CLI keypair +const keyPair = getKeypair(); +keyPair.then(kp => { + listSolanaStakingRewards(kp.address); +}); diff --git a/quickstart-template/solana_stake.ts b/quickstart-template/solana_stake.ts new file mode 100644 index 00000000..eec1e9af --- /dev/null +++ b/quickstart-template/solana_stake.ts @@ -0,0 +1,118 @@ +import { Coinbase } from "@coinbase/coinbase-sdk"; +import { coinbaseApiKeyPath, getKeypair } from "./solana_wallet"; +import { + KeyPairSigner, + createSolanaRpc, + getBase64EncodedWireTransaction, + getTransactionDecoder, + signTransaction, +} from "@solana/web3.js"; +import * as bs58 from "bs58"; +import { NetworkIdentifier } from "@coinbase/coinbase-sdk/dist/client"; + +// Get data about staking for the provided wallet, get stakable balance, unstakeable balances and +// balances that can be claimed back. +async function stakeOperations(signer: KeyPairSigner) { + const ctx = ( + await Coinbase.apiClients.stake?.getStakingContext({ + network_id: "solana-devnet", + address_id: signer.address.toString(), + asset_id: Coinbase.assets.Sol, + options: {}, + }) + )?.data.context; + + console.log("Stakeable: "); + console.log(ctx?.stakeable_balance.amount); + console.log(ctx?.stakeable_balance.asset); + let ops: Array = new Array(); + + { + const amount = ctx?.stakeable_balance.amount + ? BigInt(ctx?.stakeable_balance.amount.toString()) + : 0; + if (amount > 1) + ops.push( + (await Coinbase.apiClients.stake!.buildStakingOperation({ + action: "stake", + address_id: signer.address.toString(), + asset_id: Coinbase.assets.Sol, + network_id: NetworkIdentifier.SolanaDevnet, + options: { amount: "100000000" }, + }))!.data!, + ); + } + + console.log("Unstakeable: "); + console.log(ctx?.unstakeable_balance.amount); + console.log(ctx?.unstakeable_balance.asset); + + { + const amount = ctx?.unstakeable_balance.amount + ? BigInt(ctx?.unstakeable_balance.amount.toString()) + : 0; + if (amount > 1) + ops.push( + (await Coinbase.apiClients.stake!.buildStakingOperation({ + action: "unstake", + address_id: signer.address.toString(), + asset_id: Coinbase.assets.Sol, + network_id: NetworkIdentifier.SolanaDevnet, + options: { amount: "100000000" }, + }))!.data!, + ); + } + + console.log("Claimable: "); + console.log(ctx?.claimable_balance.amount); + console.log(ctx?.claimable_balance.asset); + + { + const amount = ctx?.claimable_balance.amount + ? BigInt(ctx?.claimable_balance.amount.toString()) + : 0; + if (amount > 1) + ops.push( + (await Coinbase.apiClients.stake!.buildStakingOperation({ + action: "claim_stake", + address_id: signer.address.toString(), + asset_id: Coinbase.assets.Sol, + network_id: NetworkIdentifier.SolanaDevnet, + options: { amount: "100000000" }, + }))!.data!, + ); + } + + const rpc = createSolanaRpc("https://api.devnet.solana.com"); + + for (let op of ops) { + for (let tx of op.transactions) { + let txmsg = getTransactionDecoder().decode(bs58.default.decode(tx.unsigned_payload)); + let signed = await signTransaction([signer.keyPair], txmsg); + let sig = await rpc + .sendTransaction(getBase64EncodedWireTransaction(signed), { encoding: "base64" }) + .send(); + + console.log(`txLink: ${getTxLink(NetworkIdentifier.SolanaDevnet, sig)}`); + } + } +} + +function getTxLink(networkID: string, signature: string): string { + if (networkID == "solana-mainnet") { + return "https://explorer.solana.com/tx/" + signature; + } else if (networkID == "solana-devnet") { + return "https://explorer.solana.com/tx/" + signature + "?cluster=devnet"; + } + + return ""; +} + +// Initialize the sdk with the api key +Coinbase.configureFromJson({ filePath: coinbaseApiKeyPath() }); + +// GetKeypair will try to read the default path of the solana CLI keypair +const keyPair = getKeypair(); +keyPair.then(kp => { + stakeOperations(kp); +}); diff --git a/quickstart-template/solana_wallet.ts b/quickstart-template/solana_wallet.ts new file mode 100644 index 00000000..06e69b25 --- /dev/null +++ b/quickstart-template/solana_wallet.ts @@ -0,0 +1,29 @@ +import { KeyPairSigner, createKeyPairSignerFromBytes } from "@solana/web3.js"; +import { readFileSync } from "fs"; +import { homedir } from "os"; +import { env } from "process"; + +const DEFAULT_SOLANA_CLI_WALLET_PATH = "~/.config/solana/id.json"; +const CB_KEYPAIR_ENV_VAR = "COINBASE_SDK_KEY"; +const DEFAULT_KEY_PATH = "~/.config/coinbase/api-key.json"; + +// Looks for the api key in the home config dir if it's not present it will look +// for the path on the COINBASE_SDK_KEY env var. +export function coinbaseApiKeyPath(): string { + const key = env[CB_KEYPAIR_ENV_VAR]; + + return key ? key : DEFAULT_KEY_PATH; +} + +// Get a solana-cli compatible key from disk, defaults to the default solana-cli wallet path. +export async function getKeypair(path?: string): Promise { + const bs = readFileSync(replaceHome(path ? path : DEFAULT_SOLANA_CLI_WALLET_PATH)); + + const pkBytes = new Uint8Array(JSON.parse(bs.toString())); + + return await createKeyPairSignerFromBytes(pkBytes); +} + +function replaceHome(filePath: string): string { + return filePath.startsWith("~") ? filePath.replace("~", homedir()) : filePath; +} diff --git a/quickstart-template/trade-assets.js b/quickstart-template/trade-assets.js new file mode 100644 index 00000000..622c2c00 --- /dev/null +++ b/quickstart-template/trade-assets.js @@ -0,0 +1,17 @@ +import { Coinbase, Wallet } from "@coinbase/coinbase-sdk"; + +Coinbase.configureFromJson({ filePath: "~/Downloads/cdp_api_key.json" }); + +// Create a Wallet on base-mainnet to trade assets with. +let wallet = await Wallet.create({ networkId: Coinbase.networks.BaseMainnet }); + +/* + * Fund the Wallet's default Address with ETH from an external source. + * Trade 0.00001 ETH to USDC. + */ +let trade = await wallet.createTrade(0.00001, Coinbase.assets.Eth, Coinbase.assets.Usdc); + +// Wait for the trade to complete or fail on-chain. +await trade.wait(); + +console.log(`Trade successfully completed: `, trade.toString()); diff --git a/quickstart-template/wallet-history.js b/quickstart-template/wallet-history.js new file mode 100644 index 00000000..9f210c02 --- /dev/null +++ b/quickstart-template/wallet-history.js @@ -0,0 +1,206 @@ +import { Coinbase, Wallet } from "@coinbase/coinbase-sdk"; + +// Change this to the path of your API key file downloaded from CDP portal. +Coinbase.configureFromJson({ filePath: "~/Downloads/cdp_api_key.json" }); + +(async function () { + // Create wallets for transferring funds between each other + let myWallet = await Wallet.create(); + let anotherWallet = await Wallet.create(); + + console.log("Wallets created! ..."); + + let myWalletDefaultAddress = await myWallet.getDefaultAddress(); + let anotherWalletDefaultAddress = await anotherWallet.getDefaultAddress(); + const myWalletAddressId = myWalletDefaultAddress.getId(); + const anotherWalletAddressId = anotherWalletDefaultAddress.getId(); + console.log("myWallet address: ", myWalletAddressId); + console.log("anotherWallet address: ", anotherWalletAddressId); + + // Faucet wallet to add some funds + const usdcFaucetTx = await myWallet.faucet(Coinbase.assets.Usdc); // USDC funds to actual transaction + await sleep(2000); + const ethFaucetTx = await myWallet.faucet(Coinbase.assets.Eth); // ETH funds for transfer gas fee (USDC gas fee is charged in ETH) + + // Wait for the faucet transactions to complete or fail on-chain. + await usdcFaucetTx.wait(); + await ethFaucetTx.wait(); + + console.log("\nFunds added to myWallet! ..."); + console.log("Funds available on myWallet:", (await myWallet.listBalances()).toString()); + console.log("Funds available on anotherWallet:", (await anotherWallet.listBalances()).toString()); + + const TRANSFER_AMOUNT = 0.0001; + const TRANSFER_NUMBER = 3; + let ASSET = Coinbase.assets.Usdc; + // ASSET = Coinbase.assets.Eth; // Uncomment for changing the asset to ETH + + console.log( + "\n\n------------------------------------------------------------------------------------------------------------------", + ); + console.log( + `We're going to transfer ${TRANSFER_AMOUNT} ${ASSET} ${TRANSFER_NUMBER} times from myWallet to anotherWallet...`, + ); + console.log( + "------------------------------------------------------------------------------------------------------------------", + ); + console.log("Please press Enter to continue..."); + await waitForEnter(); + + for (let i = 1; i <= TRANSFER_NUMBER; i++) { + console.log(`Creating transfer ${i} of ${TRANSFER_NUMBER}...`); + + // Create transfer from myWallet to anotherWallet + const transfer = await myWallet.createTransfer({ + amount: TRANSFER_AMOUNT, + assetId: ASSET, + destination: anotherWallet, + gasless: true, // for USDC, you can also add gasless flag, so you don't need to add ETH funds for paying for gas fees + }); + + try { + // Wait for the transfer to complete or fail on-chain + await transfer.wait({ + intervalSeconds: 1, // check for transfer completion each 1 second + timeoutSeconds: 30, // keep checking for 30 seconds + }); + console.log(`Transfer ${i} successfully completed: `, transfer.toString()); + } catch (e) { + console.log( + `Some error happened (this doesn't necessarily mean transfer failed) :`, + e.toString(), + ); + } + console.log( + "------------------------------------------------------------------------------------------------------------------", + ); + } + + console.log( + "Funds available on myWallet after transfers:", + (await myWallet.listBalances()).toString(), + ); + console.log( + "Funds available on anotherWallet after transfer (previously no balance):", + (await anotherWallet.listBalances()).toString(), + ); + + console.log( + "\n\n------------------------------------------------------------------------------------------------------------------", + ); + console.log( + `We're going to transfer ${TRANSFER_AMOUNT} ${ASSET} back from anotherWallet to myWallet...`, + ); + console.log( + "------------------------------------------------------------------------------------------------------------------", + ); + console.log("Please press Enter to continue..."); + await waitForEnter(); + + console.log( + `\nTransferring ${TRANSFER_AMOUNT} ${ASSET} back from anotherWallet to myWallet...\n`, + ); + // Transfer back to myWallet a small amount + const transfer = await anotherWallet.createTransfer({ + amount: TRANSFER_AMOUNT, + assetId: ASSET, + destination: myWallet, + gasless: true, // for USDC, you can also add gasless flag, so you don't need to add ETH funds for paying for gas fees + }); + + try { + // Wait for the transfer to complete or fail on-chain + await transfer.wait({ + intervalSeconds: 1, // check for transfer completion each 1 second + timeoutSeconds: 30, // keep checking for 30 seconds + }); + console.log(`Transfer successfully completed: `, transfer.toString()); + } catch (e) { + console.log( + `Some error happened (this doesn't necessarily mean transfer failed) :`, + e.toString(), + ); + } + + console.log( + "------------------------------------------------------------------------------------------------------------------", + ); + console.log( + "\nFunds available on myWallet after transfers:", + (await myWallet.listBalances()).toString(), + ); + console.log( + `Funds available on anotherWallet after transfer (previously ${(TRANSFER_AMOUNT * TRANSFER_NUMBER).toFixed(4)}):`, + (await anotherWallet.listBalances()).toString(), + ); + console.log( + "\n------------------------------------------------------------------------------------------------------------------", + ); + + console.log("Note: transactions can take a few seconds to appear on the listTransactions."); + console.log("Waiting a few secs for transactions to be processed..."); + await sleep(6000); + + console.log("\nPlease press Enter to list the anotherWallet history..."); + await waitForEnter(); + + /* + * Wallets come with a single default Address, accessible via getDefaultAddress() + * From the wallet default address object, you can list the transactions that were just made: + */ + let anotherWalletAddress = await anotherWallet.getDefaultAddress(); + + // Use for listing all received transfers + let transactions = (await anotherWalletAddress.listTransactions()).data; + + console.log( + "\n------------------------------------------------------------------------------------------------------------------", + ); + console.log("Please note: Transactions can take some time to appear in .listTransactions()"); + console.log(`Transaction list (${transactions.length}):\n`); + for (const transaction of transactions) { + console.log(transaction.toString()); + console.log("\n"); + } + console.log( + "------------------------------------------------------------------------------------------------------------------", + ); + + while (transactions.length === 0) { + console.log("No transactions found. Press enter to continue waiting..."); + await waitForEnter(); + transactions = (await anotherWalletAddress.listTransactions()).data; + } + + // You can also get a specific transaction link to see transaction details on basescan. + console.log("transactions[0] transaction_link:", transactions[0].getTransactionLink()); + console.log( + "More details on what is available on transaction object here: https://coinbase.github.io/coinbase-sdk-nodejs/classes/coinbase_transaction.Transaction.html", + ); + + const firstTransactionContent = transactions[0].content(); + console.log( + "\ntransactions[0].content() block_timestamp:", + firstTransactionContent.block_timestamp, + ); + console.log( + "More details on what is available on transaction.content() here: https://coinbase.github.io/coinbase-sdk-nodejs/interfaces/client_api.EthereumTransaction.html", + ); + + console.log("\nCompleted!"); +})().then(process.exit); + +// -------------------------------------------------------------------------------------------------------------------------------- +function waitForEnter() { + return new Promise(resolve => { + process.stdin.on("data", function (chunk) { + if (chunk[0] === 10) { + resolve(); + } + }); + }); +} + +function sleep(ms) { + return new Promise(resolve => setTimeout(resolve, ms)); +} diff --git a/quickstart-template/webhook-wallet-transfer.js b/quickstart-template/webhook-wallet-transfer.js new file mode 100644 index 00000000..9617318d --- /dev/null +++ b/quickstart-template/webhook-wallet-transfer.js @@ -0,0 +1,125 @@ +import { Coinbase, Wallet, Webhook } from "@coinbase/coinbase-sdk"; + +// Change this to the path of your API key file downloaded from CDP portal. +Coinbase.configureFromJson({ filePath: "~/Downloads/cdp_api_key.json" }); + +// Change this to your webhook URL +const webhookNotificationUri = ""; + +(async function () { + console.log( + "------------------------------------------------------------------------------------------------------------------", + ); + console.log("Please make sure you have replaced the webhook notificationUri on the code."); + console.log( + "------------------------------------------------------------------------------------------------------------------", + ); + console.log("Please press Enter to continue..."); + await waitForEnter(); + + // Create wallets for transferring funds between each other + let myWallet = await Wallet.create(); + let anotherWallet = await Wallet.create(); + + console.log("Wallets created! ..."); + + // Wallets come with a single default Address, accessible via getDefaultAddress() + let myWalletAddress = await myWallet.getDefaultAddress(); + let anotherWalletAddress = await anotherWallet.getDefaultAddress(); + + // Get both wallet addresses + const myWalletAddressId = myWalletAddress.getId(); + const anotherWalletAddressId = anotherWalletAddress.getId(); + + console.log("Wallets addresses fetched! ..."); + + try { + // Faucet wallet to add some funds + const usdcFaucetTx = await myWallet.faucet(Coinbase.assets.Usdc); // USDC funds to actual transaction + const ethFaucetTx = await myWallet.faucet(Coinbase.assets.Eth); // ETH funds for transfer gas fee (USDC gas fee is charged in ETH) + + // Wait for the faucet transactions to complete or fail on-chain. + await usdcFaucetTx.wait(); + await ethFaucetTx.wait(); + + console.log("Funds added to myWallet! ..."); + } catch (e) { + console.log( + "------------------------------------------------------------------------------------------------------------------", + ); + console.log("We're not able to add funds to the wallet we just created."); + + console.log(`Please add some funds to wallet: ${myWalletAddressId}`); + console.log("Please press Enter after you added the funds to continue..."); + await waitForEnter(); + } + + console.log("Funds available on myWallet:", (await myWallet.listBalances()).toString()); + + // Let's create a webhook that will be triggered when a transfer happens between the two wallets created above + // Don't forget to replace the notificationUri and signatureHeader + let webhook = await Webhook.create({ + networkId: Coinbase.networks.BaseSepolia, // Listening on sepolia testnet transactions + notificationUri: webhookNotificationUri, // Your webhook address + eventType: "erc20_transfer", + eventFilters: [ + { + // Webhook will only be triggered when these filter criteria are met + from_address: myWalletAddressId, + to_address: anotherWalletAddressId, + }, + ], + }); + + console.log(`\nWebhook successfully created: `, webhook.toString()); + + // You can fetch all the information used on webhook creation using getters functions: + console.log(`\nWebhook event filters: `, webhook.getEventFilters()); + console.log(`Webhook event type: `, webhook.getEventType()); + console.log(`Webhook network id: `, webhook.getNetworkId()); + console.log(`Webhook notification URI: `, webhook.getNotificationURI()); + + console.log( + "\n\n------------------------------------------------------------------------------------------------------------------", + ); + console.log(`Before transferring, please make sure your webhook is listening for requests.`); + console.log( + "------------------------------------------------------------------------------------------------------------------", + ); + console.log("Please press Enter to continue..."); + await waitForEnter(); + + console.log("Creating transfer..."); + // Create transfer from myWallet to anotherWallet + const transfer = await myWallet.createTransfer({ + amount: 0.0001, + assetId: Coinbase.assets.Usdc, + destination: anotherWallet, + gasless: true, // for USDC, you can also add gasless flag, so you don't need to add ETH funds for paying for gas fees + }); + + // Wait for the transfer to complete or fail on-chain + await transfer.wait(); + console.log(`Transfer successfully completed: `, transfer.toString()); + + console.log( + "\n\n------------------------------------------------------------------------------------------------------------------", + ); + console.log( + "Be aware that after transfer is successfully completed, it may take a few minutes for the webhook to be triggered.", + ); + console.log( + "------------------------------------------------------------------------------------------------------------------", + ); +})().then(process.exit); + +// -------------------------------------------------------------------------------------------------------------------------------- +function waitForEnter() { + return new Promise(resolve => { + process.stdin.on("data", function (chunk) { + if (chunk[0] === 10) { + resolve(); + } + }); + }); +} diff --git a/quickstart-template/webhook.js b/quickstart-template/webhook.js new file mode 100644 index 00000000..f963ba84 --- /dev/null +++ b/quickstart-template/webhook.js @@ -0,0 +1,23 @@ +import { Coinbase, Webhook } from "@coinbase/coinbase-sdk"; + +// Change this to the path of your API key file downloaded from CDP portal. +Coinbase.configureFromJson({ filePath: "~/Downloads/cdp_api_key.json" }); + +// Be sure to update the uri to your webhook url +let webhook = await Webhook.create( + "base-mainnet", + "https:///callback", + "erc20_transfer", + [{ contract_address: "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913" }], +); +console.log(`Webhook successfully created: `, webhook.toString()); + +// List out the webhooks created +let resp = await Webhook.list(); + +// Iterate over all webhooks created +// You can also see list of webhook from CDP Portal +// https://portal.cdp.coinbase.com/products/webhooks +for (const wh of resp.data) { + console.log(wh.toString()); +} diff --git a/quickstart-template/webhook/README.md b/quickstart-template/webhook/README.md new file mode 100644 index 00000000..5e982f78 --- /dev/null +++ b/quickstart-template/webhook/README.md @@ -0,0 +1,42 @@ +# Quickstart template for Webhook App + +This is a template repository for quickly getting started with a Webhook App, +which can be used for setting up Webhooks for listening to blockchain event notifications. + +## Local Webhook App + +To set up the template, run the following commands from this `webhook` folder: + +```bash +npm install +npm run start-webhook-app +``` + +This command will set up a webhook app locally. + +Once the local webhook app is setup, in another terminal window, you can test it with: + +```bash +curl -X POST -H "Content-Type:application/json" -d '{"app": "webhook"}' http://localhost:3000/callback +``` + +## Public Webhook App + +To setup a temporary public URL that points to this local webhook app, +you can use [Pinggy](https://pinggy.io/) or [ngrok](https://ngrok.com/) in another terminal window: + +```bash +ssh -p 443 -R0:localhost:3000 -L4300:localhost:4300 qr@a.pinggy.io +``` + +You can also use [Vercel](https://vercel.com/), [webhook.site](https://webhook.site/) or other hosting solutions for your webhook app. + +Once the public webhook app is setup, copy the URL provided and test it with: + +```bash +curl -X POST -H "Content-Type:application/json" -d '{"app": "webhook"}' {url_copied_from_pinggy_io}/callback +``` + +This URL (ie Notification URL) can now be used to create Webhook either +via [CDP Portal](https://docs-cdp-onchain-data-preview.cbhq.net/developer-platform/docs/cdp-webhooks/) +or [Coinbase SDK](https://docs-cdp-onchain-data-preview.cbhq.net/coinbase-sdk/docs/webhooks). diff --git a/quickstart-template/webhook/app.js b/quickstart-template/webhook/app.js new file mode 100644 index 00000000..97545a16 --- /dev/null +++ b/quickstart-template/webhook/app.js @@ -0,0 +1,26 @@ +const express = require("express"); +const app = express(); + +app.use(express.json()); + +app.post("/callback", (req, res) => { + // here's what you'll expect to receive depending on the event type + // https://docs.cdp.coinbase.com/onchain-data/docs/webhooks#event-types + const data = req.body; + + console.log("Headers received:"); + console.log(JSON.stringify(req.headers, null, 4)); + console.log("Body received:"); + console.log(JSON.stringify(data, null, 4)); + + const response = { + message: "Data received", + received_data: data, + }; + res.json(response); +}); + +const PORT = 3000; +app.listen(PORT, () => { + console.log(`Server is running on port ${PORT}`); +}); diff --git a/quickstart-template/webhook/package-lock.json b/quickstart-template/webhook/package-lock.json new file mode 100644 index 00000000..f999789f --- /dev/null +++ b/quickstart-template/webhook/package-lock.json @@ -0,0 +1,697 @@ +{ + "name": "webhook", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "webhook", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "express": "^4.19.2" + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + }, + "node_modules/body-parser": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", + "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.2", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.6.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/object-inspect": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "node_modules/side-channel": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "engines": { + "node": ">= 0.8" + } + } + } +} diff --git a/quickstart-template/webhook/package.json b/quickstart-template/webhook/package.json new file mode 100644 index 00000000..bc15ed67 --- /dev/null +++ b/quickstart-template/webhook/package.json @@ -0,0 +1,15 @@ +{ + "name": "webhook", + "version": "1.0.0", + "description": "", + "main": "app.js", + "scripts": { + "start-webhook-app": "node app.js" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "express": "^4.19.2" + } +} diff --git a/src/actions/sendUserOperation.test.ts b/src/actions/sendUserOperation.test.ts new file mode 100644 index 00000000..5af47d54 --- /dev/null +++ b/src/actions/sendUserOperation.test.ts @@ -0,0 +1,308 @@ +import { sendUserOperation } from "./sendUserOperation"; +import { Coinbase } from "../coinbase/coinbase"; +import { encodeFunctionData, erc20Abi, parseEther } from "viem"; +import { UserOperationStatusEnum } from "../client"; +import { smartWalletApiMock, mockReturnValue, mockReturnRejectedValue } from "../tests/utils"; + +describe("sendUserOperation", () => { + const VALID_WALLET = { + address: "0x1234567890123456789012345678901234567890" as const, + owners: [ + { + address: "0x1234567890123456789012345678901234567890" as const, + sign: jest.fn(), + }, + ], + type: "smart" as const, + sendUserOperation: jest.fn(), + useNetwork: jest.fn(), + }; + + const VALID_ABI_FUNCTION_CALL = { + to: "0x2234567890123456789012345678901234567890", + abi: erc20Abi, + functionName: "transfer", + args: ["0x3234567890123456789012345678901234567890", parseEther("1")], + value: 0n, + } as const; + + const VALID_ENCODED_CALL = { + to: "0x4234567890123456789012345678901234567890" as const, + data: "0x123abc", + value: parseEther("0.1"), + } as const; + + const VALID_CREATE_OPERATION_RESPONSE = { + user_op_hash: "0x456def" as const, + }; + + const VALID_BROADCAST_RESPONSE = { + status: UserOperationStatusEnum.Broadcast, + user_op_hash: "0x456def" as const, + }; + + beforeEach(() => { + jest.clearAllMocks(); + + Coinbase.apiClients.smartWallet = smartWalletApiMock; + + Coinbase.apiClients.smartWallet!.createUserOperation = mockReturnValue( + VALID_CREATE_OPERATION_RESPONSE, + ); + Coinbase.apiClients.smartWallet!.broadcastUserOperation = + mockReturnValue(VALID_BROADCAST_RESPONSE); + VALID_WALLET.owners[0].sign.mockReturnValue("0x789ghi"); + }); + + afterEach(() => { + jest.restoreAllMocks(); + }); + + it("should successfully send a user operation with an ABI function call", async () => { + const result = await sendUserOperation(VALID_WALLET, { + calls: [VALID_ABI_FUNCTION_CALL], + chainId: 8453, + }); + + expect(Coinbase.apiClients.smartWallet!.createUserOperation).toHaveBeenCalledWith( + VALID_WALLET.address, + "base-mainnet", + { + calls: [ + { + to: VALID_ABI_FUNCTION_CALL.to, + data: encodeFunctionData({ + abi: VALID_ABI_FUNCTION_CALL.abi, + functionName: VALID_ABI_FUNCTION_CALL.functionName, + args: VALID_ABI_FUNCTION_CALL.args, + }), + value: "0", + }, + ], + paymaster_url: undefined, + }, + ); + + expect(Coinbase.apiClients.smartWallet!.broadcastUserOperation).toHaveBeenCalledWith( + VALID_WALLET.address, + VALID_CREATE_OPERATION_RESPONSE.user_op_hash, + { + signature: "0x789ghi", + }, + ); + + expect(result).toEqual({ + smartWalletAddress: VALID_WALLET.address, + status: VALID_BROADCAST_RESPONSE.status, + userOpHash: VALID_BROADCAST_RESPONSE.user_op_hash, + }); + }); + + it("should successfully send a user operation with a encoded function call", async () => { + const result = await sendUserOperation(VALID_WALLET, { + calls: [VALID_ENCODED_CALL], + chainId: 8453, + }); + + expect(Coinbase.apiClients.smartWallet!.createUserOperation).toHaveBeenCalledWith( + VALID_WALLET.address, + "base-mainnet", + { + calls: [ + { + to: VALID_ENCODED_CALL.to, + data: VALID_ENCODED_CALL.data, + value: VALID_ENCODED_CALL.value.toString(), + }, + ], + paymaster_url: undefined, + }, + ); + + expect(Coinbase.apiClients.smartWallet!.broadcastUserOperation).toHaveBeenCalledWith( + VALID_WALLET.address, + VALID_CREATE_OPERATION_RESPONSE.user_op_hash, + { + signature: "0x789ghi", + }, + ); + + expect(result).toEqual({ + smartWalletAddress: VALID_WALLET.address, + status: VALID_BROADCAST_RESPONSE.status, + userOpHash: VALID_BROADCAST_RESPONSE.user_op_hash, + }); + }); + + it("should successfully send a user operation with multiple mixed calls", async () => { + const result = await sendUserOperation(VALID_WALLET, { + calls: [VALID_ABI_FUNCTION_CALL, VALID_ENCODED_CALL], + chainId: 8453, + }); + + expect(Coinbase.apiClients.smartWallet!.createUserOperation).toHaveBeenCalledWith( + VALID_WALLET.address, + "base-mainnet", + { + calls: [ + { + to: VALID_ABI_FUNCTION_CALL.to, + data: encodeFunctionData({ + abi: VALID_ABI_FUNCTION_CALL.abi, + functionName: VALID_ABI_FUNCTION_CALL.functionName, + args: VALID_ABI_FUNCTION_CALL.args, + }), + value: "0", + }, + { + to: VALID_ENCODED_CALL.to, + data: VALID_ENCODED_CALL.data, + value: VALID_ENCODED_CALL.value.toString(), + }, + ], + paymaster_url: undefined, + }, + ); + + expect(Coinbase.apiClients.smartWallet!.broadcastUserOperation).toHaveBeenCalledWith( + VALID_WALLET.address, + VALID_CREATE_OPERATION_RESPONSE.user_op_hash, + { + signature: "0x789ghi", + }, + ); + + expect(result).toEqual({ + smartWalletAddress: VALID_WALLET.address, + status: VALID_BROADCAST_RESPONSE.status, + userOpHash: VALID_BROADCAST_RESPONSE.user_op_hash, + }); + }); + + it("should handle calls with undefined value property and set it to 0", async () => { + const result = await sendUserOperation(VALID_WALLET, { + calls: [{ ...VALID_ABI_FUNCTION_CALL, value: undefined }], + chainId: 8453, + }); + + expect(Coinbase.apiClients.smartWallet!.createUserOperation).toHaveBeenCalledWith( + VALID_WALLET.address, + "base-mainnet", + { + calls: [ + { + to: VALID_ABI_FUNCTION_CALL.to, + data: encodeFunctionData({ + abi: VALID_ABI_FUNCTION_CALL.abi, + functionName: VALID_ABI_FUNCTION_CALL.functionName, + args: VALID_ABI_FUNCTION_CALL.args, + }), + value: "0", + }, + ], + paymaster_url: undefined, + }, + ); + + expect(Coinbase.apiClients.smartWallet!.broadcastUserOperation).toHaveBeenCalledWith( + VALID_WALLET.address, + VALID_CREATE_OPERATION_RESPONSE.user_op_hash, + { + signature: "0x789ghi", + }, + ); + + expect(result).toEqual({ + smartWalletAddress: VALID_WALLET.address, + status: VALID_BROADCAST_RESPONSE.status, + userOpHash: VALID_BROADCAST_RESPONSE.user_op_hash, + }); + }); + + it("should throw if calls array is empty", async () => { + await expect( + sendUserOperation(VALID_WALLET, { + calls: [], + chainId: 8453, + }), + ).rejects.toThrow("Calls array is empty"); + }); + + it("should include paymaster URL when provided", async () => { + const result = await sendUserOperation(VALID_WALLET, { + calls: [VALID_ABI_FUNCTION_CALL], + chainId: 8453, + paymasterUrl: "https://paymaster.com", + }); + + expect(Coinbase.apiClients.smartWallet!.createUserOperation).toHaveBeenCalledWith( + VALID_WALLET.address, + "base-mainnet", + { + calls: [ + { + to: VALID_ABI_FUNCTION_CALL.to, + data: encodeFunctionData({ + abi: VALID_ABI_FUNCTION_CALL.abi, + functionName: VALID_ABI_FUNCTION_CALL.functionName, + args: VALID_ABI_FUNCTION_CALL.args, + }), + value: "0", + }, + ], + paymaster_url: "https://paymaster.com", + }, + ); + + expect(Coinbase.apiClients.smartWallet!.broadcastUserOperation).toHaveBeenCalledWith( + VALID_WALLET.address, + VALID_CREATE_OPERATION_RESPONSE.user_op_hash, + { + signature: "0x789ghi", + }, + ); + + expect(result).toEqual({ + smartWalletAddress: VALID_WALLET.address, + status: VALID_BROADCAST_RESPONSE.status, + userOpHash: VALID_BROADCAST_RESPONSE.user_op_hash, + }); + }); + + it("should handle createUserOperation API errors", async () => { + Coinbase.apiClients.smartWallet!.createUserOperation = mockReturnRejectedValue( + new Error("API error"), + ); + + await expect( + sendUserOperation(VALID_WALLET, { + calls: [VALID_ABI_FUNCTION_CALL], + chainId: 8453, + }), + ).rejects.toThrow("API error"); + }); + + it("should handle broadcastUserOperation API errors", async () => { + Coinbase.apiClients.smartWallet!.broadcastUserOperation = mockReturnRejectedValue( + new Error("API error"), + ); + + await expect( + sendUserOperation(VALID_WALLET, { + calls: [VALID_ABI_FUNCTION_CALL], + chainId: 8453, + }), + ).rejects.toThrow("API error"); + }); + + it("should handle signature generation errors", async () => { + VALID_WALLET.owners[0].sign.mockRejectedValue(new Error("Signature error")); + + await expect( + sendUserOperation(VALID_WALLET, { + calls: [VALID_ABI_FUNCTION_CALL], + chainId: 8453, + }), + ).rejects.toThrow("Signature error"); + }); +}); diff --git a/src/actions/sendUserOperation.ts b/src/actions/sendUserOperation.ts new file mode 100644 index 00000000..a7511a50 --- /dev/null +++ b/src/actions/sendUserOperation.ts @@ -0,0 +1,147 @@ +import type { SmartWallet } from "../wallets/types"; +import { UserOperationStatusEnum } from "../client"; +import { CHAIN_ID_TO_NETWORK_ID, type SupportedChainId } from "../types/chain"; +import type { Address, Hex } from "../types/misc"; +import type { Calls } from "../types/calls"; +import { encodeFunctionData } from "viem"; +import { Coinbase } from "../coinbase/coinbase"; + +/** + * Options for sending a user operation + * @template T - Array type for the calls parameter + */ +export type SendUserOperationOptions = { + /** + * Array of contract calls to execute in the user operation. + * Each call can either be: + * - A direct call with `to`, `value`, and `data` + * - A contract call with `to`, `abi`, `functionName`, and `args` + * + * @example + * ```ts + * const calls = [ + * { + * to: "0x1234567890123456789012345678901234567890", + * value: parseEther("0.0000005"), + * data: "0x", + * }, + * { + * to: "0x1234567890123456789012345678901234567890", + * abi: erc20Abi, + * functionName: "transfer", + * args: [to, amount], + * }, + * ] + * ``` + */ + calls: Calls; + /** Chain ID of the network to execute on */ + chainId: SupportedChainId; + /** Optional URL of the paymaster service to use for gas sponsorship. Must be ERC-7677 compliant. */ + paymasterUrl?: string; +}; + +/** + * Return type for the sendUserOperation function + */ +export type SendUserOperationReturnType = { + /** The address of the smart wallet */ + smartWalletAddress: Address; + /** The status of the user operation */ + status: typeof UserOperationStatusEnum.Broadcast; + /** The hash of the user operation. This is not the transaction hash which is only available after the operation is completed.*/ + userOpHash: Hex; +}; + +/** + * Sends a user operation to the network + * + * @example + * ```ts + * import { sendUserOperation } from "@coinbase/coinbase-sdk"; + * import { parseEther } from "viem"; + * + * const result = await sendUserOperation(wallet, { + * calls: [ + * { + * abi: erc20Abi, + * functionName: "transfer", + * args: [to, amount], + * }, + * { + * to: "0x1234567890123456789012345678901234567890", + * data: "0x", + * value: parseEther("0.0000005"), + * }, + * ], + * chainId: 1, + * paymasterUrl: "https://api.developer.coinbase.com/rpc/v1/base/someapikey", + * }); + * ``` + * + * @param {SmartWallet} wallet - The smart wallet to send the user operation from + * @param {SendUserOperationOptions} options - The options for the user operation + * @returns {Promise} The result of the user operation + */ +export async function sendUserOperation( + wallet: SmartWallet, + options: SendUserOperationOptions, +): Promise { + const { calls, chainId, paymasterUrl } = options; + const network = CHAIN_ID_TO_NETWORK_ID[chainId]; + + if (calls.length === 0) { + throw new Error("Calls array is empty"); + } + + const encodedCalls = calls.map(call => { + const value = (call.value ?? BigInt(0)).toString(); + + if ("abi" in call && call.abi && "functionName" in call) { + return { + to: call.to, + data: encodeFunctionData({ + abi: call.abi, + functionName: call.functionName, + args: call.args, + }), + value, + }; + } + + return { + to: call.to, + data: call.data ?? "0x", + value, + }; + }); + + const createOpResponse = await Coinbase.apiClients.smartWallet!.createUserOperation( + wallet.address, + network, + { + calls: encodedCalls, + paymaster_url: paymasterUrl, + }, + ); + + const owner = wallet.owners[0]; + + const signature = await owner.sign({ + hash: createOpResponse.data.user_op_hash as Hex, + }); + + const broadcastResponse = await Coinbase.apiClients.smartWallet!.broadcastUserOperation( + wallet.address, + createOpResponse.data.user_op_hash, + { + signature, + }, + ); + + return { + smartWalletAddress: wallet.address, + status: broadcastResponse.data.status, + userOpHash: createOpResponse.data.user_op_hash, + } as SendUserOperationReturnType; +} diff --git a/src/actions/waitForUserOperation.test.ts b/src/actions/waitForUserOperation.test.ts new file mode 100644 index 00000000..6ec79426 --- /dev/null +++ b/src/actions/waitForUserOperation.test.ts @@ -0,0 +1,136 @@ +import { waitForUserOperation } from "./waitForUserOperation"; +import { Coinbase } from "../coinbase/coinbase"; +import { UserOperationStatusEnum } from "../client"; +import { smartWalletApiMock, mockReturnValue } from "../tests/utils"; +import * as waitUtils from "../utils/wait"; + +describe("waitForUserOperation", () => { + const VALID_WALLET_ADDRESS = "0x1234567890123456789012345678901234567890" as const; + + const VALID_OPERATION_HASH = "0x1234567890123456789012345678901234567890" as const; + const VALID_OPERATION_RESPONSE = { + status: UserOperationStatusEnum.Complete, + transaction_hash: "0x1234567890123456789012345678901234567890", + user_op_hash: VALID_OPERATION_HASH, + }; + + const FAILED_OPERATION_RESPONSE = { + smartWalletAddress: VALID_WALLET_ADDRESS, + status: UserOperationStatusEnum.Failed, + user_op_hash: VALID_OPERATION_HASH, + }; + + beforeEach(() => { + jest.clearAllMocks(); + Coinbase.apiClients.smartWallet = smartWalletApiMock; + Coinbase.apiClients.smartWallet!.getUserOperation = mockReturnValue(VALID_OPERATION_RESPONSE); + }); + + afterEach(() => { + jest.restoreAllMocks(); + }); + + it("should successfully wait for a completed operation", async () => { + const result = await waitForUserOperation({ + userOpHash: VALID_OPERATION_HASH, + smartWalletAddress: VALID_WALLET_ADDRESS, + }); + + expect(Coinbase.apiClients.smartWallet!.getUserOperation).toHaveBeenCalledWith( + VALID_WALLET_ADDRESS, + VALID_OPERATION_HASH, + ); + + expect(result).toEqual({ + smartWalletAddress: VALID_WALLET_ADDRESS, + status: UserOperationStatusEnum.Complete, + transactionHash: "0x1234567890123456789012345678901234567890", + userOpHash: VALID_OPERATION_HASH, + }); + }); + + it("should successfully handle a failed operation", async () => { + Coinbase.apiClients.smartWallet!.getUserOperation = mockReturnValue(FAILED_OPERATION_RESPONSE); + + const result = await waitForUserOperation({ + userOpHash: VALID_OPERATION_HASH, + smartWalletAddress: VALID_WALLET_ADDRESS, + }); + + expect(Coinbase.apiClients.smartWallet!.getUserOperation).toHaveBeenCalledWith( + VALID_WALLET_ADDRESS, + VALID_OPERATION_HASH, + ); + + expect(result).toEqual({ + smartWalletAddress: VALID_WALLET_ADDRESS, + status: UserOperationStatusEnum.Failed, + transactionHash: undefined, + userOpHash: VALID_OPERATION_HASH, + }); + }); + + it("should use default timeout options when none are provided", async () => { + const waitSpy = jest.spyOn(waitUtils, "wait"); + + const result = await waitForUserOperation({ + userOpHash: VALID_OPERATION_HASH, + smartWalletAddress: VALID_WALLET_ADDRESS, + }); + + expect(waitSpy).toHaveBeenCalledWith( + expect.any(Function), + expect.any(Function), + expect.any(Function), + { timeoutSeconds: 30 }, + ); + + expect(result).toEqual({ + smartWalletAddress: VALID_WALLET_ADDRESS, + status: UserOperationStatusEnum.Complete, + transactionHash: "0x1234567890123456789012345678901234567890", + userOpHash: VALID_OPERATION_HASH, + }); + }); + + it("should respect custom timeout options", async () => { + const waitSpy = jest.spyOn(waitUtils, "wait"); + + const result = await waitForUserOperation({ + userOpHash: VALID_OPERATION_HASH, + smartWalletAddress: VALID_WALLET_ADDRESS, + waitOptions: { timeoutSeconds: 1, intervalSeconds: 0.1 }, + }); + + expect(waitSpy).toHaveBeenCalledWith( + expect.any(Function), + expect.any(Function), + expect.any(Function), + { timeoutSeconds: 1, intervalSeconds: 0.1 }, + ); + + expect(result).toEqual({ + smartWalletAddress: VALID_WALLET_ADDRESS, + status: UserOperationStatusEnum.Complete, + transactionHash: "0x1234567890123456789012345678901234567890", + userOpHash: VALID_OPERATION_HASH, + }); + }); + + it("should throw an error if the operation is not terminal", async () => { + Coinbase.apiClients.smartWallet!.getUserOperation = mockReturnValue({ + user_op_hash: VALID_OPERATION_HASH, + status: UserOperationStatusEnum.Pending, + }); + + await expect( + waitForUserOperation({ + userOpHash: VALID_OPERATION_HASH, + smartWalletAddress: VALID_WALLET_ADDRESS, + waitOptions: { timeoutSeconds: 1 }, + }), + ).rejects.toThrow( + "Operation has not reached a terminal state after 1 seconds and may still succeed. Retry with a longer timeout using the timeoutSeconds option.", + ); + }); +}); diff --git a/src/actions/waitForUserOperation.ts b/src/actions/waitForUserOperation.ts new file mode 100644 index 00000000..b57c4616 --- /dev/null +++ b/src/actions/waitForUserOperation.ts @@ -0,0 +1,112 @@ +import type { Address, Hex } from "../types/misc"; +import { Coinbase } from "../coinbase/coinbase"; +import { wait, WaitOptions } from "../utils/wait"; +import { UserOperation, UserOperationStatusEnum } from "../client"; + +/** + * Options for waiting for a user operation + */ +export type WaitForUserOperationOptions = { + /** The hash of the user operation */ + userOpHash: Hex; + /** The address of the smart wallet */ + smartWalletAddress: Address; + /** Optional options for the wait operation */ + waitOptions?: WaitOptions; +}; + +/** + * Represents a failed user operation + */ +export type FailedOperation = { + /** The address of the smart wallet */ + smartWalletAddress: Address; + /** The status of the user operation */ + status: typeof UserOperationStatusEnum.Failed; + /** The hash of the user operation. This is not the transaction hash which is only available after the operation is completed.*/ + userOpHash: Hex; +}; + +/** + * Represents a completed user operation + */ +export type CompletedOperation = { + /** The address of the smart wallet */ + smartWalletAddress: Address; + /** The transaction hash that executed the completed user operation */ + transactionHash: string; + /** The status of the user operation */ + status: typeof UserOperationStatusEnum.Complete; + /** The hash of the user operation. This is not the transaction hash which is only available after the operation is completed.*/ + userOpHash: Hex; +}; + +/** + * Represents the return type of the waitForUserOperation function + */ +export type WaitForUserOperationReturnType = FailedOperation | CompletedOperation; + +/** + * Waits for a user operation to complete or fail + * + * @example + * ```ts + * import { waitForUserOperation } from "@coinbase/coinbase-sdk"; + * + * const result = await waitForUserOperation({ + * id: "123", + * smartWalletAddress: "0x1234567890123456789012345678901234567890", + * waitOptions: { + * timeoutSeconds: 30, + * }, + * }); + * ``` + * + * @param {WaitForUserOperationOptions} options - The options for the wait operation + * @returns {Promise} The result of the user operation + */ +export async function waitForUserOperation( + options: WaitForUserOperationOptions, +): Promise { + const { userOpHash, smartWalletAddress } = options; + + const reload = async () => { + const response = await Coinbase.apiClients.smartWallet!.getUserOperation( + smartWalletAddress, + userOpHash, + ); + return response.data; + }; + + const transform = (operation: UserOperation): WaitForUserOperationReturnType => { + if (operation.status === UserOperationStatusEnum.Failed) { + return { + smartWalletAddress: smartWalletAddress, + status: UserOperationStatusEnum.Failed, + userOpHash: operation.user_op_hash as Hex, + } satisfies FailedOperation; + } else if (operation.status === UserOperationStatusEnum.Complete) { + return { + smartWalletAddress: smartWalletAddress, + transactionHash: operation.transaction_hash!, + status: UserOperationStatusEnum.Complete, + userOpHash: operation.user_op_hash as Hex, + } satisfies CompletedOperation; + } else { + throw new Error("User operation is not terminal"); + } + }; + + const waitOptions = options.waitOptions || { + timeoutSeconds: 30, + }; + + return await wait(reload, isTerminal, transform, waitOptions); +} + +const isTerminal = (operation: UserOperation): boolean => { + return ( + operation.status === UserOperationStatusEnum.Complete || + operation.status === UserOperationStatusEnum.Failed + ); +}; diff --git a/src/client/api.ts b/src/client/api.ts index 10bdfff8..34a98ece 100644 --- a/src/client/api.ts +++ b/src/client/api.ts @@ -5,7 +5,7 @@ * This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. * * The version of the OpenAPI document: 0.0.1-alpha - * Contact: yuga.cohler@coinbase.com + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -53,6 +53,12 @@ export interface Address { * @memberof Address */ 'address_id': string; + /** + * The index of the address in the wallet. + * @type {number} + * @memberof Address + */ + 'index': number; } /** * @@ -85,6 +91,31 @@ export interface AddressBalanceList { */ 'total_count': number; } +/** + * + * @export + * @interface AddressHistoricalBalanceList + */ +export interface AddressHistoricalBalanceList { + /** + * + * @type {Array} + * @memberof AddressHistoricalBalanceList + */ + 'data': Array; + /** + * True if this list has another page of items after this one that can be fetched. + * @type {boolean} + * @memberof AddressHistoricalBalanceList + */ + 'has_more': boolean; + /** + * The page token to be used to fetch the next page. + * @type {string} + * @memberof AddressHistoricalBalanceList + */ + 'next_page': string; +} /** * * @export @@ -116,6 +147,117 @@ export interface AddressList { */ 'total_count': number; } +/** + * The reputation score with metadata of a blockchain address. + * @export + * @interface AddressReputation + */ +export interface AddressReputation { + /** + * The score of a wallet address, ranging from -100 to 100. A negative score indicates a bad reputation, while a positive score indicates a good reputation. + * @type {number} + * @memberof AddressReputation + */ + 'score': number; + /** + * + * @type {AddressReputationMetadata} + * @memberof AddressReputation + */ + 'metadata': AddressReputationMetadata; +} +/** + * The metadata for the reputation score of onchain address. + * @export + * @interface AddressReputationMetadata + */ +export interface AddressReputationMetadata { + /** + * The total number of transactions performed by the address. + * @type {number} + * @memberof AddressReputationMetadata + */ + 'total_transactions': number; + /** + * The number of unique days the address was active. + * @type {number} + * @memberof AddressReputationMetadata + */ + 'unique_days_active': number; + /** + * The longest streak of consecutive active days. + * @type {number} + * @memberof AddressReputationMetadata + */ + 'longest_active_streak': number; + /** + * The current streak of consecutive active days. + * @type {number} + * @memberof AddressReputationMetadata + */ + 'current_active_streak': number; + /** + * The total number of days the address has been active. + * @type {number} + * @memberof AddressReputationMetadata + */ + 'activity_period_days': number; + /** + * The number of token swaps performed by the address. + * @type {number} + * @memberof AddressReputationMetadata + */ + 'token_swaps_performed': number; + /** + * The number of bridge transactions performed by the address. + * @type {number} + * @memberof AddressReputationMetadata + */ + 'bridge_transactions_performed': number; + /** + * The number of lend, borrow, or stake transactions performed by the address. + * @type {number} + * @memberof AddressReputationMetadata + */ + 'lend_borrow_stake_transactions': number; + /** + * The number of interactions with ENS contracts. + * @type {number} + * @memberof AddressReputationMetadata + */ + 'ens_contract_interactions': number; + /** + * The number of smart contracts deployed by the address. + * @type {number} + * @memberof AddressReputationMetadata + */ + 'smart_contract_deployments': number; +} +/** + * + * @export + * @interface AddressTransactionList + */ +export interface AddressTransactionList { + /** + * + * @type {Array} + * @memberof AddressTransactionList + */ + 'data': Array; + /** + * True if this list has another page of items after this one that can be fetched. + * @type {boolean} + * @memberof AddressTransactionList + */ + 'has_more': boolean; + /** + * The page token to be used to fetch the next page. + * @type {string} + * @memberof AddressTransactionList + */ + 'next_page': string; +} /** * An asset onchain scoped to a particular network, e.g. ETH on base-sepolia, or the USDC ERC20 Token on ethereum-mainnet. * @export @@ -166,6 +308,83 @@ export interface Balance { */ 'asset': Asset; } +/** + * + * @export + * @interface BroadcastContractInvocationRequest + */ +export interface BroadcastContractInvocationRequest { + /** + * The hex-encoded signed payload of the contract invocation + * @type {string} + * @memberof BroadcastContractInvocationRequest + */ + 'signed_payload': string; +} +/** + * External Transaction Broadcast Response + * @export + * @interface BroadcastExternalTransaction200Response + */ +export interface BroadcastExternalTransaction200Response { + /** + * The transaction hash + * @type {string} + * @memberof BroadcastExternalTransaction200Response + */ + 'transaction_hash': string; + /** + * The link to view the transaction on a block explorer. This is optional and may not be present for all transactions. + * @type {string} + * @memberof BroadcastExternalTransaction200Response + */ + 'transaction_link'?: string; +} +/** + * + * @export + * @interface BroadcastExternalTransactionRequest + */ +export interface BroadcastExternalTransactionRequest { + /** + * The hex-encoded signed payload of the external address transaction. + * @type {string} + * @memberof BroadcastExternalTransactionRequest + */ + 'signed_payload': string; +} +/** + * + * @export + * @interface BroadcastExternalTransferRequest + */ +export interface BroadcastExternalTransferRequest { + /** + * The hex-encoded signed payload of the external transfer + * @type {string} + * @memberof BroadcastExternalTransferRequest + */ + 'signed_payload': string; +} +/** + * + * @export + * @interface BroadcastStakingOperationRequest + */ +export interface BroadcastStakingOperationRequest { + /** + * The hex-encoded signed payload of the staking operation. + * @type {string} + * @memberof BroadcastStakingOperationRequest + */ + 'signed_payload': string; + /** + * The index in the transaction array of the staking operation. + * @type {number} + * @memberof BroadcastStakingOperationRequest + */ + 'transaction_index': number; +} /** * * @export @@ -198,6 +417,19 @@ export interface BroadcastTransferRequest { */ 'signed_payload': string; } +/** + * + * @export + * @interface BroadcastUserOperationRequest + */ +export interface BroadcastUserOperationRequest { + /** + * The hex-encoded signature of the user operation. + * @type {string} + * @memberof BroadcastUserOperationRequest + */ + 'signature': string; +} /** * * @export @@ -229,1091 +461,9557 @@ export interface BuildStakingOperationRequest { */ 'action': string; /** - * + * Additional options for the staking operation. * @type {{ [key: string]: string; }} * @memberof BuildStakingOperationRequest */ 'options': { [key: string]: string; }; } /** - * + * An action that will be bundled into a user operation. * @export - * @interface CreateAddressRequest + * @interface Call */ -export interface CreateAddressRequest { +export interface Call { /** - * The public key from which the address will be derived. + * The address the call is interacting with. * @type {string} - * @memberof CreateAddressRequest + * @memberof Call */ - 'public_key'?: string; + 'to': string; /** - * An attestation signed by the private key that is associated with the wallet. The attestation will be a hex-encoded signature of a json payload with fields `wallet_id` and `public_key`, signed by the private key associated with the public_key set in the request. + * The hex-encoded data to send with the call. * @type {string} - * @memberof CreateAddressRequest + * @memberof Call */ - 'attestation'?: string; + 'data': string; + /** + * The string-encoded integer value to send with the call. + * @type {string} + * @memberof Call + */ + 'value': string; } /** * * @export - * @interface CreateServerSignerRequest + * @interface CompileSmartContractRequest */ -export interface CreateServerSignerRequest { +export interface CompileSmartContractRequest { /** - * The ID of the server signer for the 1 of 1 server signer. + * The JSON input containing the Solidity code, dependencies, and compiler settings. * @type {string} - * @memberof CreateServerSignerRequest + * @memberof CompileSmartContractRequest */ - 'server_signer_id'?: string; + 'solidity_input_json': string; /** - * The enrollment data of the server signer. This will be the base64 encoded server-signer-id for the 1 of 1 server signer. + * The name of the contract to compile. * @type {string} - * @memberof CreateServerSignerRequest + * @memberof CompileSmartContractRequest */ - 'enrollment_data': string; + 'contract_name': string; /** - * Whether the Server-Signer uses MPC. - * @type {boolean} - * @memberof CreateServerSignerRequest + * The version of the Solidity compiler to use. + * @type {string} + * @memberof CompileSmartContractRequest */ - 'is_mpc': boolean; + 'solidity_compiler_version': string; } /** - * + * Represents a compiled smart contract that can be deployed onchain * @export - * @interface CreateTradeRequest + * @interface CompiledSmartContract */ -export interface CreateTradeRequest { +export interface CompiledSmartContract { /** - * The amount to trade + * The unique identifier of the compiled smart contract. * @type {string} - * @memberof CreateTradeRequest + * @memberof CompiledSmartContract */ - 'amount': string; + 'compiled_smart_contract_id'?: string; /** - * The ID of the asset to trade + * The JSON-encoded input for the Solidity compiler * @type {string} - * @memberof CreateTradeRequest + * @memberof CompiledSmartContract */ - 'from_asset_id': string; + 'solidity_input_json'?: string; /** - * The ID of the asset to receive from the trade + * The contract creation bytecode which will be used with constructor arguments to deploy the contract * @type {string} - * @memberof CreateTradeRequest + * @memberof CompiledSmartContract */ - 'to_asset_id': string; + 'contract_creation_bytecode'?: string; + /** + * The JSON-encoded ABI of the contract + * @type {string} + * @memberof CompiledSmartContract + */ + 'abi'?: string; + /** + * The name of the smart contract to deploy + * @type {string} + * @memberof CompiledSmartContract + */ + 'contract_name'?: string; } /** - * + * Represents a single decoded event emitted by a smart contract * @export - * @interface CreateTransferRequest + * @interface ContractEvent */ -export interface CreateTransferRequest { +export interface ContractEvent { /** - * The amount to transfer + * The name of the blockchain network * @type {string} - * @memberof CreateTransferRequest + * @memberof ContractEvent */ - 'amount': string; + 'network_id': string; /** - * The ID of the blockchain network + * The name of the blockchain project or protocol * @type {string} - * @memberof CreateTransferRequest + * @memberof ContractEvent */ - 'network_id': string; + 'protocol_name': string; /** - * The ID of the asset to transfer + * The name of the specific contract within the project * @type {string} - * @memberof CreateTransferRequest + * @memberof ContractEvent */ - 'asset_id': string; + 'contract_name': string; /** - * The destination address + * The name of the event emitted by the contract * @type {string} - * @memberof CreateTransferRequest + * @memberof ContractEvent */ - 'destination': string; -} -/** - * - * @export - * @interface CreateWalletRequest - */ -export interface CreateWalletRequest { + 'event_name': string; /** - * - * @type {CreateWalletRequestWallet} - * @memberof CreateWalletRequest + * The signature of the event, including parameter types + * @type {string} + * @memberof ContractEvent */ - 'wallet': CreateWalletRequestWallet; + 'sig': string; + /** + * The first four bytes of the Keccak hash of the event signature + * @type {string} + * @memberof ContractEvent + */ + 'four_bytes': string; + /** + * The EVM address of the smart contract + * @type {string} + * @memberof ContractEvent + */ + 'contract_address': string; + /** + * The timestamp of the block in which the event was emitted + * @type {string} + * @memberof ContractEvent + */ + 'block_time': string; + /** + * The block number in which the event was emitted + * @type {number} + * @memberof ContractEvent + */ + 'block_height': number; + /** + * The transaction hash in which the event was emitted + * @type {string} + * @memberof ContractEvent + */ + 'tx_hash': string; + /** + * The index of the transaction within the block + * @type {number} + * @memberof ContractEvent + */ + 'tx_index': number; + /** + * The index of the event within the transaction + * @type {number} + * @memberof ContractEvent + */ + 'event_index': number; + /** + * The event data in a stringified format + * @type {string} + * @memberof ContractEvent + */ + 'data': string; } /** - * Parameters for configuring a wallet + * A list of contract events with pagination information * @export - * @interface CreateWalletRequestWallet + * @interface ContractEventList */ -export interface CreateWalletRequestWallet { +export interface ContractEventList { /** - * The ID of the blockchain network + * An array of ContractEvent objects + * @type {Array} + * @memberof ContractEventList + */ + 'data': Array; + /** + * The page token to be used to fetch the next page * @type {string} - * @memberof CreateWalletRequestWallet + * @memberof ContractEventList */ - 'network_id': string; + 'next_page': string; /** - * Whether the wallet should use the project\'s server signer or if the addresses in the wallets will belong to a private key the developer manages. Defaults to false. + * True if this list has another page of items after this one that can be fetched * @type {boolean} - * @memberof CreateWalletRequestWallet + * @memberof ContractEventList */ - 'use_server_signer'?: boolean; + 'has_more': boolean; } /** - * The faucet transaction + * A contract invocation onchain. * @export - * @interface FaucetTransaction + * @interface ContractInvocation */ -export interface FaucetTransaction { +export interface ContractInvocation { /** - * The transaction hash of the transaction the faucet created. + * The ID of the blockchain network. * @type {string} - * @memberof FaucetTransaction + * @memberof ContractInvocation */ - 'transaction_hash': string; + 'network_id': string; /** - * Link to the transaction on the blockchain explorer. + * The ID of the wallet that owns the address. * @type {string} - * @memberof FaucetTransaction + * @memberof ContractInvocation */ - 'transaction_link': string; + 'wallet_id': string; + /** + * The onchain address of the address invoking the contract. + * @type {string} + * @memberof ContractInvocation + */ + 'address_id': string; + /** + * The ID of the contract invocation. + * @type {string} + * @memberof ContractInvocation + */ + 'contract_invocation_id': string; + /** + * The onchain address of the contract. + * @type {string} + * @memberof ContractInvocation + */ + 'contract_address': string; + /** + * The method to be invoked on the contract. + * @type {string} + * @memberof ContractInvocation + */ + 'method': string; + /** + * The JSON-encoded arguments to pass to the contract method. The keys should be the argument names and the values should be the argument values. + * @type {string} + * @memberof ContractInvocation + */ + 'args': string; + /** + * The JSON-encoded ABI of the contract. + * @type {string} + * @memberof ContractInvocation + */ + 'abi'?: string; + /** + * The amount to send to the contract for a payable method + * @type {string} + * @memberof ContractInvocation + */ + 'amount': string; + /** + * + * @type {Transaction} + * @memberof ContractInvocation + */ + 'transaction': Transaction; } -/** - * Features that can be enabled for a wallet - * @export - * @enum {string} - */ - -export const Feature = { - Transfer: 'transfer', - Trade: 'trade', - Faucet: 'faucet', - ServerSigner: 'server_signer' -} as const; - -export type Feature = typeof Feature[keyof typeof Feature]; - - /** * * @export - * @interface FetchStakingRewards200Response + * @interface ContractInvocationList */ -export interface FetchStakingRewards200Response { +export interface ContractInvocationList { /** * - * @type {Array} - * @memberof FetchStakingRewards200Response + * @type {Array} + * @memberof ContractInvocationList */ - 'data': Array; + 'data': Array; /** * True if this list has another page of items after this one that can be fetched. * @type {boolean} - * @memberof FetchStakingRewards200Response + * @memberof ContractInvocationList */ 'has_more': boolean; /** * The page token to be used to fetch the next page. * @type {string} - * @memberof FetchStakingRewards200Response + * @memberof ContractInvocationList */ 'next_page': string; + /** + * The total number of contract invocations for the address in the wallet. + * @type {number} + * @memberof ContractInvocationList + */ + 'total_count': number; } /** * * @export - * @interface FetchStakingRewardsRequest + * @interface CreateAddressRequest */ -export interface FetchStakingRewardsRequest { - /** - * The ID of the blockchain network - * @type {string} - * @memberof FetchStakingRewardsRequest - */ - 'network_id': string; - /** - * The ID of the asset for which the staking rewards are being fetched - * @type {string} - * @memberof FetchStakingRewardsRequest - */ - 'asset_id': string; - /** - * The onchain addresses for which the staking rewards are being fetched - * @type {Array} - * @memberof FetchStakingRewardsRequest - */ - 'address_ids': Array; +export interface CreateAddressRequest { /** - * The start time of this reward period + * The public key from which the address will be derived. * @type {string} - * @memberof FetchStakingRewardsRequest + * @memberof CreateAddressRequest */ - 'start_time': string; + 'public_key'?: string; /** - * The end time of this reward period + * An attestation signed by the private key that is associated with the wallet. The attestation will be a hex-encoded signature of a json payload with fields `wallet_id` and `public_key`, signed by the private key associated with the public_key set in the request. * @type {string} - * @memberof FetchStakingRewardsRequest + * @memberof CreateAddressRequest */ - 'end_time': string; + 'attestation'?: string; /** - * - * @type {StakingRewardFormat} - * @memberof FetchStakingRewardsRequest + * The index of the address within the wallet. + * @type {number} + * @memberof CreateAddressRequest */ - 'format': StakingRewardFormat; + 'address_index'?: number; } - - /** * * @export - * @interface GetStakingContextRequest + * @interface CreateContractInvocationRequest */ -export interface GetStakingContextRequest { +export interface CreateContractInvocationRequest { /** - * The ID of the blockchain network + * The address of the contract to invoke. * @type {string} - * @memberof GetStakingContextRequest + * @memberof CreateContractInvocationRequest */ - 'network_id': string; + 'contract_address': string; /** - * The ID of the asset being staked + * The method to invoke on the contract. * @type {string} - * @memberof GetStakingContextRequest + * @memberof CreateContractInvocationRequest */ - 'asset_id': string; + 'method': string; /** - * The onchain address for which the staking context is being fetched + * The JSON-encoded arguments to pass to the contract method. The keys should be the argument names and the values should be the argument values. * @type {string} - * @memberof GetStakingContextRequest + * @memberof CreateContractInvocationRequest */ - 'address_id': string; + 'args': string; /** - * - * @type {{ [key: string]: string; }} - * @memberof GetStakingContextRequest + * The JSON-encoded ABI of the contract. + * @type {string} + * @memberof CreateContractInvocationRequest */ - 'options': { [key: string]: string; }; + 'abi'?: string; + /** + * The amount in atomic units of the native asset to send to the contract for a payable method + * @type {string} + * @memberof CreateContractInvocationRequest + */ + 'amount'?: string; } /** - * An error response from the Coinbase Developer Platform API + * * @export - * @interface ModelError + * @interface CreateExternalTransferRequest */ -export interface ModelError { +export interface CreateExternalTransferRequest { /** - * A short string representing the reported error. Can be use to handle errors programmatically. + * The amount to transfer * @type {string} - * @memberof ModelError + * @memberof CreateExternalTransferRequest */ - 'code': string; + 'amount': string; /** - * A human-readable message providing more details about the error. + * The ID of the asset to transfer. Can be an asset symbol or a token contract address. * @type {string} - * @memberof ModelError + * @memberof CreateExternalTransferRequest */ - 'message': string; -} -/** - * The partial eth staking context - * @export - * @interface PartialEthStakingContext - */ -export interface PartialEthStakingContext { + 'asset_id': string; /** - * - * @type {Balance} - * @memberof PartialEthStakingContext + * The destination address, which can be a 0x address, Basename, or ENS name + * @type {string} + * @memberof CreateExternalTransferRequest */ - 'stakeable_balance': Balance; + 'destination': string; /** - * - * @type {Balance} - * @memberof PartialEthStakingContext + * Whether the transfer uses sponsored gas + * @type {boolean} + * @memberof CreateExternalTransferRequest */ - 'unstakeable_balance': Balance; + 'gasless': boolean; /** - * - * @type {Balance} - * @memberof PartialEthStakingContext + * When true, the transfer will be submitted immediately. Otherwise, the transfer will be batched. Defaults to false. Note: Requires the gasless option to be set to true. + * @type {boolean} + * @memberof CreateExternalTransferRequest */ - 'claimable_balance': Balance; + 'skip_batching'?: boolean; } /** - * An event representing a seed creation. + * * @export - * @interface SeedCreationEvent + * @interface CreateFundOperationRequest */ -export interface SeedCreationEvent { +export interface CreateFundOperationRequest { /** - * The ID of the wallet that the server-signer should create the seed for + * The amount of the asset to fund the address with in atomic units. * @type {string} - * @memberof SeedCreationEvent + * @memberof CreateFundOperationRequest */ - 'wallet_id': string; + 'amount': string; /** - * The ID of the user that the wallet belongs to + * The ID of the asset to fund the address with. Can be an asset symbol or a token contract address. * @type {string} - * @memberof SeedCreationEvent + * @memberof CreateFundOperationRequest */ - 'wallet_user_id': string; + 'asset_id': string; + /** + * The Optional ID of the fund quote to fund the address with. If omitted we will generate a quote and immediately execute it. + * @type {string} + * @memberof CreateFundOperationRequest + */ + 'fund_quote_id'?: string; } /** - * The result to a SeedCreationEvent. + * * @export - * @interface SeedCreationEventResult + * @interface CreateFundQuoteRequest */ -export interface SeedCreationEventResult { +export interface CreateFundQuoteRequest { /** - * The ID of the wallet that the seed was created for + * The amount of the asset to fund the address with in atomic units. * @type {string} - * @memberof SeedCreationEventResult + * @memberof CreateFundQuoteRequest */ - 'wallet_id': string; + 'amount': string; /** - * The ID of the user that the wallet belongs to + * The ID of the asset to fund the address with. Can be an asset symbol alias or a token contract address. * @type {string} - * @memberof SeedCreationEventResult + * @memberof CreateFundQuoteRequest */ - 'wallet_user_id': string; + 'asset_id': string; +} +/** + * + * @export + * @interface CreatePayloadSignatureRequest + */ +export interface CreatePayloadSignatureRequest { /** - * The extended public key for the first master key derived from seed. + * The unsigned payload. * @type {string} - * @memberof SeedCreationEventResult + * @memberof CreatePayloadSignatureRequest */ - 'extended_public_key': string; + 'unsigned_payload': string; /** - * The ID of the seed in Server-Signer used to generate the extended public key. + * The signature of the payload. * @type {string} - * @memberof SeedCreationEventResult + * @memberof CreatePayloadSignatureRequest */ - 'seed_id': string; + 'signature'?: string; } /** - * A Server-Signer assigned to sign transactions in a wallet. + * * @export - * @interface ServerSigner + * @interface CreateServerSignerRequest */ -export interface ServerSigner { +export interface CreateServerSignerRequest { /** - * The ID of the server-signer + * The ID of the server signer for the 1 of 1 server signer. * @type {string} - * @memberof ServerSigner + * @memberof CreateServerSignerRequest */ - 'server_signer_id': string; + 'server_signer_id'?: string; /** - * The IDs of the wallets that the server-signer can sign for - * @type {Array} - * @memberof ServerSigner + * The enrollment data of the server signer. This will be the base64 encoded server-signer-id for the 1 of 1 server signer. + * @type {string} + * @memberof CreateServerSignerRequest */ - 'wallets'?: Array; + 'enrollment_data': string; /** * Whether the Server-Signer uses MPC. * @type {boolean} - * @memberof ServerSigner + * @memberof CreateServerSignerRequest */ 'is_mpc': boolean; } /** - * An event that is waiting to be processed by a Server-Signer. + * * @export - * @interface ServerSignerEvent + * @interface CreateSmartContractRequest */ -export interface ServerSignerEvent { +export interface CreateSmartContractRequest { /** - * The ID of the server-signer that the event is for - * @type {string} - * @memberof ServerSignerEvent + * + * @type {SmartContractType} + * @memberof CreateSmartContractRequest */ - 'server_signer_id': string; + 'type': SmartContractType; /** * - * @type {ServerSignerEventEvent} - * @memberof ServerSignerEvent + * @type {SmartContractOptions} + * @memberof CreateSmartContractRequest */ - 'event': ServerSignerEventEvent; + 'options': SmartContractOptions; + /** + * The optional UUID of the compiled smart contract to deploy. This field is only required when SmartContractType is set to custom. + * @type {string} + * @memberof CreateSmartContractRequest + */ + 'compiled_smart_contract_id'?: string; } + + /** - * @type ServerSignerEventEvent + * * @export + * @interface CreateSmartWalletRequest */ -export type ServerSignerEventEvent = SeedCreationEvent | SignatureCreationEvent; - +export interface CreateSmartWalletRequest { + /** + * The address of the owner of the smart wallet. + * @type {string} + * @memberof CreateSmartWalletRequest + */ + 'owner': string; +} /** * * @export - * @interface ServerSignerEventList + * @interface CreateStakingOperationRequest */ -export interface ServerSignerEventList { +export interface CreateStakingOperationRequest { /** - * - * @type {Array} - * @memberof ServerSignerEventList + * The ID of the blockchain network. + * @type {string} + * @memberof CreateStakingOperationRequest */ - 'data': Array; + 'network_id': string; /** - * True if this list has another page of items after this one that can be fetched. - * @type {boolean} - * @memberof ServerSignerEventList + * The ID of the asset being staked. + * @type {string} + * @memberof CreateStakingOperationRequest */ - 'has_more': boolean; + 'asset_id': string; /** - * The page token to be used to fetch the next page. + * The type of staking operation. * @type {string} - * @memberof ServerSignerEventList + * @memberof CreateStakingOperationRequest */ - 'next_page': string; + 'action': string; /** - * The total number of events for the server signer. - * @type {number} - * @memberof ServerSignerEventList + * Additional options for the staking operation. + * @type {{ [key: string]: string; }} + * @memberof CreateStakingOperationRequest */ - 'total_count': number; + 'options': { [key: string]: string; }; } /** * * @export - * @interface ServerSignerList + * @interface CreateTradeRequest */ -export interface ServerSignerList { - /** - * - * @type {Array} - * @memberof ServerSignerList - */ - 'data': Array; +export interface CreateTradeRequest { /** - * True if this list has another page of items after this one that can be fetched. - * @type {boolean} - * @memberof ServerSignerList + * The amount to trade + * @type {string} + * @memberof CreateTradeRequest */ - 'has_more': boolean; + 'amount': string; /** - * The page token to be used to fetch the next page. + * The ID of the asset to trade * @type {string} - * @memberof ServerSignerList + * @memberof CreateTradeRequest */ - 'next_page': string; + 'from_asset_id': string; /** - * The total number of server-signers for the project. - * @type {number} - * @memberof ServerSignerList + * The ID of the asset to receive from the trade + * @type {string} + * @memberof CreateTradeRequest */ - 'total_count': number; + 'to_asset_id': string; } /** - * An event representing a signature creation. + * * @export - * @interface SignatureCreationEvent + * @interface CreateTransferRequest */ -export interface SignatureCreationEvent { +export interface CreateTransferRequest { /** - * The ID of the seed that the server-signer should create the signature for + * The amount to transfer * @type {string} - * @memberof SignatureCreationEvent + * @memberof CreateTransferRequest */ - 'seed_id': string; + 'amount': string; /** - * The ID of the wallet the signature is for + * The ID of the blockchain network * @type {string} - * @memberof SignatureCreationEvent + * @memberof CreateTransferRequest */ - 'wallet_id': string; + 'network_id': string; /** - * The ID of the user that the wallet belongs to + * The ID of the asset to transfer. Can be an asset symbol or a token contract address. * @type {string} - * @memberof SignatureCreationEvent + * @memberof CreateTransferRequest */ - 'wallet_user_id': string; + 'asset_id': string; /** - * The ID of the address the transfer belongs to + * The destination address, which can be a 0x address, Basename, or ENS name * @type {string} - * @memberof SignatureCreationEvent + * @memberof CreateTransferRequest */ - 'address_id': string; + 'destination': string; /** - * The index of the address that the server-signer should sign with - * @type {number} - * @memberof SignatureCreationEvent + * Whether the transfer uses sponsored gas + * @type {boolean} + * @memberof CreateTransferRequest */ - 'address_index': number; + 'gasless'?: boolean; /** - * The payload that the server-signer should sign + * When true, the transfer will be submitted immediately. Otherwise, the transfer will be batched. Defaults to false + * @type {boolean} + * @memberof CreateTransferRequest + */ + 'skip_batching'?: boolean; +} +/** + * + * @export + * @interface CreateUserOperationRequest + */ +export interface CreateUserOperationRequest { + /** + * The list of calls to make from the smart wallet. + * @type {Array} + * @memberof CreateUserOperationRequest + */ + 'calls': Array; + /** + * The URL of the paymaster to use for the user operation. * @type {string} - * @memberof SignatureCreationEvent + * @memberof CreateUserOperationRequest */ - 'signing_payload': string; + 'paymaster_url'?: string; +} +/** + * + * @export + * @interface CreateWalletRequest + */ +export interface CreateWalletRequest { /** * - * @type {TransactionType} - * @memberof SignatureCreationEvent + * @type {CreateWalletRequestWallet} + * @memberof CreateWalletRequest */ - 'transaction_type': TransactionType; + 'wallet': CreateWalletRequestWallet; +} +/** + * Parameters for configuring a wallet + * @export + * @interface CreateWalletRequestWallet + */ +export interface CreateWalletRequestWallet { /** - * The ID of the transaction that the server-signer should sign + * The ID of the blockchain network * @type {string} - * @memberof SignatureCreationEvent + * @memberof CreateWalletRequestWallet */ - 'transaction_id': string; + 'network_id': string; + /** + * Whether the wallet should use the project\'s server signer or if the addresses in the wallets will belong to a private key the developer manages. Defaults to false. + * @type {boolean} + * @memberof CreateWalletRequestWallet + */ + 'use_server_signer'?: boolean; } - - /** - * The result to a SignatureCreationEvent. + * * @export - * @interface SignatureCreationEventResult + * @interface CreateWalletWebhookRequest */ -export interface SignatureCreationEventResult { +export interface CreateWalletWebhookRequest { /** - * The ID of the wallet that the event was created for. + * The URL to which the notifications will be sent. * @type {string} - * @memberof SignatureCreationEventResult + * @memberof CreateWalletWebhookRequest */ - 'wallet_id': string; + 'notification_uri': string; /** - * The ID of the user that the wallet belongs to + * The custom header to be used for x-webhook-signature header on callbacks, so developers can verify the requests are coming from Coinbase. * @type {string} - * @memberof SignatureCreationEventResult + * @memberof CreateWalletWebhookRequest */ - 'wallet_user_id': string; + 'signature_header'?: string; +} +/** + * + * @export + * @interface CreateWebhookRequest + */ +export interface CreateWebhookRequest { /** - * The ID of the address the transfer belongs to + * The ID of the blockchain network * @type {string} - * @memberof SignatureCreationEventResult + * @memberof CreateWebhookRequest */ - 'address_id': string; + 'network_id': string; /** * - * @type {TransactionType} - * @memberof SignatureCreationEventResult + * @type {WebhookEventType} + * @memberof CreateWebhookRequest */ - 'transaction_type': TransactionType; + 'event_type': WebhookEventType; /** - * The ID of the transaction that the Server-Signer has signed for + * + * @type {WebhookEventTypeFilter} + * @memberof CreateWebhookRequest + */ + 'event_type_filter'?: WebhookEventTypeFilter; + /** + * Webhook will monitor all events that matches any one of the event filters. + * @type {Array} + * @memberof CreateWebhookRequest + */ + 'event_filters'?: Array; + /** + * The URL to which the notifications will be sent * @type {string} - * @memberof SignatureCreationEventResult + * @memberof CreateWebhookRequest */ - 'transaction_id': string; + 'notification_uri': string; /** - * The signature created by the server-signer. + * The custom header to be used for x-webhook-signature header on callbacks, so developers can verify the requests are coming from Coinbase. * @type {string} - * @memberof SignatureCreationEventResult + * @memberof CreateWebhookRequest */ - 'signature': string; + 'signature_header'?: string; } /** - * Context needed to perform a staking operation + * An amount in cryptocurrency * @export - * @interface StakingContext + * @interface CryptoAmount */ -export interface StakingContext { +export interface CryptoAmount { + /** + * The amount of the crypto in atomic units + * @type {string} + * @memberof CryptoAmount + */ + 'amount': string; /** * - * @type {StakingContextContext} - * @memberof StakingContext + * @type {Asset} + * @memberof CryptoAmount */ - 'context': StakingContextContext; + 'asset': Asset; } /** - * @type StakingContextContext - * @export - */ -export type StakingContextContext = PartialEthStakingContext; - -/** - * An onchain transaction to help realize a staking action. + * * @export - * @interface StakingOperation + * @interface DeploySmartContractRequest */ -export interface StakingOperation { +export interface DeploySmartContractRequest { /** - * The transaction(s) that will execute the staking operation onchain - * @type {Array} - * @memberof StakingOperation + * The hex-encoded signed payload of the contract deployment transaction. + * @type {string} + * @memberof DeploySmartContractRequest */ - 'transactions': Array; + 'signed_payload': string; } /** - * The staking rewards for an address + * Represents an event triggered by an ERC-20 token transfer on the blockchain. Contains information about the transaction, block, and involved addresses. * @export - * @interface StakingReward + * @interface ERC20TransferEvent */ -export interface StakingReward { +export interface ERC20TransferEvent { /** - * The onchain address for which the staking rewards are being fetched + * Unique identifier for the webhook that triggered this event. * @type {string} - * @memberof StakingReward + * @memberof ERC20TransferEvent */ - 'address_id': string; + 'webhookId'?: string; /** - * The date of the reward in format \'YYYY-MM-DD\' in UTC. + * Type of event, in this case, an ERC-20 token transfer. * @type {string} - * @memberof StakingReward + * @memberof ERC20TransferEvent */ - 'date': string; + 'eventType'?: string; /** - * The reward amount in requested \"format\". Default is USD. + * Blockchain network where the event occurred. * @type {string} - * @memberof StakingReward + * @memberof ERC20TransferEvent */ - 'amount': string; + 'network'?: string; /** - * The state of the reward + * Hash of the block containing the transaction. * @type {string} - * @memberof StakingReward + * @memberof ERC20TransferEvent */ - 'state': StakingRewardStateEnum; + 'blockHash'?: string; /** - * - * @type {StakingRewardFormat} - * @memberof StakingReward + * Number of the block containing the transaction. + * @type {number} + * @memberof ERC20TransferEvent */ - 'format': StakingRewardFormat; -} - -export const StakingRewardStateEnum = { - Pending: 'pending', - Distributed: 'distributed' -} as const; - -export type StakingRewardStateEnum = typeof StakingRewardStateEnum[keyof typeof StakingRewardStateEnum]; - -/** - * The format in which the rewards are to be fetched i.e native or in equivalent USD - * @export - * @enum {string} - */ - -export const StakingRewardFormat = { - Usd: 'usd', - Native: 'native' -} as const; - -export type StakingRewardFormat = typeof StakingRewardFormat[keyof typeof StakingRewardFormat]; - - -/** - * A trade of an asset to another asset - * @export - * @interface Trade - */ -export interface Trade { + 'blockNumber'?: number; /** - * The ID of the blockchain network + * Timestamp when the block was mined. * @type {string} - * @memberof Trade + * @memberof ERC20TransferEvent */ - 'network_id': string; + 'blockTime'?: string; /** - * The ID of the wallet that owns the from address + * Hash of the transaction that triggered the event. * @type {string} - * @memberof Trade + * @memberof ERC20TransferEvent */ - 'wallet_id': string; + 'transactionHash'?: string; /** - * The onchain address of the sender - * @type {string} - * @memberof Trade + * Position of the transaction within the block. + * @type {number} + * @memberof ERC20TransferEvent */ - 'address_id': string; + 'transactionIndex'?: number; /** - * The ID of the trade + * Position of the event log within the transaction. + * @type {number} + * @memberof ERC20TransferEvent + */ + 'logIndex'?: number; + /** + * Address of the ERC-20 token contract. * @type {string} - * @memberof Trade + * @memberof ERC20TransferEvent */ - 'trade_id': string; + 'contractAddress'?: string; /** - * The amount of the from asset to be traded (in atomic units of the from asset) + * Address of the sender in the token transfer. * @type {string} - * @memberof Trade + * @memberof ERC20TransferEvent */ - 'from_amount': string; + 'from'?: string; /** - * - * @type {Asset} - * @memberof Trade + * Address of the recipient in the token transfer. + * @type {string} + * @memberof ERC20TransferEvent */ - 'from_asset': Asset; + 'to'?: string; /** - * The amount of the to asset that will be received (in atomic units of the to asset) + * Amount of tokens transferred, typically in the smallest unit (e.g., wei for Ethereum). * @type {string} - * @memberof Trade + * @memberof ERC20TransferEvent */ - 'to_amount': string; + 'value'?: string; +} +/** + * Represents an event triggered by an ERC-721 token transfer on the blockchain. Contains information about the transaction, block, and involved addresses. + * @export + * @interface ERC721TransferEvent + */ +export interface ERC721TransferEvent { /** - * - * @type {Asset} - * @memberof Trade + * Unique identifier for the webhook that triggered this event. + * @type {string} + * @memberof ERC721TransferEvent */ - 'to_asset': Asset; + 'webhookId'?: string; /** - * - * @type {Transaction} - * @memberof Trade + * Type of event, in this case, an ERC-721 token transfer. + * @type {string} + * @memberof ERC721TransferEvent */ - 'transaction': Transaction; + 'eventType'?: string; /** - * - * @type {Transaction} - * @memberof Trade + * Blockchain network where the event occurred. + * @type {string} + * @memberof ERC721TransferEvent */ - 'approve_transaction'?: Transaction; -} -/** - * - * @export - * @interface TradeList - */ -export interface TradeList { + 'network'?: string; /** - * - * @type {Array} - * @memberof TradeList + * Hash of the block containing the transaction. + * @type {string} + * @memberof ERC721TransferEvent */ - 'data': Array; + 'blockHash'?: string; /** - * True if this list has another page of items after this one that can be fetched. - * @type {boolean} - * @memberof TradeList + * Number of the block containing the transaction. + * @type {number} + * @memberof ERC721TransferEvent */ - 'has_more': boolean; + 'blockNumber'?: number; /** - * The page token to be used to fetch the next page. + * Timestamp when the block was mined. * @type {string} - * @memberof TradeList + * @memberof ERC721TransferEvent */ - 'next_page': string; + 'blockTime'?: string; /** - * The total number of trades for the address in the wallet. + * Hash of the transaction that triggered the event. + * @type {string} + * @memberof ERC721TransferEvent + */ + 'transactionHash'?: string; + /** + * Position of the transaction within the block. * @type {number} - * @memberof TradeList + * @memberof ERC721TransferEvent */ - 'total_count': number; + 'transactionIndex'?: number; + /** + * Position of the event log within the transaction. + * @type {number} + * @memberof ERC721TransferEvent + */ + 'logIndex'?: number; + /** + * Address of the ERC-721 token contract. + * @type {string} + * @memberof ERC721TransferEvent + */ + 'contractAddress'?: string; + /** + * Address of the sender in the token transfer. + * @type {string} + * @memberof ERC721TransferEvent + */ + 'from'?: string; + /** + * Address of the recipient in the token transfer. + * @type {string} + * @memberof ERC721TransferEvent + */ + 'to'?: string; + /** + * Unique identifier of the NFT being transferred. + * @type {string} + * @memberof ERC721TransferEvent + */ + 'tokenId'?: string; } /** - * An onchain transaction. + * * @export - * @interface Transaction + * @interface EthereumTokenTransfer */ -export interface Transaction { +export interface EthereumTokenTransfer { /** - * The ID of the blockchain network + * * @type {string} - * @memberof Transaction + * @memberof EthereumTokenTransfer */ - 'network_id': string; + 'contract_address': string; /** - * The onchain address of the sender + * * @type {string} - * @memberof Transaction + * @memberof EthereumTokenTransfer */ - 'from_address_id': string; + 'from_address': string; /** - * The unsigned payload of the transaction. This is the payload that needs to be signed by the sender. + * * @type {string} - * @memberof Transaction + * @memberof EthereumTokenTransfer */ - 'unsigned_payload': string; + 'to_address': string; /** - * The signed payload of the transaction. This is the payload that has been signed by the sender. + * The value of the transaction in atomic units of the token being transfer for ERC20 or ERC1155 contracts. * @type {string} - * @memberof Transaction + * @memberof EthereumTokenTransfer */ - 'signed_payload'?: string; + 'value'?: string; /** - * The hash of the transaction + * The ID of ERC721 or ERC1155 token being transferred. * @type {string} - * @memberof Transaction + * @memberof EthereumTokenTransfer */ - 'transaction_hash'?: string; + 'token_id'?: string; /** - * The link to view the transaction on a block explorer. This is optional and may not be present for all transactions. - * @type {string} - * @memberof Transaction + * + * @type {number} + * @memberof EthereumTokenTransfer */ - 'transaction_link'?: string; + 'log_index': number; /** - * The status of the transaction - * @type {string} - * @memberof Transaction + * + * @type {TokenTransferType} + * @memberof EthereumTokenTransfer */ - 'status': TransactionStatusEnum; + 'token_transfer_type': TokenTransferType; } -export const TransactionStatusEnum = { - Pending: 'pending', - Signed: 'signed', - Broadcast: 'broadcast', - Complete: 'complete', - Failed: 'failed' -} as const; - -export type TransactionStatusEnum = typeof TransactionStatusEnum[keyof typeof TransactionStatusEnum]; /** * * @export - * @enum {string} - */ - -export const TransactionType = { - Transfer: 'transfer' -} as const; - -export type TransactionType = typeof TransactionType[keyof typeof TransactionType]; - - -/** - * A transfer of an asset from one address to another - * @export - * @interface Transfer + * @interface EthereumTransaction */ -export interface Transfer { +export interface EthereumTransaction { /** - * The ID of the blockchain network + * The onchain address of the sender. * @type {string} - * @memberof Transfer + * @memberof EthereumTransaction */ - 'network_id': string; + 'from': string; /** - * The ID of the wallet that owns the from address - * @type {string} - * @memberof Transfer + * The amount of gas spent in the transaction. + * @type {number} + * @memberof EthereumTransaction */ - 'wallet_id': string; + 'gas'?: number; /** - * The onchain address of the sender + * The price per gas spent in the transaction in atomic units of the native asset. + * @type {number} + * @memberof EthereumTransaction + */ + 'gas_price'?: number; + /** + * The hash of the transaction as a hexadecimal string, prefixed with 0x. * @type {string} - * @memberof Transfer + * @memberof EthereumTransaction */ - 'address_id': string; + 'hash'?: string; /** - * The onchain address of the recipient + * The input data of the transaction. * @type {string} - * @memberof Transfer + * @memberof EthereumTransaction */ - 'destination': string; + 'input'?: string; /** - * The amount in the atomic units of the asset + * The nonce of the transaction in the source address. + * @type {number} + * @memberof EthereumTransaction + */ + 'nonce'?: number; + /** + * The onchain address of the receiver. * @type {string} - * @memberof Transfer + * @memberof EthereumTransaction */ - 'amount': string; + 'to': string; + /** + * The index of the transaction in the block. + * @type {number} + * @memberof EthereumTransaction + */ + 'index'?: number; /** - * The ID of the asset being transferred + * The value of the transaction in atomic units of the native asset. * @type {string} - * @memberof Transfer + * @memberof EthereumTransaction */ - 'asset_id': string; + 'value'?: string; + /** + * The EIP-2718 transaction type. See https://eips.ethereum.org/EIPS/eip-2718 for more details. + * @type {number} + * @memberof EthereumTransaction + */ + 'type'?: number; + /** + * The max fee per gas as defined in EIP-1559. https://eips.ethereum.org/EIPS/eip-1559 for more details. + * @type {number} + * @memberof EthereumTransaction + */ + 'max_fee_per_gas'?: number; + /** + * The max priority fee per gas as defined in EIP-1559. https://eips.ethereum.org/EIPS/eip-1559 for more details. + * @type {number} + * @memberof EthereumTransaction + */ + 'max_priority_fee_per_gas'?: number; + /** + * The confirmed priority fee per gas as defined in EIP-1559. https://eips.ethereum.org/EIPS/eip-1559 for more details. + * @type {number} + * @memberof EthereumTransaction + */ + 'priority_fee_per_gas'?: number; /** * - * @type {Asset} - * @memberof Transfer + * @type {EthereumTransactionAccessList} + * @memberof EthereumTransaction */ - 'asset': Asset; + 'transaction_access_list'?: EthereumTransactionAccessList; /** - * The ID of the transfer - * @type {string} - * @memberof Transfer + * + * @type {Array} + * @memberof EthereumTransaction */ - 'transfer_id': string; + 'token_transfers'?: Array; /** * - * @type {Transaction} - * @memberof Transfer + * @type {Array} + * @memberof EthereumTransaction */ - 'transaction': Transaction; + 'flattened_traces'?: Array; /** - * The unsigned payload of the transfer. This is the payload that needs to be signed by the sender. + * The timestamp of the block in which the event was emitted * @type {string} - * @memberof Transfer + * @memberof EthereumTransaction */ - 'unsigned_payload': string; + 'block_timestamp'?: string; /** - * The signed payload of the transfer. This is the payload that has been signed by the sender. + * This is for handling optimism rollup specific EIP-2718 transaction type field. * @type {string} - * @memberof Transfer + * @memberof EthereumTransaction */ - 'signed_payload'?: string; + 'mint'?: string; /** - * The hash of the transfer transaction + * RLP encoded transaction as a hex string (prefixed with 0x) for native compatibility with popular eth clients such as etherjs, viem etc. * @type {string} - * @memberof Transfer + * @memberof EthereumTransaction */ - 'transaction_hash'?: string; + 'rlp_encoded_tx'?: string; /** - * The status of the transfer - * @type {string} - * @memberof Transfer + * + * @type {TransactionReceipt} + * @memberof EthereumTransaction */ - 'status': TransferStatusEnum; + 'receipt'?: TransactionReceipt; } - -export const TransferStatusEnum = { - Pending: 'pending', - Broadcast: 'broadcast', - Complete: 'complete', - Failed: 'failed' -} as const; - -export type TransferStatusEnum = typeof TransferStatusEnum[keyof typeof TransferStatusEnum]; - /** * * @export - * @interface TransferList + * @interface EthereumTransactionAccess */ -export interface TransferList { +export interface EthereumTransactionAccess { /** * - * @type {Array} - * @memberof TransferList - */ - 'data': Array; - /** - * True if this list has another page of items after this one that can be fetched. - * @type {boolean} - * @memberof TransferList - */ - 'has_more': boolean; - /** - * The page token to be used to fetch the next page. * @type {string} - * @memberof TransferList + * @memberof EthereumTransactionAccess */ - 'next_page': string; + 'address'?: string; /** - * The total number of transfers for the address in the wallet. - * @type {number} - * @memberof TransferList + * + * @type {Array} + * @memberof EthereumTransactionAccess */ - 'total_count': number; + 'storage_keys'?: Array; } /** * * @export - * @interface User + * @interface EthereumTransactionAccessList */ -export interface User { - /** - * The ID of the user - * @type {string} - * @memberof User - */ - 'id': string; +export interface EthereumTransactionAccessList { /** * - * @type {string} - * @memberof User + * @type {Array} + * @memberof EthereumTransactionAccessList */ - 'display_name'?: string; + 'access_list'?: Array; } /** * * @export - * @interface Wallet + * @interface EthereumTransactionFlattenedTrace */ -export interface Wallet { +export interface EthereumTransactionFlattenedTrace { /** - * The server-assigned ID for the wallet. + * * @type {string} - * @memberof Wallet + * @memberof EthereumTransactionFlattenedTrace */ - 'id': string; + 'error'?: string; /** - * The ID of the blockchain network + * * @type {string} - * @memberof Wallet + * @memberof EthereumTransactionFlattenedTrace */ - 'network_id': string; + 'type'?: string; /** * - * @type {Address} - * @memberof Wallet + * @type {string} + * @memberof EthereumTransactionFlattenedTrace */ - 'default_address'?: Address; + 'from'?: string; /** - * The features enabled for the wallet - * @type {Array} - * @memberof Wallet + * + * @type {string} + * @memberof EthereumTransactionFlattenedTrace */ - 'enabled_features': Array; + 'to'?: string; /** - * The status of the Server-Signer for the wallet if present. + * * @type {string} - * @memberof Wallet + * @memberof EthereumTransactionFlattenedTrace */ - 'server_signer_status'?: WalletServerSignerStatusEnum; -} - -export const WalletServerSignerStatusEnum = { - PendingSeedCreation: 'pending_seed_creation', - ActiveSeed: 'active_seed' -} as const; - -export type WalletServerSignerStatusEnum = typeof WalletServerSignerStatusEnum[keyof typeof WalletServerSignerStatusEnum]; - -/** - * Paginated list of wallets - * @export - * @interface WalletList - */ -export interface WalletList { + 'value'?: string; /** * - * @type {Array} - * @memberof WalletList + * @type {number} + * @memberof EthereumTransactionFlattenedTrace */ - 'data': Array; + 'gas'?: number; /** - * True if this list has another page of items after this one that can be fetched. - * @type {boolean} - * @memberof WalletList + * + * @type {number} + * @memberof EthereumTransactionFlattenedTrace */ - 'has_more': boolean; + 'gas_used'?: number; + /** + * + * @type {string} + * @memberof EthereumTransactionFlattenedTrace + */ + 'input'?: string; + /** + * + * @type {string} + * @memberof EthereumTransactionFlattenedTrace + */ + 'output'?: string; + /** + * + * @type {number} + * @memberof EthereumTransactionFlattenedTrace + */ + 'sub_traces'?: number; + /** + * + * @type {Array} + * @memberof EthereumTransactionFlattenedTrace + */ + 'trace_address'?: Array; + /** + * + * @type {string} + * @memberof EthereumTransactionFlattenedTrace + */ + 'trace_type'?: string; + /** + * + * @type {string} + * @memberof EthereumTransactionFlattenedTrace + */ + 'call_type'?: string; + /** + * + * @type {string} + * @memberof EthereumTransactionFlattenedTrace + */ + 'trace_id'?: string; + /** + * + * @type {number} + * @memberof EthereumTransactionFlattenedTrace + */ + 'status'?: number; + /** + * + * @type {string} + * @memberof EthereumTransactionFlattenedTrace + */ + 'block_hash'?: string; + /** + * + * @type {number} + * @memberof EthereumTransactionFlattenedTrace + */ + 'block_number'?: number; + /** + * + * @type {string} + * @memberof EthereumTransactionFlattenedTrace + */ + 'transaction_hash'?: string; + /** + * + * @type {number} + * @memberof EthereumTransactionFlattenedTrace + */ + 'transaction_index'?: number; +} +/** + * An Ethereum validator. + * @export + * @interface EthereumValidatorMetadata + */ +export interface EthereumValidatorMetadata { + /** + * The index of the validator in the validator set. + * @type {string} + * @memberof EthereumValidatorMetadata + */ + 'index': string; + /** + * The public key of the validator. + * @type {string} + * @memberof EthereumValidatorMetadata + */ + 'public_key': string; + /** + * The 20-byte address to which the validator\'s rewards are sent. + * @type {string} + * @memberof EthereumValidatorMetadata + */ + 'withdrawal_address': string; + /** + * The 32-byte field that determines where and how a validator’s staked ETH and rewards can be withdrawn. + * @type {string} + * @memberof EthereumValidatorMetadata + */ + 'withdrawal_credentials': string; + /** + * Whether the validator has been slashed. + * @type {boolean} + * @memberof EthereumValidatorMetadata + */ + 'slashed': boolean; + /** + * The epoch at which the validator was activated. + * @type {string} + * @memberof EthereumValidatorMetadata + */ + 'activationEpoch': string; + /** + * The epoch at which the validator exited. + * @type {string} + * @memberof EthereumValidatorMetadata + */ + 'exitEpoch': string; + /** + * The epoch at which the validator can withdraw. + * @type {string} + * @memberof EthereumValidatorMetadata + */ + 'withdrawableEpoch': string; + /** + * + * @type {Balance} + * @memberof EthereumValidatorMetadata + */ + 'balance': Balance; + /** + * + * @type {Balance} + * @memberof EthereumValidatorMetadata + */ + 'effective_balance': Balance; + /** + * The address for execution layer rewards (MEV & tx fees). If using a reward splitter plan, this is a smart contract address that splits rewards based on defined commissions and send a portion to the forwarded_fee_recipient_address. + * @type {string} + * @memberof EthereumValidatorMetadata + */ + 'fee_recipient_address': string; + /** + * If using a reward splitter plan, this address receives a defined percentage of the total execution layer rewards. + * @type {string} + * @memberof EthereumValidatorMetadata + */ + 'forwarded_fee_recipient_address'?: string; +} +/** + * The faucet transaction + * @export + * @interface FaucetTransaction + */ +export interface FaucetTransaction { + /** + * The transaction hash of the transaction the faucet created. + * @type {string} + * @memberof FaucetTransaction + */ + 'transaction_hash': string; + /** + * Link to the transaction on the blockchain explorer. + * @type {string} + * @memberof FaucetTransaction + */ + 'transaction_link': string; + /** + * + * @type {Transaction} + * @memberof FaucetTransaction + */ + 'transaction': Transaction; +} +/** + * + * @export + * @interface FeatureSet + */ +export interface FeatureSet { + /** + * Whether the network supports a faucet + * @type {boolean} + * @memberof FeatureSet + */ + 'faucet': boolean; + /** + * Whether the network supports Server-Signers + * @type {boolean} + * @memberof FeatureSet + */ + 'server_signer': boolean; + /** + * Whether the network supports transfers + * @type {boolean} + * @memberof FeatureSet + */ + 'transfer': boolean; + /** + * Whether the network supports trading + * @type {boolean} + * @memberof FeatureSet + */ + 'trade': boolean; + /** + * Whether the network supports staking + * @type {boolean} + * @memberof FeatureSet + */ + 'stake': boolean; + /** + * Whether the network supports gasless sends + * @type {boolean} + * @memberof FeatureSet + */ + 'gasless_send': boolean; +} +/** + * + * @export + * @interface FetchHistoricalStakingBalances200Response + */ +export interface FetchHistoricalStakingBalances200Response { + /** + * + * @type {Array} + * @memberof FetchHistoricalStakingBalances200Response + */ + 'data': Array; + /** + * True if this list has another page of items after this one that can be fetched. + * @type {boolean} + * @memberof FetchHistoricalStakingBalances200Response + */ + 'has_more': boolean; /** * The page token to be used to fetch the next page. * @type {string} - * @memberof WalletList + * @memberof FetchHistoricalStakingBalances200Response + */ + 'next_page': string; +} +/** + * + * @export + * @interface FetchStakingRewards200Response + */ +export interface FetchStakingRewards200Response { + /** + * + * @type {Array} + * @memberof FetchStakingRewards200Response + */ + 'data': Array; + /** + * True if this list has another page of items after this one that can be fetched. + * @type {boolean} + * @memberof FetchStakingRewards200Response + */ + 'has_more': boolean; + /** + * The page token to be used to fetch the next page. + * @type {string} + * @memberof FetchStakingRewards200Response + */ + 'next_page': string; +} +/** + * + * @export + * @interface FetchStakingRewardsRequest + */ +export interface FetchStakingRewardsRequest { + /** + * The ID of the blockchain network + * @type {string} + * @memberof FetchStakingRewardsRequest + */ + 'network_id': string; + /** + * The ID of the asset for which the staking rewards are being fetched + * @type {string} + * @memberof FetchStakingRewardsRequest + */ + 'asset_id': string; + /** + * The onchain addresses for which the staking rewards are being fetched + * @type {Array} + * @memberof FetchStakingRewardsRequest + */ + 'address_ids': Array; + /** + * The start time of this reward period + * @type {string} + * @memberof FetchStakingRewardsRequest + */ + 'start_time': string; + /** + * The end time of this reward period + * @type {string} + * @memberof FetchStakingRewardsRequest + */ + 'end_time': string; + /** + * + * @type {StakingRewardFormat} + * @memberof FetchStakingRewardsRequest + */ + 'format': StakingRewardFormat; +} + + +/** + * An amount in fiat currency + * @export + * @interface FiatAmount + */ +export interface FiatAmount { + /** + * The amount of the fiat in whole units. + * @type {string} + * @memberof FiatAmount + */ + 'amount': string; + /** + * The currency of the fiat + * @type {string} + * @memberof FiatAmount + */ + 'currency': string; +} +/** + * An operation to fund a wallet with crypto + * @export + * @interface FundOperation + */ +export interface FundOperation { + /** + * The ID of the fund operation + * @type {string} + * @memberof FundOperation + */ + 'fund_operation_id': string; + /** + * The ID of the blockchain network + * @type {string} + * @memberof FundOperation + */ + 'network_id': string; + /** + * The ID of the wallet that will receive the crypto + * @type {string} + * @memberof FundOperation + */ + 'wallet_id': string; + /** + * The ID of the address that will receive the crypto + * @type {string} + * @memberof FundOperation + */ + 'address_id': string; + /** + * + * @type {CryptoAmount} + * @memberof FundOperation + */ + 'crypto_amount': CryptoAmount; + /** + * + * @type {FiatAmount} + * @memberof FundOperation + */ + 'fiat_amount': FiatAmount; + /** + * + * @type {FundOperationFees} + * @memberof FundOperation + */ + 'fees': FundOperationFees; + /** + * The status of the fund operation + * @type {string} + * @memberof FundOperation + */ + 'status': FundOperationStatusEnum; +} + +export const FundOperationStatusEnum = { + Pending: 'pending', + Complete: 'complete', + Failed: 'failed' +} as const; + +export type FundOperationStatusEnum = typeof FundOperationStatusEnum[keyof typeof FundOperationStatusEnum]; + +/** + * The fees for a fund operation. + * @export + * @interface FundOperationFees + */ +export interface FundOperationFees { + /** + * + * @type {FiatAmount} + * @memberof FundOperationFees + */ + 'buy_fee': FiatAmount; + /** + * + * @type {CryptoAmount} + * @memberof FundOperationFees + */ + 'transfer_fee': CryptoAmount; +} +/** + * Paginated list of fund operations + * @export + * @interface FundOperationList + */ +export interface FundOperationList { + /** + * + * @type {Array} + * @memberof FundOperationList + */ + 'data': Array; + /** + * True if this list has another page of items after this one that can be fetched. + * @type {boolean} + * @memberof FundOperationList + */ + 'has_more': boolean; + /** + * The page token to be used to fetch the next page. + * @type {string} + * @memberof FundOperationList + */ + 'next_page': string; + /** + * The total number of fund operations + * @type {number} + * @memberof FundOperationList + */ + 'total_count': number; +} +/** + * A quote for a fund operation + * @export + * @interface FundQuote + */ +export interface FundQuote { + /** + * The ID of the fund quote + * @type {string} + * @memberof FundQuote + */ + 'fund_quote_id': string; + /** + * The ID of the blockchain network + * @type {string} + * @memberof FundQuote + */ + 'network_id': string; + /** + * The ID of the wallet that will receive the crypto + * @type {string} + * @memberof FundQuote + */ + 'wallet_id': string; + /** + * The ID of the address that will receive the crypto + * @type {string} + * @memberof FundQuote + */ + 'address_id': string; + /** + * + * @type {CryptoAmount} + * @memberof FundQuote + */ + 'crypto_amount': CryptoAmount; + /** + * + * @type {FiatAmount} + * @memberof FundQuote + */ + 'fiat_amount': FiatAmount; + /** + * The time at which the quote expires + * @type {string} + * @memberof FundQuote + */ + 'expires_at': string; + /** + * + * @type {FundOperationFees} + * @memberof FundQuote + */ + 'fees': FundOperationFees; +} +/** + * + * @export + * @interface GetStakingContextRequest + */ +export interface GetStakingContextRequest { + /** + * The ID of the blockchain network + * @type {string} + * @memberof GetStakingContextRequest + */ + 'network_id': string; + /** + * The ID of the asset being staked + * @type {string} + * @memberof GetStakingContextRequest + */ + 'asset_id': string; + /** + * The onchain address for which the staking context is being fetched + * @type {string} + * @memberof GetStakingContextRequest + */ + 'address_id': string; + /** + * Additional options for getting the staking context. This typically includes network specific fields. + * @type {{ [key: string]: string; }} + * @memberof GetStakingContextRequest + */ + 'options': { [key: string]: string; }; +} +/** + * The balance of an asset onchain at a particular block + * @export + * @interface HistoricalBalance + */ +export interface HistoricalBalance { + /** + * The amount in the atomic units of the asset + * @type {string} + * @memberof HistoricalBalance + */ + 'amount': string; + /** + * The hash of the block at which the balance was recorded + * @type {string} + * @memberof HistoricalBalance + */ + 'block_hash': string; + /** + * The block height at which the balance was recorded + * @type {string} + * @memberof HistoricalBalance + */ + 'block_height': string; + /** + * + * @type {Asset} + * @memberof HistoricalBalance + */ + 'asset': Asset; +} +/** + * An error response from the Coinbase Developer Platform API + * @export + * @interface ModelError + */ +export interface ModelError { + /** + * A short string representing the reported error. Can be use to handle errors programmatically. + * @type {string} + * @memberof ModelError + */ + 'code': string; + /** + * A human-readable message providing more details about the error. + * @type {string} + * @memberof ModelError + */ + 'message': string; + /** + * A unique identifier for the request that generated the error. This can be used to help debug issues with the API. + * @type {string} + * @memberof ModelError + */ + 'correlation_id'?: string; +} +/** + * Options for multi-token contract creation + * @export + * @interface MultiTokenContractOptions + */ +export interface MultiTokenContractOptions { + /** + * The URI for all token metadata + * @type {string} + * @memberof MultiTokenContractOptions + */ + 'uri': string; +} +/** + * Options for NFT contract creation + * @export + * @interface NFTContractOptions + */ +export interface NFTContractOptions { + /** + * The name of the NFT + * @type {string} + * @memberof NFTContractOptions + */ + 'name': string; + /** + * The symbol of the NFT + * @type {string} + * @memberof NFTContractOptions + */ + 'symbol': string; + /** + * The base URI for the NFT metadata + * @type {string} + * @memberof NFTContractOptions + */ + 'base_uri': string; +} +/** + * + * @export + * @interface Network + */ +export interface Network { + /** + * + * @type {NetworkIdentifier} + * @memberof Network + */ + 'id': NetworkIdentifier; + /** + * The human-readable name of the blockchain network + * @type {string} + * @memberof Network + */ + 'display_name': string; + /** + * The chain ID of the blockchain network + * @type {number} + * @memberof Network + */ + 'chain_id': number; + /** + * The protocol family of the blockchain network + * @type {string} + * @memberof Network + */ + 'protocol_family': NetworkProtocolFamilyEnum; + /** + * Whether the network is a testnet or not + * @type {boolean} + * @memberof Network + */ + 'is_testnet': boolean; + /** + * + * @type {Asset} + * @memberof Network + */ + 'native_asset': Asset; + /** + * + * @type {FeatureSet} + * @memberof Network + */ + 'feature_set': FeatureSet; + /** + * The BIP44 path prefix for the network + * @type {string} + * @memberof Network + */ + 'address_path_prefix'?: string; +} + +export const NetworkProtocolFamilyEnum = { + Evm: 'evm', + Solana: 'solana' +} as const; + +export type NetworkProtocolFamilyEnum = typeof NetworkProtocolFamilyEnum[keyof typeof NetworkProtocolFamilyEnum]; + +/** + * The ID of the blockchain network. This is unique across all networks, and takes the form of `-`. + * @export + * @enum {string} + */ + +export const NetworkIdentifier = { + BaseSepolia: 'base-sepolia', + BaseMainnet: 'base-mainnet', + EthereumHoodi: 'ethereum-hoodi', + EthereumSepolia: 'ethereum-sepolia', + EthereumMainnet: 'ethereum-mainnet', + PolygonMainnet: 'polygon-mainnet', + SolanaDevnet: 'solana-devnet', + SolanaMainnet: 'solana-mainnet', + ArbitrumMainnet: 'arbitrum-mainnet', + ArbitrumSepolia: 'arbitrum-sepolia', + BitcoinMainnet: 'bitcoin-mainnet', + NearTestnet: 'near-testnet', + NearMainnet: 'near-mainnet' +} as const; + +export type NetworkIdentifier = typeof NetworkIdentifier[keyof typeof NetworkIdentifier]; + + +/** + * A representation of an onchain stored name from name systems i.e. ENS or Basenames + * @export + * @interface OnchainName + */ +export interface OnchainName { + /** + * The ID for the NFT related to this name + * @type {string} + * @memberof OnchainName + */ + 'token_id': string; + /** + * The onchain address of the owner of the name + * @type {string} + * @memberof OnchainName + */ + 'owner_address': string; + /** + * The onchain address of the manager of the name + * @type {string} + * @memberof OnchainName + */ + 'manager_address': string; + /** + * The primary onchain address of the name + * @type {string} + * @memberof OnchainName + */ + 'primary_address'?: string; + /** + * The readable format for the name in complete form + * @type {string} + * @memberof OnchainName + */ + 'domain': string; + /** + * The visual representation attached to this name + * @type {string} + * @memberof OnchainName + */ + 'avatar'?: string; + /** + * The ID of the blockchain network + * @type {string} + * @memberof OnchainName + */ + 'network_id': string; + /** + * The expiration date for this name\'s ownership + * @type {string} + * @memberof OnchainName + */ + 'expires_at': string; + /** + * The metadata attached to this name + * @type {{ [key: string]: string; }} + * @memberof OnchainName + */ + 'text_records'?: { [key: string]: string; }; + /** + * Whether this name is the primary name for the owner (This is when the ETH coin address for this name is equal to the primary_address. More info here https://docs.ens.domains/ensip/19) + * @type {boolean} + * @memberof OnchainName + */ + 'is_primary': boolean; +} +/** + * A list of onchain events with pagination information + * @export + * @interface OnchainNameList + */ +export interface OnchainNameList { + /** + * A list of onchain name objects + * @type {Array} + * @memberof OnchainNameList + */ + 'data': Array; + /** + * True if this list has another page of items after this one that can be fetched. + * @type {boolean} + * @memberof OnchainNameList + */ + 'has_more'?: boolean; + /** + * The page token to be used to fetch the next page. + * @type {string} + * @memberof OnchainNameList + */ + 'next_page': string; + /** + * The total number of payload signatures for the address. + * @type {number} + * @memberof OnchainNameList + */ + 'total_count'?: number; +} +/** + * A payload signed by an address. + * @export + * @interface PayloadSignature + */ +export interface PayloadSignature { + /** + * The ID of the payload signature. + * @type {string} + * @memberof PayloadSignature + */ + 'payload_signature_id': string; + /** + * The ID of the wallet that owns the address. + * @type {string} + * @memberof PayloadSignature + */ + 'wallet_id': string; + /** + * The onchain address of the signer. + * @type {string} + * @memberof PayloadSignature + */ + 'address_id': string; + /** + * The unsigned payload. This is the payload that needs to be signed by the signer address. + * @type {string} + * @memberof PayloadSignature + */ + 'unsigned_payload': string; + /** + * The signature of the payload. + * @type {string} + * @memberof PayloadSignature + */ + 'signature'?: string; + /** + * The status of the payload signature. + * @type {string} + * @memberof PayloadSignature + */ + 'status': PayloadSignatureStatusEnum; +} + +export const PayloadSignatureStatusEnum = { + Pending: 'pending', + Signed: 'signed', + Failed: 'failed' +} as const; + +export type PayloadSignatureStatusEnum = typeof PayloadSignatureStatusEnum[keyof typeof PayloadSignatureStatusEnum]; + +/** + * + * @export + * @interface PayloadSignatureList + */ +export interface PayloadSignatureList { + /** + * + * @type {Array} + * @memberof PayloadSignatureList + */ + 'data': Array; + /** + * True if this list has another page of items after this one that can be fetched. + * @type {boolean} + * @memberof PayloadSignatureList + */ + 'has_more': boolean; + /** + * The page token to be used to fetch the next page. + * @type {string} + * @memberof PayloadSignatureList + */ + 'next_page': string; + /** + * The total number of payload signatures for the address. + * @type {number} + * @memberof PayloadSignatureList + */ + 'total_count': number; +} +/** + * + * @export + * @interface ReadContractRequest + */ +export interface ReadContractRequest { + /** + * The name of the contract method to call + * @type {string} + * @memberof ReadContractRequest + */ + 'method': string; + /** + * The JSON-encoded arguments to pass to the contract method. The keys should be the argument names and the values should be the argument values. + * @type {string} + * @memberof ReadContractRequest + */ + 'args': string; + /** + * The JSON-encoded ABI of the contract method (optional, will use cached ABI if not provided) + * @type {string} + * @memberof ReadContractRequest + */ + 'abi'?: string; +} +/** + * Smart Contract data to be registered + * @export + * @interface RegisterSmartContractRequest + */ +export interface RegisterSmartContractRequest { + /** + * ABI of the smart contract + * @type {string} + * @memberof RegisterSmartContractRequest + */ + 'abi': string; + /** + * Name of the smart contract + * @type {string} + * @memberof RegisterSmartContractRequest + */ + 'contract_name'?: string; +} +/** + * An event representing a seed creation. + * @export + * @interface SeedCreationEvent + */ +export interface SeedCreationEvent { + /** + * The ID of the wallet that the server-signer should create the seed for + * @type {string} + * @memberof SeedCreationEvent + */ + 'wallet_id': string; + /** + * The ID of the user that the wallet belongs to + * @type {string} + * @memberof SeedCreationEvent + */ + 'wallet_user_id': string; +} +/** + * The result to a SeedCreationEvent. + * @export + * @interface SeedCreationEventResult + */ +export interface SeedCreationEventResult { + /** + * The ID of the wallet that the seed was created for + * @type {string} + * @memberof SeedCreationEventResult + */ + 'wallet_id': string; + /** + * The ID of the user that the wallet belongs to + * @type {string} + * @memberof SeedCreationEventResult + */ + 'wallet_user_id': string; + /** + * The extended public key for the first master key derived from seed. + * @type {string} + * @memberof SeedCreationEventResult + */ + 'extended_public_key': string; + /** + * The ID of the seed in Server-Signer used to generate the extended public key. + * @type {string} + * @memberof SeedCreationEventResult + */ + 'seed_id': string; +} +/** + * A Server-Signer assigned to sign transactions in a wallet. + * @export + * @interface ServerSigner + */ +export interface ServerSigner { + /** + * The ID of the server-signer + * @type {string} + * @memberof ServerSigner + */ + 'server_signer_id': string; + /** + * The IDs of the wallets that the server-signer can sign for + * @type {Array} + * @memberof ServerSigner + */ + 'wallets'?: Array; + /** + * Whether the Server-Signer uses MPC. + * @type {boolean} + * @memberof ServerSigner + */ + 'is_mpc': boolean; +} +/** + * An event that is waiting to be processed by a Server-Signer. + * @export + * @interface ServerSignerEvent + */ +export interface ServerSignerEvent { + /** + * The ID of the server-signer that the event is for + * @type {string} + * @memberof ServerSignerEvent + */ + 'server_signer_id': string; + /** + * + * @type {ServerSignerEventEvent} + * @memberof ServerSignerEvent + */ + 'event': ServerSignerEventEvent; +} +/** + * @type ServerSignerEventEvent + * @export + */ +export type ServerSignerEventEvent = SeedCreationEvent | SignatureCreationEvent; + +/** + * + * @export + * @interface ServerSignerEventList + */ +export interface ServerSignerEventList { + /** + * + * @type {Array} + * @memberof ServerSignerEventList + */ + 'data': Array; + /** + * True if this list has another page of items after this one that can be fetched. + * @type {boolean} + * @memberof ServerSignerEventList + */ + 'has_more': boolean; + /** + * The page token to be used to fetch the next page. + * @type {string} + * @memberof ServerSignerEventList + */ + 'next_page': string; + /** + * The total number of events for the server signer. + * @type {number} + * @memberof ServerSignerEventList + */ + 'total_count': number; +} +/** + * + * @export + * @interface ServerSignerList + */ +export interface ServerSignerList { + /** + * + * @type {Array} + * @memberof ServerSignerList + */ + 'data': Array; + /** + * True if this list has another page of items after this one that can be fetched. + * @type {boolean} + * @memberof ServerSignerList + */ + 'has_more': boolean; + /** + * The page token to be used to fetch the next page. + * @type {string} + * @memberof ServerSignerList + */ + 'next_page': string; + /** + * The total number of server-signers for the project. + * @type {number} + * @memberof ServerSignerList + */ + 'total_count': number; +} +/** + * An event representing a signature creation. + * @export + * @interface SignatureCreationEvent + */ +export interface SignatureCreationEvent { + /** + * The ID of the seed that the server-signer should create the signature for + * @type {string} + * @memberof SignatureCreationEvent + */ + 'seed_id': string; + /** + * The ID of the wallet the signature is for + * @type {string} + * @memberof SignatureCreationEvent + */ + 'wallet_id': string; + /** + * The ID of the user that the wallet belongs to + * @type {string} + * @memberof SignatureCreationEvent + */ + 'wallet_user_id': string; + /** + * The ID of the address the transfer belongs to + * @type {string} + * @memberof SignatureCreationEvent + */ + 'address_id': string; + /** + * The index of the address that the server-signer should sign with + * @type {number} + * @memberof SignatureCreationEvent + */ + 'address_index': number; + /** + * The payload that the server-signer should sign + * @type {string} + * @memberof SignatureCreationEvent + */ + 'signing_payload': string; + /** + * + * @type {TransactionType} + * @memberof SignatureCreationEvent + */ + 'transaction_type': TransactionType; + /** + * The ID of the transaction that the server-signer should sign + * @type {string} + * @memberof SignatureCreationEvent + */ + 'transaction_id': string; +} + + +/** + * The result to a SignatureCreationEvent. + * @export + * @interface SignatureCreationEventResult + */ +export interface SignatureCreationEventResult { + /** + * The ID of the wallet that the event was created for. + * @type {string} + * @memberof SignatureCreationEventResult + */ + 'wallet_id': string; + /** + * The ID of the user that the wallet belongs to + * @type {string} + * @memberof SignatureCreationEventResult + */ + 'wallet_user_id': string; + /** + * The ID of the address the transfer belongs to + * @type {string} + * @memberof SignatureCreationEventResult + */ + 'address_id': string; + /** + * + * @type {TransactionType} + * @memberof SignatureCreationEventResult + */ + 'transaction_type': TransactionType; + /** + * The ID of the transaction that the Server-Signer has signed for + * @type {string} + * @memberof SignatureCreationEventResult + */ + 'transaction_id': string; + /** + * The signature created by the server-signer. + * @type {string} + * @memberof SignatureCreationEventResult + */ + 'signature': string; +} + + +/** + * Signed voluntary exit message metadata to be provided to beacon chain to exit a validator. + * @export + * @interface SignedVoluntaryExitMessageMetadata + */ +export interface SignedVoluntaryExitMessageMetadata { + /** + * The public key of the validator associated with the exit message. + * @type {string} + * @memberof SignedVoluntaryExitMessageMetadata + */ + 'validator_pub_key': string; + /** + * The current fork version of the Ethereum beacon chain. + * @type {string} + * @memberof SignedVoluntaryExitMessageMetadata + */ + 'fork': string; + /** + * A base64 encoded version of a json string representing a voluntary exit message. + * @type {string} + * @memberof SignedVoluntaryExitMessageMetadata + */ + 'signed_voluntary_exit': string; +} +/** + * Represents a smart contract on the blockchain + * @export + * @interface SmartContract + */ +export interface SmartContract { + /** + * The unique identifier of the smart contract. + * @type {string} + * @memberof SmartContract + */ + 'smart_contract_id': string; + /** + * The name of the blockchain network + * @type {string} + * @memberof SmartContract + */ + 'network_id': string; + /** + * The ID of the wallet that deployed the smart contract. If this smart contract was deployed externally, this will be omitted. + * @type {string} + * @memberof SmartContract + */ + 'wallet_id'?: string; + /** + * The EVM address of the smart contract + * @type {string} + * @memberof SmartContract + */ + 'contract_address': string; + /** + * The name of the smart contract + * @type {string} + * @memberof SmartContract + */ + 'contract_name': string; + /** + * The EVM address of the account that deployed the smart contract. If this smart contract was deployed externally, this will be omitted. + * @type {string} + * @memberof SmartContract + */ + 'deployer_address'?: string; + /** + * + * @type {SmartContractType} + * @memberof SmartContract + */ + 'type': SmartContractType; + /** + * + * @type {SmartContractOptions} + * @memberof SmartContract + */ + 'options'?: SmartContractOptions; + /** + * The JSON-encoded ABI of the contract + * @type {string} + * @memberof SmartContract + */ + 'abi': string; + /** + * + * @type {Transaction} + * @memberof SmartContract + */ + 'transaction'?: Transaction; + /** + * Whether the smart contract was deployed externally. If true, the deployer_address and transaction will be omitted. + * @type {boolean} + * @memberof SmartContract + */ + 'is_external': boolean; + /** + * The ID of the compiled smart contract that was used to deploy this contract + * @type {string} + * @memberof SmartContract + */ + 'compiled_smart_contract_id'?: string; +} + + +/** + * Represents an event triggered by a smart contract activity on the blockchain. Contains information about the function, transaction, block, and involved addresses. + * @export + * @interface SmartContractActivityEvent + */ +export interface SmartContractActivityEvent { + /** + * Unique identifier for the webhook that triggered this event. + * @type {string} + * @memberof SmartContractActivityEvent + */ + 'webhookId'?: string; + /** + * Type of event, in this case, an ERC-721 token transfer. + * @type {string} + * @memberof SmartContractActivityEvent + */ + 'eventType'?: string; + /** + * Blockchain network where the event occurred. + * @type {string} + * @memberof SmartContractActivityEvent + */ + 'network'?: string; + /** + * Name of the project this smart contract belongs to. + * @type {string} + * @memberof SmartContractActivityEvent + */ + 'projectName'?: string; + /** + * Name of the contract. + * @type {string} + * @memberof SmartContractActivityEvent + */ + 'contractName'?: string; + /** + * Name of the function. + * @type {string} + * @memberof SmartContractActivityEvent + */ + 'func'?: string; + /** + * Signature of the function. + * @type {string} + * @memberof SmartContractActivityEvent + */ + 'sig'?: string; + /** + * First 4 bytes of the Transaction, a unique ID. + * @type {string} + * @memberof SmartContractActivityEvent + */ + 'fourBytes'?: string; + /** + * Address of the smart contract. + * @type {string} + * @memberof SmartContractActivityEvent + */ + 'contractAddress'?: string; + /** + * Hash of the block containing the transaction. + * @type {string} + * @memberof SmartContractActivityEvent + */ + 'blockHash'?: string; + /** + * Number of the block containing the transaction. + * @type {number} + * @memberof SmartContractActivityEvent + */ + 'blockNumber'?: number; + /** + * Timestamp when the block was mined. + * @type {string} + * @memberof SmartContractActivityEvent + */ + 'blockTime'?: string; + /** + * Hash of the transaction that triggered the event. + * @type {string} + * @memberof SmartContractActivityEvent + */ + 'transactionHash'?: string; + /** + * Position of the transaction within the block. + * @type {number} + * @memberof SmartContractActivityEvent + */ + 'transactionIndex'?: number; + /** + * Position of the event log within the transaction. + * @type {number} + * @memberof SmartContractActivityEvent + */ + 'logIndex'?: number; + /** + * Address of the initiator in the transfer. + * @type {string} + * @memberof SmartContractActivityEvent + */ + 'from'?: string; + /** + * Address of the recipient in the transfer. + * @type {string} + * @memberof SmartContractActivityEvent + */ + 'to'?: string; + /** + * Amount of tokens transferred, typically in the smallest unit (e.g., wei for Ethereum). + * @type {number} + * @memberof SmartContractActivityEvent + */ + 'value'?: number; +} +/** + * + * @export + * @interface SmartContractList + */ +export interface SmartContractList { + /** + * + * @type {Array} + * @memberof SmartContractList + */ + 'data': Array; + /** + * True if this list has another page of items after this one that can be fetched. + * @type {boolean} + * @memberof SmartContractList + */ + 'has_more': boolean; + /** + * The page token to be used to fetch the next page. + * @type {string} + * @memberof SmartContractList + */ + 'next_page': string; +} +/** + * @type SmartContractOptions + * Options for smart contract creation + * @export + */ +export type SmartContractOptions = MultiTokenContractOptions | NFTContractOptions | TokenContractOptions | string; + +/** + * The type of the smart contract. + * @export + * @enum {string} + */ + +export const SmartContractType = { + Erc20: 'erc20', + Erc721: 'erc721', + Erc1155: 'erc1155', + Custom: 'custom' +} as const; + +export type SmartContractType = typeof SmartContractType[keyof typeof SmartContractType]; + + +/** + * + * @export + * @interface SmartWallet + */ +export interface SmartWallet { + /** + * The onchain address of the smart wallet. + * @type {string} + * @memberof SmartWallet + */ + 'address': string; + /** + * The list of owner addresses for the smart wallet. + * @type {Array} + * @memberof SmartWallet + */ + 'owners': Array; +} +/** + * Paginated list of smart wallets + * @export + * @interface SmartWalletList + */ +export interface SmartWalletList { + /** + * + * @type {Array} + * @memberof SmartWalletList + */ + 'data': Array; + /** + * True if this list has another page of items after this one that can be fetched. + * @type {boolean} + * @memberof SmartWalletList + */ + 'has_more': boolean; + /** + * The page token to be used to fetch the next page. + * @type {string} + * @memberof SmartWalletList + */ + 'next_page': string; + /** + * The total number of wallets + * @type {number} + * @memberof SmartWalletList + */ + 'total_count': number; +} +/** + * + * @export + * @interface SolidityValue + */ +export interface SolidityValue { + /** + * + * @type {string} + * @memberof SolidityValue + */ + 'type': SolidityValueTypeEnum; + /** + * The field name for tuple types. Not used for other types. + * @type {string} + * @memberof SolidityValue + */ + 'name'?: string; + /** + * The value as a string for simple types. Not used for complex types (array, tuple). + * @type {string} + * @memberof SolidityValue + */ + 'value'?: string; + /** + * For array and tuple types, the components of the value + * @type {Array} + * @memberof SolidityValue + */ + 'values'?: Array; +} + +export const SolidityValueTypeEnum = { + Uint8: 'uint8', + Uint16: 'uint16', + Uint32: 'uint32', + Uint64: 'uint64', + Uint128: 'uint128', + Uint160: 'uint160', + Uint256: 'uint256', + Int8: 'int8', + Int16: 'int16', + Int24: 'int24', + Int32: 'int32', + Int56: 'int56', + Int64: 'int64', + Int128: 'int128', + Int256: 'int256', + Address: 'address', + Bool: 'bool', + String: 'string', + Bytes: 'bytes', + Bytes1: 'bytes1', + Bytes2: 'bytes2', + Bytes3: 'bytes3', + Bytes4: 'bytes4', + Bytes5: 'bytes5', + Bytes6: 'bytes6', + Bytes7: 'bytes7', + Bytes8: 'bytes8', + Bytes9: 'bytes9', + Bytes10: 'bytes10', + Bytes11: 'bytes11', + Bytes12: 'bytes12', + Bytes13: 'bytes13', + Bytes14: 'bytes14', + Bytes15: 'bytes15', + Bytes16: 'bytes16', + Bytes17: 'bytes17', + Bytes18: 'bytes18', + Bytes19: 'bytes19', + Bytes20: 'bytes20', + Bytes21: 'bytes21', + Bytes22: 'bytes22', + Bytes23: 'bytes23', + Bytes24: 'bytes24', + Bytes25: 'bytes25', + Bytes26: 'bytes26', + Bytes27: 'bytes27', + Bytes28: 'bytes28', + Bytes29: 'bytes29', + Bytes30: 'bytes30', + Bytes31: 'bytes31', + Bytes32: 'bytes32', + Array: 'array', + Tuple: 'tuple' +} as const; + +export type SolidityValueTypeEnum = typeof SolidityValueTypeEnum[keyof typeof SolidityValueTypeEnum]; + +/** + * An onchain sponsored gasless send. + * @export + * @interface SponsoredSend + */ +export interface SponsoredSend { + /** + * The onchain address of the recipient + * @type {string} + * @memberof SponsoredSend + */ + 'to_address_id': string; + /** + * The raw typed data for the sponsored send + * @type {string} + * @memberof SponsoredSend + */ + 'raw_typed_data': string; + /** + * The typed data hash for the sponsored send. This is the typed data hash that needs to be signed by the sender. + * @type {string} + * @memberof SponsoredSend + */ + 'typed_data_hash': string; + /** + * The signed hash of the sponsored send typed data. + * @type {string} + * @memberof SponsoredSend + */ + 'signature'?: string; + /** + * The hash of the onchain sponsored send transaction + * @type {string} + * @memberof SponsoredSend + */ + 'transaction_hash'?: string; + /** + * The link to view the transaction on a block explorer. This is optional and may not be present for all transactions. + * @type {string} + * @memberof SponsoredSend + */ + 'transaction_link'?: string; + /** + * The status of the sponsored send + * @type {string} + * @memberof SponsoredSend + */ + 'status': SponsoredSendStatusEnum; +} + +export const SponsoredSendStatusEnum = { + Pending: 'pending', + Signed: 'signed', + Submitted: 'submitted', + Complete: 'complete', + Failed: 'failed' +} as const; + +export type SponsoredSendStatusEnum = typeof SponsoredSendStatusEnum[keyof typeof SponsoredSendStatusEnum]; + +/** + * The staking balances for an address. + * @export + * @interface StakingBalance + */ +export interface StakingBalance { + /** + * The onchain address for which the staking balances are being fetched. + * @type {string} + * @memberof StakingBalance + */ + 'address': string; + /** + * The timestamp of the staking balance in UTC. + * @type {string} + * @memberof StakingBalance + */ + 'date': string; + /** + * + * @type {Balance} + * @memberof StakingBalance + */ + 'bonded_stake': Balance; + /** + * + * @type {Balance} + * @memberof StakingBalance + */ + 'unbonded_balance': Balance; + /** + * The type of staking participation. + * @type {string} + * @memberof StakingBalance + */ + 'participant_type': string; +} +/** + * Context needed to perform a staking operation + * @export + * @interface StakingContext + */ +export interface StakingContext { + /** + * + * @type {StakingContextContext} + * @memberof StakingContext + */ + 'context': StakingContextContext; +} +/** + * + * @export + * @interface StakingContextContext + */ +export interface StakingContextContext { + /** + * + * @type {Balance} + * @memberof StakingContextContext + */ + 'stakeable_balance': Balance; + /** + * + * @type {Balance} + * @memberof StakingContextContext + */ + 'unstakeable_balance': Balance; + /** + * + * @type {Balance} + * @memberof StakingContextContext + */ + 'pending_claimable_balance': Balance; + /** + * + * @type {Balance} + * @memberof StakingContextContext + */ + 'claimable_balance': Balance; +} +/** + * A list of onchain transactions to help realize a staking action. + * @export + * @interface StakingOperation + */ +export interface StakingOperation { + /** + * The unique ID of the staking operation. + * @type {string} + * @memberof StakingOperation + */ + 'id': string; + /** + * The ID of the wallet that owns the address. + * @type {string} + * @memberof StakingOperation + */ + 'wallet_id'?: string; + /** + * The ID of the blockchain network. + * @type {string} + * @memberof StakingOperation + */ + 'network_id': string; + /** + * The onchain address orchestrating the staking operation. + * @type {string} + * @memberof StakingOperation + */ + 'address_id': string; + /** + * The status of the staking operation. + * @type {string} + * @memberof StakingOperation + */ + 'status': StakingOperationStatusEnum; + /** + * The transaction(s) that will execute the staking operation onchain. + * @type {Array} + * @memberof StakingOperation + */ + 'transactions': Array; + /** + * + * @type {StakingOperationMetadata} + * @memberof StakingOperation + */ + 'metadata'?: StakingOperationMetadata; +} + +export const StakingOperationStatusEnum = { + Initialized: 'initialized', + Complete: 'complete', + Failed: 'failed', + Unspecified: 'unspecified' +} as const; + +export type StakingOperationStatusEnum = typeof StakingOperationStatusEnum[keyof typeof StakingOperationStatusEnum]; + +/** + * @type StakingOperationMetadata + * @export + */ +export type StakingOperationMetadata = Array; + +/** + * The staking rewards for an address. + * @export + * @interface StakingReward + */ +export interface StakingReward { + /** + * The onchain address for which the staking rewards are being fetched. + * @type {string} + * @memberof StakingReward + */ + 'address_id': string; + /** + * The timestamp of the reward in UTC. + * @type {string} + * @memberof StakingReward + */ + 'date': string; + /** + * The reward amount in requested \"format\". Default is USD. + * @type {string} + * @memberof StakingReward + */ + 'amount': string; + /** + * The state of the reward. + * @type {string} + * @memberof StakingReward + */ + 'state': StakingRewardStateEnum; + /** + * + * @type {StakingRewardFormat} + * @memberof StakingReward + */ + 'format': StakingRewardFormat; + /** + * + * @type {StakingRewardUSDValue} + * @memberof StakingReward + */ + 'usd_value': StakingRewardUSDValue; +} + +export const StakingRewardStateEnum = { + Pending: 'pending', + Distributed: 'distributed' +} as const; + +export type StakingRewardStateEnum = typeof StakingRewardStateEnum[keyof typeof StakingRewardStateEnum]; + +/** + * The format in which the rewards are to be fetched i.e native or in equivalent USD + * @export + * @enum {string} + */ + +export const StakingRewardFormat = { + Usd: 'usd', + Native: 'native' +} as const; + +export type StakingRewardFormat = typeof StakingRewardFormat[keyof typeof StakingRewardFormat]; + + +/** + * The USD value of the reward + * @export + * @interface StakingRewardUSDValue + */ +export interface StakingRewardUSDValue { + /** + * The value of the reward in USD + * @type {string} + * @memberof StakingRewardUSDValue + */ + 'amount': string; + /** + * The conversion price from native currency to USD + * @type {string} + * @memberof StakingRewardUSDValue + */ + 'conversion_price': string; + /** + * The time of the conversion in UTC. + * @type {string} + * @memberof StakingRewardUSDValue + */ + 'conversion_time': string; +} +/** + * Options for token contract creation + * @export + * @interface TokenContractOptions + */ +export interface TokenContractOptions { + /** + * The name of the token + * @type {string} + * @memberof TokenContractOptions + */ + 'name': string; + /** + * The symbol of the token + * @type {string} + * @memberof TokenContractOptions + */ + 'symbol': string; + /** + * The total supply of the token denominated in the whole amount of the token. + * @type {string} + * @memberof TokenContractOptions + */ + 'total_supply': string; +} +/** + * The type of the token transfer. + * @export + * @enum {string} + */ + +export const TokenTransferType = { + Erc20: 'erc20', + Erc721: 'erc721', + Erc1155: 'erc1155', + Unknown: 'unknown' +} as const; + +export type TokenTransferType = typeof TokenTransferType[keyof typeof TokenTransferType]; + + +/** + * A trade of an asset to another asset + * @export + * @interface Trade + */ +export interface Trade { + /** + * The ID of the blockchain network + * @type {string} + * @memberof Trade + */ + 'network_id': string; + /** + * The ID of the wallet that owns the from address + * @type {string} + * @memberof Trade + */ + 'wallet_id': string; + /** + * The onchain address of the sender + * @type {string} + * @memberof Trade + */ + 'address_id': string; + /** + * The ID of the trade + * @type {string} + * @memberof Trade + */ + 'trade_id': string; + /** + * The amount of the from asset to be traded (in atomic units of the from asset) + * @type {string} + * @memberof Trade + */ + 'from_amount': string; + /** + * + * @type {Asset} + * @memberof Trade + */ + 'from_asset': Asset; + /** + * The amount of the to asset that will be received (in atomic units of the to asset) + * @type {string} + * @memberof Trade + */ + 'to_amount': string; + /** + * + * @type {Asset} + * @memberof Trade + */ + 'to_asset': Asset; + /** + * + * @type {Transaction} + * @memberof Trade + */ + 'transaction': Transaction; + /** + * + * @type {Transaction} + * @memberof Trade + */ + 'approve_transaction'?: Transaction; +} +/** + * + * @export + * @interface TradeList + */ +export interface TradeList { + /** + * + * @type {Array} + * @memberof TradeList + */ + 'data': Array; + /** + * True if this list has another page of items after this one that can be fetched. + * @type {boolean} + * @memberof TradeList + */ + 'has_more': boolean; + /** + * The page token to be used to fetch the next page. + * @type {string} + * @memberof TradeList + */ + 'next_page': string; + /** + * The total number of trades for the address in the wallet. + * @type {number} + * @memberof TradeList + */ + 'total_count': number; +} +/** + * An onchain transaction. + * @export + * @interface Transaction + */ +export interface Transaction { + /** + * The ID of the blockchain network. + * @type {string} + * @memberof Transaction + */ + 'network_id': string; + /** + * The hash of the block at which the transaction was recorded. + * @type {string} + * @memberof Transaction + */ + 'block_hash'?: string; + /** + * The block height at which the transaction was recorded. + * @type {string} + * @memberof Transaction + */ + 'block_height'?: string; + /** + * The onchain address of the sender. + * @type {string} + * @memberof Transaction + */ + 'from_address_id': string; + /** + * The onchain address of the recipient. + * @type {string} + * @memberof Transaction + */ + 'to_address_id'?: string; + /** + * The unsigned payload of the transaction. This is the payload that needs to be signed by the sender. + * @type {string} + * @memberof Transaction + */ + 'unsigned_payload': string; + /** + * The signed payload of the transaction. This is the payload that has been signed by the sender. + * @type {string} + * @memberof Transaction + */ + 'signed_payload'?: string; + /** + * The hash of the transaction. + * @type {string} + * @memberof Transaction + */ + 'transaction_hash'?: string; + /** + * The link to view the transaction on a block explorer. This is optional and may not be present for all transactions. + * @type {string} + * @memberof Transaction + */ + 'transaction_link'?: string; + /** + * The status of the transaction. + * @type {string} + * @memberof Transaction + */ + 'status': TransactionStatusEnum; + /** + * + * @type {TransactionContent} + * @memberof Transaction + */ + 'content'?: TransactionContent; +} + +export const TransactionStatusEnum = { + Pending: 'pending', + Signed: 'signed', + Broadcast: 'broadcast', + Complete: 'complete', + Failed: 'failed', + Unspecified: 'unspecified' +} as const; + +export type TransactionStatusEnum = typeof TransactionStatusEnum[keyof typeof TransactionStatusEnum]; + +/** + * @type TransactionContent + * @export + */ +export type TransactionContent = EthereumTransaction; + +/** + * A log emitted from an onchain transaction. + * @export + * @interface TransactionLog + */ +export interface TransactionLog { + /** + * An onchain address of a contract. + * @type {string} + * @memberof TransactionLog + */ + 'address': string; + /** + * + * @type {Array} + * @memberof TransactionLog + */ + 'topics': Array; + /** + * The data included in this log. + * @type {string} + * @memberof TransactionLog + */ + 'data': string; +} +/** + * The receipt of an onchain transaction\'s execution. + * @export + * @interface TransactionReceipt + */ +export interface TransactionReceipt { + /** + * The status of a transaction is 1 if successful or 0 if it was reverted. + * @type {number} + * @memberof TransactionReceipt + */ + 'status': number; + /** + * + * @type {Array} + * @memberof TransactionReceipt + */ + 'logs': Array; + /** + * The amount of gas actually used by this transaction. + * @type {string} + * @memberof TransactionReceipt + */ + 'gas_used': string; + /** + * The effective gas price the transaction was charged at. + * @type {string} + * @memberof TransactionReceipt + */ + 'effective_gas_price': string; +} +/** + * + * @export + * @enum {string} + */ + +export const TransactionType = { + Transfer: 'transfer' +} as const; + +export type TransactionType = typeof TransactionType[keyof typeof TransactionType]; + + +/** + * A transfer of an asset from one address to another + * @export + * @interface Transfer + */ +export interface Transfer { + /** + * The ID of the blockchain network + * @type {string} + * @memberof Transfer + */ + 'network_id': string; + /** + * The ID of the wallet that owns the from address + * @type {string} + * @memberof Transfer + */ + 'wallet_id': string; + /** + * The onchain address of the sender + * @type {string} + * @memberof Transfer + */ + 'address_id': string; + /** + * The onchain address of the recipient + * @type {string} + * @memberof Transfer + */ + 'destination': string; + /** + * The amount in the atomic units of the asset + * @type {string} + * @memberof Transfer + */ + 'amount': string; + /** + * The ID of the asset being transferred. Use `asset.asset_id` instead. + * @type {string} + * @memberof Transfer + * @deprecated + */ + 'asset_id': string; + /** + * + * @type {Asset} + * @memberof Transfer + */ + 'asset': Asset; + /** + * The ID of the transfer + * @type {string} + * @memberof Transfer + */ + 'transfer_id': string; + /** + * + * @type {Transaction} + * @memberof Transfer + */ + 'transaction'?: Transaction; + /** + * + * @type {SponsoredSend} + * @memberof Transfer + */ + 'sponsored_send'?: SponsoredSend; + /** + * The unsigned payload of the transfer. This is the payload that needs to be signed by the sender. + * @type {string} + * @memberof Transfer + * @deprecated + */ + 'unsigned_payload'?: string; + /** + * The signed payload of the transfer. This is the payload that has been signed by the sender. + * @type {string} + * @memberof Transfer + * @deprecated + */ + 'signed_payload'?: string; + /** + * The hash of the transfer transaction + * @type {string} + * @memberof Transfer + * @deprecated + */ + 'transaction_hash'?: string; + /** + * + * @type {string} + * @memberof Transfer + * @deprecated + */ + 'status'?: string; + /** + * Whether the transfer uses sponsored gas + * @type {boolean} + * @memberof Transfer + */ + 'gasless': boolean; +} +/** + * + * @export + * @interface TransferList + */ +export interface TransferList { + /** + * + * @type {Array} + * @memberof TransferList + */ + 'data': Array; + /** + * True if this list has another page of items after this one that can be fetched. + * @type {boolean} + * @memberof TransferList + */ + 'has_more': boolean; + /** + * The page token to be used to fetch the next page. + * @type {string} + * @memberof TransferList + */ + 'next_page': string; + /** + * The total number of transfers for the address in the wallet. + * @type {number} + * @memberof TransferList + */ + 'total_count': number; +} +/** + * Smart Contract data to be updated + * @export + * @interface UpdateSmartContractRequest + */ +export interface UpdateSmartContractRequest { + /** + * ABI of the smart contract + * @type {string} + * @memberof UpdateSmartContractRequest + */ + 'abi'?: string; + /** + * Name of the smart contract + * @type {string} + * @memberof UpdateSmartContractRequest + */ + 'contract_name'?: string; +} +/** + * + * @export + * @interface UpdateWebhookRequest + */ +export interface UpdateWebhookRequest { + /** + * + * @type {WebhookEventTypeFilter} + * @memberof UpdateWebhookRequest + */ + 'event_type_filter'?: WebhookEventTypeFilter; + /** + * Webhook will monitor all events that matches any one of the event filters. + * @type {Array} + * @memberof UpdateWebhookRequest + */ + 'event_filters'?: Array; + /** + * The Webhook uri that updates to + * @type {string} + * @memberof UpdateWebhookRequest + */ + 'notification_uri'?: string; + /** + * + * @type {WebhookStatus} + * @memberof UpdateWebhookRequest + */ + 'status'?: WebhookStatus; +} + + +/** + * + * @export + * @interface User + */ +export interface User { + /** + * The ID of the user + * @type {string} + * @memberof User + */ + 'id': string; + /** + * + * @type {string} + * @memberof User + */ + 'display_name'?: string; +} +/** + * + * @export + * @interface UserOperation + */ +export interface UserOperation { + /** + * The ID of the user operation. + * @type {string} + * @memberof UserOperation + */ + 'id': string; + /** + * The ID of the network the user operation is being created on. + * @type {string} + * @memberof UserOperation + */ + 'network_id': string; + /** + * The list of calls to make from the smart wallet. + * @type {Array} + * @memberof UserOperation + */ + 'calls': Array; + /** + * The unique identifier for the user operation onchain. This is the payload that must be signed by one of the owners of the smart wallet to send the user operation. + * @type {string} + * @memberof UserOperation + */ + 'user_op_hash': string; + /** + * The hex-encoded hash that must be signed by the user. + * @type {string} + * @memberof UserOperation + * @deprecated + */ + 'unsigned_payload': string; + /** + * The hex-encoded signature of the user operation. + * @type {string} + * @memberof UserOperation + */ + 'signature'?: string; + /** + * The hash of the transaction that was broadcast. + * @type {string} + * @memberof UserOperation + */ + 'transaction_hash'?: string; + /** + * The status of the user operation. + * @type {string} + * @memberof UserOperation + */ + 'status': UserOperationStatusEnum; +} + +export const UserOperationStatusEnum = { + Pending: 'pending', + Signed: 'signed', + Broadcast: 'broadcast', + Complete: 'complete', + Failed: 'failed' +} as const; + +export type UserOperationStatusEnum = typeof UserOperationStatusEnum[keyof typeof UserOperationStatusEnum]; + +/** + * A validator onchain. + * @export + * @interface Validator + */ +export interface Validator { + /** + * The publicly identifiable unique id of the validator. This can be the public key for Ethereum validators and maybe an address for some other network. + * @type {string} + * @memberof Validator + */ + 'validator_id': string; + /** + * The ID of the blockchain network to which the Validator belongs. + * @type {string} + * @memberof Validator + */ + 'network_id': string; + /** + * The ID of the asset that the validator helps stake. + * @type {string} + * @memberof Validator + */ + 'asset_id': string; + /** + * + * @type {ValidatorStatus} + * @memberof Validator + */ + 'status': ValidatorStatus; + /** + * + * @type {ValidatorDetails} + * @memberof Validator + */ + 'details'?: ValidatorDetails; +} + + +/** + * @type ValidatorDetails + * @export + */ +export type ValidatorDetails = EthereumValidatorMetadata; + +/** + * + * @export + * @interface ValidatorList + */ +export interface ValidatorList { + /** + * + * @type {Array} + * @memberof ValidatorList + */ + 'data': Array; + /** + * True if this list has another page of items after this one that can be fetched. + * @type {boolean} + * @memberof ValidatorList + */ + 'has_more': boolean; + /** + * The page token to be used to fetch the next page. + * @type {string} + * @memberof ValidatorList + */ + 'next_page': string; +} +/** + * The status of the validator. + * @export + * @enum {string} + */ + +export const ValidatorStatus = { + Unknown: 'unknown', + Provisioning: 'provisioning', + Provisioned: 'provisioned', + Deposited: 'deposited', + PendingActivation: 'pending_activation', + Active: 'active', + Exiting: 'exiting', + Exited: 'exited', + WithdrawalAvailable: 'withdrawal_available', + WithdrawalComplete: 'withdrawal_complete', + ActiveSlashed: 'active_slashed', + ExitedSlashed: 'exited_slashed', + Reaped: 'reaped' +} as const; + +export type ValidatorStatus = typeof ValidatorStatus[keyof typeof ValidatorStatus]; + + +/** + * + * @export + * @interface Wallet + */ +export interface Wallet { + /** + * The server-assigned ID for the wallet. + * @type {string} + * @memberof Wallet + */ + 'id': string; + /** + * The ID of the blockchain network + * @type {string} + * @memberof Wallet + */ + 'network_id': string; + /** + * + * @type {Address} + * @memberof Wallet + */ + 'default_address'?: Address; + /** + * + * @type {FeatureSet} + * @memberof Wallet + */ + 'feature_set': FeatureSet; + /** + * The status of the Server-Signer for the wallet if present. + * @type {string} + * @memberof Wallet + */ + 'server_signer_status'?: WalletServerSignerStatusEnum; +} + +export const WalletServerSignerStatusEnum = { + PendingSeedCreation: 'pending_seed_creation', + ActiveSeed: 'active_seed' +} as const; + +export type WalletServerSignerStatusEnum = typeof WalletServerSignerStatusEnum[keyof typeof WalletServerSignerStatusEnum]; + +/** + * Paginated list of wallets + * @export + * @interface WalletList + */ +export interface WalletList { + /** + * + * @type {Array} + * @memberof WalletList + */ + 'data': Array; + /** + * True if this list has another page of items after this one that can be fetched. + * @type {boolean} + * @memberof WalletList + */ + 'has_more': boolean; + /** + * The page token to be used to fetch the next page. + * @type {string} + * @memberof WalletList + */ + 'next_page': string; + /** + * The total number of wallets + * @type {number} + * @memberof WalletList + */ + 'total_count': number; +} +/** + * Webhook that is used for getting notifications when monitored events occur. + * @export + * @interface Webhook + */ +export interface Webhook { + /** + * Identifier of the webhook. + * @type {string} + * @memberof Webhook + */ + 'id'?: string; + /** + * The ID of the blockchain network + * @type {string} + * @memberof Webhook + */ + 'network_id'?: string; + /** + * + * @type {WebhookEventType} + * @memberof Webhook + */ + 'event_type'?: WebhookEventType; + /** + * + * @type {WebhookEventTypeFilter} + * @memberof Webhook + */ + 'event_type_filter'?: WebhookEventTypeFilter; + /** + * Webhook will monitor all events that matches any one of the event filters. + * @type {Array} + * @memberof Webhook + */ + 'event_filters'?: Array; + /** + * The URL to which the notifications will be sent. + * @type {string} + * @memberof Webhook + */ + 'notification_uri'?: string; + /** + * The date and time the webhook was created. + * @type {string} + * @memberof Webhook + */ + 'created_at'?: string; + /** + * The date and time the webhook was last updated. + * @type {string} + * @memberof Webhook + */ + 'updated_at'?: string; + /** + * The header that will contain the signature of the webhook payload. + * @type {string} + * @memberof Webhook + */ + 'signature_header'?: string; + /** + * + * @type {WebhookStatus} + * @memberof Webhook + */ + 'status': WebhookStatus; +} + + +/** + * The event_filter parameter specifies the criteria to filter events from the blockchain. It allows filtering events by contract address, sender address and receiver address. For a single event filter, not all of the properties need to be presented. + * @export + * @interface WebhookEventFilter + */ +export interface WebhookEventFilter { + /** + * The onchain contract address of the token for which the events should be tracked. + * @type {string} + * @memberof WebhookEventFilter + */ + 'contract_address'?: string; + /** + * The onchain address of the sender. Set this filter to track all transfer events originating from your address. + * @type {string} + * @memberof WebhookEventFilter + */ + 'from_address'?: string; + /** + * The onchain address of the receiver. Set this filter to track all transfer events sent to your address. + * @type {string} + * @memberof WebhookEventFilter + */ + 'to_address'?: string; +} +/** + * + * @export + * @enum {string} + */ + +export const WebhookEventType = { + Unspecified: 'unspecified', + Erc20Transfer: 'erc20_transfer', + Erc721Transfer: 'erc721_transfer', + WalletActivity: 'wallet_activity', + SmartContractEventActivity: 'smart_contract_event_activity' +} as const; + +export type WebhookEventType = typeof WebhookEventType[keyof typeof WebhookEventType]; + + +/** + * @type WebhookEventTypeFilter + * The event_type_filter parameter specifies the criteria to filter events based on event type. + * @export + */ +export type WebhookEventTypeFilter = WebhookSmartContractEventFilter | WebhookWalletActivityFilter; + +/** + * + * @export + * @interface WebhookList + */ +export interface WebhookList { + /** + * + * @type {Array} + * @memberof WebhookList + */ + 'data': Array; + /** + * True if this list has another page of items after this one that can be fetched. + * @type {boolean} + * @memberof WebhookList + */ + 'has_more'?: boolean; + /** + * The page token to be used to fetch the next page. + * @type {string} + * @memberof WebhookList + */ + 'next_page'?: string; +} +/** + * Filter for smart contract events. This filter allows the client to specify smart contract addresses to monitor for activities such as contract function calls. + * @export + * @interface WebhookSmartContractEventFilter + */ +export interface WebhookSmartContractEventFilter { + /** + * A list of smart contract addresses to filter on. + * @type {Array} + * @memberof WebhookSmartContractEventFilter + */ + 'contract_addresses': Array; +} +/** + * The status of the webhook. + * @export + * @enum {string} + */ + +export const WebhookStatus = { + Active: 'active', + Inactive: 'inactive' +} as const; + +export type WebhookStatus = typeof WebhookStatus[keyof typeof WebhookStatus]; + + +/** + * Filter for wallet activity events. This filter allows the client to specify one or more wallet addresses to monitor for activities such as transactions, transfers, or other types of events that are associated with the specified addresses. + * @export + * @interface WebhookWalletActivityFilter + */ +export interface WebhookWalletActivityFilter { + /** + * A list of wallet addresses to filter on. + * @type {Array} + * @memberof WebhookWalletActivityFilter + */ + 'addresses'?: Array; + /** + * The ID of the wallet that owns the webhook. + * @type {string} + * @memberof WebhookWalletActivityFilter + */ + 'wallet_id': string; +} + +/** + * AddressesApi - axios parameter creator + * @export + */ +export const AddressesApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create a new address scoped to the wallet. + * @summary Create a new address + * @param {string} walletId The ID of the wallet to create the address in. + * @param {CreateAddressRequest} [createAddressRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createAddress: async (walletId: string, createAddressRequest?: CreateAddressRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'walletId' is not null or undefined + assertParamExists('createAddress', 'walletId', walletId) + const localVarPath = `/v1/wallets/{wallet_id}/addresses` + .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createAddressRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Create a new payload signature with an address. + * @summary Create a new payload signature. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address to sign the payload with. + * @param {CreatePayloadSignatureRequest} [createPayloadSignatureRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createPayloadSignature: async (walletId: string, addressId: string, createPayloadSignatureRequest?: CreatePayloadSignatureRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'walletId' is not null or undefined + assertParamExists('createPayloadSignature', 'walletId', walletId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('createPayloadSignature', 'addressId', addressId) + const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/payload_signatures` + .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createPayloadSignatureRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get address + * @summary Get address by onchain address + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address that is being fetched. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAddress: async (walletId: string, addressId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'walletId' is not null or undefined + assertParamExists('getAddress', 'walletId', walletId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('getAddress', 'addressId', addressId) + const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}` + .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get address balance + * @summary Get address balance for asset + * @param {string} walletId The ID of the wallet to fetch the balance for + * @param {string} addressId The onchain address of the address that is being fetched. + * @param {string} assetId The symbol of the asset to fetch the balance for + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAddressBalance: async (walletId: string, addressId: string, assetId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'walletId' is not null or undefined + assertParamExists('getAddressBalance', 'walletId', walletId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('getAddressBalance', 'addressId', addressId) + // verify required parameter 'assetId' is not null or undefined + assertParamExists('getAddressBalance', 'assetId', assetId) + const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/balances/{asset_id}` + .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))) + .replace(`{${"asset_id"}}`, encodeURIComponent(String(assetId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get payload signature. + * @summary Get payload signature. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address that signed the payload. + * @param {string} payloadSignatureId The ID of the payload signature to fetch. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getPayloadSignature: async (walletId: string, addressId: string, payloadSignatureId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'walletId' is not null or undefined + assertParamExists('getPayloadSignature', 'walletId', walletId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('getPayloadSignature', 'addressId', addressId) + // verify required parameter 'payloadSignatureId' is not null or undefined + assertParamExists('getPayloadSignature', 'payloadSignatureId', payloadSignatureId) + const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/payload_signatures/{payload_signature_id}` + .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))) + .replace(`{${"payload_signature_id"}}`, encodeURIComponent(String(payloadSignatureId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get address balances + * @summary Get all balances for address + * @param {string} walletId The ID of the wallet to fetch the balances for + * @param {string} addressId The onchain address of the address that is being fetched. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listAddressBalances: async (walletId: string, addressId: string, page?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'walletId' is not null or undefined + assertParamExists('listAddressBalances', 'walletId', walletId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('listAddressBalances', 'addressId', addressId) + const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/balances` + .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * List addresses in the wallet. + * @summary List addresses in a wallet. + * @param {string} walletId The ID of the wallet whose addresses to fetch + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listAddresses: async (walletId: string, limit?: number, page?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'walletId' is not null or undefined + assertParamExists('listAddresses', 'walletId', walletId) + const localVarPath = `/v1/wallets/{wallet_id}/addresses` + .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * List payload signatures for an address. + * @summary List payload signatures for an address. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address whose payload signatures to fetch. + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listPayloadSignatures: async (walletId: string, addressId: string, limit?: number, page?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'walletId' is not null or undefined + assertParamExists('listPayloadSignatures', 'walletId', walletId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('listPayloadSignatures', 'addressId', addressId) + const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/payload_signatures` + .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Request faucet funds to be sent to onchain address. + * @summary Request faucet funds for onchain address. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address that is being fetched. + * @param {string} [assetId] The ID of the asset to transfer from the faucet. + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + requestFaucetFunds: async (walletId: string, addressId: string, assetId?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'walletId' is not null or undefined + assertParamExists('requestFaucetFunds', 'walletId', walletId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('requestFaucetFunds', 'addressId', addressId) + const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/faucet` + .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + if (assetId !== undefined) { + localVarQueryParameter['asset_id'] = assetId; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * AddressesApi - functional programming interface + * @export + */ +export const AddressesApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AddressesApiAxiosParamCreator(configuration) + return { + /** + * Create a new address scoped to the wallet. + * @summary Create a new address + * @param {string} walletId The ID of the wallet to create the address in. + * @param {CreateAddressRequest} [createAddressRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createAddress(walletId: string, createAddressRequest?: CreateAddressRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise
        > { + const localVarAxiosArgs = await localVarAxiosParamCreator.createAddress(walletId, createAddressRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AddressesApi.createAddress']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Create a new payload signature with an address. + * @summary Create a new payload signature. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address to sign the payload with. + * @param {CreatePayloadSignatureRequest} [createPayloadSignatureRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createPayloadSignature(walletId: string, addressId: string, createPayloadSignatureRequest?: CreatePayloadSignatureRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createPayloadSignature(walletId, addressId, createPayloadSignatureRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AddressesApi.createPayloadSignature']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Get address + * @summary Get address by onchain address + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address that is being fetched. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getAddress(walletId: string, addressId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise
        > { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAddress(walletId, addressId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AddressesApi.getAddress']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Get address balance + * @summary Get address balance for asset + * @param {string} walletId The ID of the wallet to fetch the balance for + * @param {string} addressId The onchain address of the address that is being fetched. + * @param {string} assetId The symbol of the asset to fetch the balance for + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getAddressBalance(walletId: string, addressId: string, assetId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAddressBalance(walletId, addressId, assetId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AddressesApi.getAddressBalance']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Get payload signature. + * @summary Get payload signature. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address that signed the payload. + * @param {string} payloadSignatureId The ID of the payload signature to fetch. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getPayloadSignature(walletId: string, addressId: string, payloadSignatureId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPayloadSignature(walletId, addressId, payloadSignatureId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AddressesApi.getPayloadSignature']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Get address balances + * @summary Get all balances for address + * @param {string} walletId The ID of the wallet to fetch the balances for + * @param {string} addressId The onchain address of the address that is being fetched. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listAddressBalances(walletId: string, addressId: string, page?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listAddressBalances(walletId, addressId, page, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AddressesApi.listAddressBalances']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * List addresses in the wallet. + * @summary List addresses in a wallet. + * @param {string} walletId The ID of the wallet whose addresses to fetch + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listAddresses(walletId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listAddresses(walletId, limit, page, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AddressesApi.listAddresses']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * List payload signatures for an address. + * @summary List payload signatures for an address. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address whose payload signatures to fetch. + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listPayloadSignatures(walletId: string, addressId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listPayloadSignatures(walletId, addressId, limit, page, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AddressesApi.listPayloadSignatures']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Request faucet funds to be sent to onchain address. + * @summary Request faucet funds for onchain address. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address that is being fetched. + * @param {string} [assetId] The ID of the asset to transfer from the faucet. + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + async requestFaucetFunds(walletId: string, addressId: string, assetId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.requestFaucetFunds(walletId, addressId, assetId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AddressesApi.requestFaucetFunds']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * AddressesApi - factory interface + * @export + */ +export const AddressesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AddressesApiFp(configuration) + return { + /** + * Create a new address scoped to the wallet. + * @summary Create a new address + * @param {string} walletId The ID of the wallet to create the address in. + * @param {CreateAddressRequest} [createAddressRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createAddress(walletId: string, createAddressRequest?: CreateAddressRequest, options?: RawAxiosRequestConfig): AxiosPromise
        { + return localVarFp.createAddress(walletId, createAddressRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Create a new payload signature with an address. + * @summary Create a new payload signature. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address to sign the payload with. + * @param {CreatePayloadSignatureRequest} [createPayloadSignatureRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createPayloadSignature(walletId: string, addressId: string, createPayloadSignatureRequest?: CreatePayloadSignatureRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.createPayloadSignature(walletId, addressId, createPayloadSignatureRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Get address + * @summary Get address by onchain address + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address that is being fetched. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAddress(walletId: string, addressId: string, options?: RawAxiosRequestConfig): AxiosPromise
        { + return localVarFp.getAddress(walletId, addressId, options).then((request) => request(axios, basePath)); + }, + /** + * Get address balance + * @summary Get address balance for asset + * @param {string} walletId The ID of the wallet to fetch the balance for + * @param {string} addressId The onchain address of the address that is being fetched. + * @param {string} assetId The symbol of the asset to fetch the balance for + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAddressBalance(walletId: string, addressId: string, assetId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getAddressBalance(walletId, addressId, assetId, options).then((request) => request(axios, basePath)); + }, + /** + * Get payload signature. + * @summary Get payload signature. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address that signed the payload. + * @param {string} payloadSignatureId The ID of the payload signature to fetch. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getPayloadSignature(walletId: string, addressId: string, payloadSignatureId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getPayloadSignature(walletId, addressId, payloadSignatureId, options).then((request) => request(axios, basePath)); + }, + /** + * Get address balances + * @summary Get all balances for address + * @param {string} walletId The ID of the wallet to fetch the balances for + * @param {string} addressId The onchain address of the address that is being fetched. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listAddressBalances(walletId: string, addressId: string, page?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listAddressBalances(walletId, addressId, page, options).then((request) => request(axios, basePath)); + }, + /** + * List addresses in the wallet. + * @summary List addresses in a wallet. + * @param {string} walletId The ID of the wallet whose addresses to fetch + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listAddresses(walletId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listAddresses(walletId, limit, page, options).then((request) => request(axios, basePath)); + }, + /** + * List payload signatures for an address. + * @summary List payload signatures for an address. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address whose payload signatures to fetch. + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listPayloadSignatures(walletId: string, addressId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listPayloadSignatures(walletId, addressId, limit, page, options).then((request) => request(axios, basePath)); + }, + /** + * Request faucet funds to be sent to onchain address. + * @summary Request faucet funds for onchain address. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address that is being fetched. + * @param {string} [assetId] The ID of the asset to transfer from the faucet. + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + requestFaucetFunds(walletId: string, addressId: string, assetId?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.requestFaucetFunds(walletId, addressId, assetId, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * AddressesApi - interface + * @export + * @interface AddressesApi + */ +export interface AddressesApiInterface { + /** + * Create a new address scoped to the wallet. + * @summary Create a new address + * @param {string} walletId The ID of the wallet to create the address in. + * @param {CreateAddressRequest} [createAddressRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AddressesApiInterface + */ + createAddress(walletId: string, createAddressRequest?: CreateAddressRequest, options?: RawAxiosRequestConfig): AxiosPromise
        ; + + /** + * Create a new payload signature with an address. + * @summary Create a new payload signature. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address to sign the payload with. + * @param {CreatePayloadSignatureRequest} [createPayloadSignatureRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AddressesApiInterface + */ + createPayloadSignature(walletId: string, addressId: string, createPayloadSignatureRequest?: CreatePayloadSignatureRequest, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Get address + * @summary Get address by onchain address + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address that is being fetched. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AddressesApiInterface + */ + getAddress(walletId: string, addressId: string, options?: RawAxiosRequestConfig): AxiosPromise
        ; + + /** + * Get address balance + * @summary Get address balance for asset + * @param {string} walletId The ID of the wallet to fetch the balance for + * @param {string} addressId The onchain address of the address that is being fetched. + * @param {string} assetId The symbol of the asset to fetch the balance for + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AddressesApiInterface + */ + getAddressBalance(walletId: string, addressId: string, assetId: string, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Get payload signature. + * @summary Get payload signature. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address that signed the payload. + * @param {string} payloadSignatureId The ID of the payload signature to fetch. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AddressesApiInterface + */ + getPayloadSignature(walletId: string, addressId: string, payloadSignatureId: string, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Get address balances + * @summary Get all balances for address + * @param {string} walletId The ID of the wallet to fetch the balances for + * @param {string} addressId The onchain address of the address that is being fetched. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AddressesApiInterface + */ + listAddressBalances(walletId: string, addressId: string, page?: string, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * List addresses in the wallet. + * @summary List addresses in a wallet. + * @param {string} walletId The ID of the wallet whose addresses to fetch + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AddressesApiInterface + */ + listAddresses(walletId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * List payload signatures for an address. + * @summary List payload signatures for an address. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address whose payload signatures to fetch. + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AddressesApiInterface + */ + listPayloadSignatures(walletId: string, addressId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Request faucet funds to be sent to onchain address. + * @summary Request faucet funds for onchain address. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address that is being fetched. + * @param {string} [assetId] The ID of the asset to transfer from the faucet. + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + * @memberof AddressesApiInterface + */ + requestFaucetFunds(walletId: string, addressId: string, assetId?: string, options?: RawAxiosRequestConfig): AxiosPromise; + +} + +/** + * AddressesApi - object-oriented interface + * @export + * @class AddressesApi + * @extends {BaseAPI} + */ +export class AddressesApi extends BaseAPI implements AddressesApiInterface { + /** + * Create a new address scoped to the wallet. + * @summary Create a new address + * @param {string} walletId The ID of the wallet to create the address in. + * @param {CreateAddressRequest} [createAddressRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AddressesApi + */ + public createAddress(walletId: string, createAddressRequest?: CreateAddressRequest, options?: RawAxiosRequestConfig) { + return AddressesApiFp(this.configuration).createAddress(walletId, createAddressRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Create a new payload signature with an address. + * @summary Create a new payload signature. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address to sign the payload with. + * @param {CreatePayloadSignatureRequest} [createPayloadSignatureRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AddressesApi + */ + public createPayloadSignature(walletId: string, addressId: string, createPayloadSignatureRequest?: CreatePayloadSignatureRequest, options?: RawAxiosRequestConfig) { + return AddressesApiFp(this.configuration).createPayloadSignature(walletId, addressId, createPayloadSignatureRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get address + * @summary Get address by onchain address + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address that is being fetched. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AddressesApi + */ + public getAddress(walletId: string, addressId: string, options?: RawAxiosRequestConfig) { + return AddressesApiFp(this.configuration).getAddress(walletId, addressId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get address balance + * @summary Get address balance for asset + * @param {string} walletId The ID of the wallet to fetch the balance for + * @param {string} addressId The onchain address of the address that is being fetched. + * @param {string} assetId The symbol of the asset to fetch the balance for + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AddressesApi + */ + public getAddressBalance(walletId: string, addressId: string, assetId: string, options?: RawAxiosRequestConfig) { + return AddressesApiFp(this.configuration).getAddressBalance(walletId, addressId, assetId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get payload signature. + * @summary Get payload signature. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address that signed the payload. + * @param {string} payloadSignatureId The ID of the payload signature to fetch. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AddressesApi + */ + public getPayloadSignature(walletId: string, addressId: string, payloadSignatureId: string, options?: RawAxiosRequestConfig) { + return AddressesApiFp(this.configuration).getPayloadSignature(walletId, addressId, payloadSignatureId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get address balances + * @summary Get all balances for address + * @param {string} walletId The ID of the wallet to fetch the balances for + * @param {string} addressId The onchain address of the address that is being fetched. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AddressesApi + */ + public listAddressBalances(walletId: string, addressId: string, page?: string, options?: RawAxiosRequestConfig) { + return AddressesApiFp(this.configuration).listAddressBalances(walletId, addressId, page, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * List addresses in the wallet. + * @summary List addresses in a wallet. + * @param {string} walletId The ID of the wallet whose addresses to fetch + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AddressesApi + */ + public listAddresses(walletId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig) { + return AddressesApiFp(this.configuration).listAddresses(walletId, limit, page, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * List payload signatures for an address. + * @summary List payload signatures for an address. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address whose payload signatures to fetch. + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AddressesApi + */ + public listPayloadSignatures(walletId: string, addressId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig) { + return AddressesApiFp(this.configuration).listPayloadSignatures(walletId, addressId, limit, page, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Request faucet funds to be sent to onchain address. + * @summary Request faucet funds for onchain address. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address that is being fetched. + * @param {string} [assetId] The ID of the asset to transfer from the faucet. + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + * @memberof AddressesApi + */ + public requestFaucetFunds(walletId: string, addressId: string, assetId?: string, options?: RawAxiosRequestConfig) { + return AddressesApiFp(this.configuration).requestFaucetFunds(walletId, addressId, assetId, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * AssetsApi - axios parameter creator + * @export + */ +export const AssetsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Get the asset for the specified asset ID. + * @summary Get the asset for the specified asset ID. + * @param {string} networkId The ID of the blockchain network + * @param {string} assetId The ID of the asset to fetch. This could be a symbol or an ERC20 contract address. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAsset: async (networkId: string, assetId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'networkId' is not null or undefined + assertParamExists('getAsset', 'networkId', networkId) + // verify required parameter 'assetId' is not null or undefined + assertParamExists('getAsset', 'assetId', assetId) + const localVarPath = `/v1/networks/{network_id}/assets/{asset_id}` + .replace(`{${"network_id"}}`, encodeURIComponent(String(networkId))) + .replace(`{${"asset_id"}}`, encodeURIComponent(String(assetId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * AssetsApi - functional programming interface + * @export + */ +export const AssetsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AssetsApiAxiosParamCreator(configuration) + return { + /** + * Get the asset for the specified asset ID. + * @summary Get the asset for the specified asset ID. + * @param {string} networkId The ID of the blockchain network + * @param {string} assetId The ID of the asset to fetch. This could be a symbol or an ERC20 contract address. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getAsset(networkId: string, assetId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAsset(networkId, assetId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AssetsApi.getAsset']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * AssetsApi - factory interface + * @export + */ +export const AssetsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AssetsApiFp(configuration) + return { + /** + * Get the asset for the specified asset ID. + * @summary Get the asset for the specified asset ID. + * @param {string} networkId The ID of the blockchain network + * @param {string} assetId The ID of the asset to fetch. This could be a symbol or an ERC20 contract address. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAsset(networkId: string, assetId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getAsset(networkId, assetId, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * AssetsApi - interface + * @export + * @interface AssetsApi + */ +export interface AssetsApiInterface { + /** + * Get the asset for the specified asset ID. + * @summary Get the asset for the specified asset ID. + * @param {string} networkId The ID of the blockchain network + * @param {string} assetId The ID of the asset to fetch. This could be a symbol or an ERC20 contract address. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AssetsApiInterface + */ + getAsset(networkId: string, assetId: string, options?: RawAxiosRequestConfig): AxiosPromise; + +} + +/** + * AssetsApi - object-oriented interface + * @export + * @class AssetsApi + * @extends {BaseAPI} + */ +export class AssetsApi extends BaseAPI implements AssetsApiInterface { + /** + * Get the asset for the specified asset ID. + * @summary Get the asset for the specified asset ID. + * @param {string} networkId The ID of the blockchain network + * @param {string} assetId The ID of the asset to fetch. This could be a symbol or an ERC20 contract address. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AssetsApi + */ + public getAsset(networkId: string, assetId: string, options?: RawAxiosRequestConfig) { + return AssetsApiFp(this.configuration).getAsset(networkId, assetId, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * BalanceHistoryApi - axios parameter creator + * @export + */ +export const BalanceHistoryApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * List the historical balance of an asset in a specific address. + * @summary Get address balance history for asset + * @param {string} networkId The ID of the blockchain network + * @param {string} addressId The ID of the address to fetch the historical balance for. + * @param {string} assetId The symbol of the asset to fetch the historical balance for. + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listAddressHistoricalBalance: async (networkId: string, addressId: string, assetId: string, limit?: number, page?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'networkId' is not null or undefined + assertParamExists('listAddressHistoricalBalance', 'networkId', networkId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('listAddressHistoricalBalance', 'addressId', addressId) + // verify required parameter 'assetId' is not null or undefined + assertParamExists('listAddressHistoricalBalance', 'assetId', assetId) + const localVarPath = `/v1/networks/{network_id}/addresses/{address_id}/balance_history/{asset_id}` + .replace(`{${"network_id"}}`, encodeURIComponent(String(networkId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))) + .replace(`{${"asset_id"}}`, encodeURIComponent(String(assetId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * BalanceHistoryApi - functional programming interface + * @export + */ +export const BalanceHistoryApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = BalanceHistoryApiAxiosParamCreator(configuration) + return { + /** + * List the historical balance of an asset in a specific address. + * @summary Get address balance history for asset + * @param {string} networkId The ID of the blockchain network + * @param {string} addressId The ID of the address to fetch the historical balance for. + * @param {string} assetId The symbol of the asset to fetch the historical balance for. + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listAddressHistoricalBalance(networkId: string, addressId: string, assetId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listAddressHistoricalBalance(networkId, addressId, assetId, limit, page, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['BalanceHistoryApi.listAddressHistoricalBalance']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * BalanceHistoryApi - factory interface + * @export + */ +export const BalanceHistoryApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = BalanceHistoryApiFp(configuration) + return { + /** + * List the historical balance of an asset in a specific address. + * @summary Get address balance history for asset + * @param {string} networkId The ID of the blockchain network + * @param {string} addressId The ID of the address to fetch the historical balance for. + * @param {string} assetId The symbol of the asset to fetch the historical balance for. + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listAddressHistoricalBalance(networkId: string, addressId: string, assetId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listAddressHistoricalBalance(networkId, addressId, assetId, limit, page, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * BalanceHistoryApi - interface + * @export + * @interface BalanceHistoryApi + */ +export interface BalanceHistoryApiInterface { + /** + * List the historical balance of an asset in a specific address. + * @summary Get address balance history for asset + * @param {string} networkId The ID of the blockchain network + * @param {string} addressId The ID of the address to fetch the historical balance for. + * @param {string} assetId The symbol of the asset to fetch the historical balance for. + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BalanceHistoryApiInterface + */ + listAddressHistoricalBalance(networkId: string, addressId: string, assetId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise; + +} + +/** + * BalanceHistoryApi - object-oriented interface + * @export + * @class BalanceHistoryApi + * @extends {BaseAPI} + */ +export class BalanceHistoryApi extends BaseAPI implements BalanceHistoryApiInterface { + /** + * List the historical balance of an asset in a specific address. + * @summary Get address balance history for asset + * @param {string} networkId The ID of the blockchain network + * @param {string} addressId The ID of the address to fetch the historical balance for. + * @param {string} assetId The symbol of the asset to fetch the historical balance for. + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BalanceHistoryApi + */ + public listAddressHistoricalBalance(networkId: string, addressId: string, assetId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig) { + return BalanceHistoryApiFp(this.configuration).listAddressHistoricalBalance(networkId, addressId, assetId, limit, page, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * ContractEventsApi - axios parameter creator + * @export + */ +export const ContractEventsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Retrieve events for a specific contract + * @summary List contract events + * @param {string} networkId Unique identifier for the blockchain network + * @param {string} protocolName Case-sensitive name of the blockchain protocol + * @param {string} contractAddress EVM address of the smart contract (42 characters, including \'0x\', in lowercase) + * @param {string} contractName Case-sensitive name of the specific contract within the project + * @param {string} eventName Case-sensitive name of the event to filter for in the contract\'s logs + * @param {number} fromBlockHeight Lower bound of the block range to query (inclusive) + * @param {number} toBlockHeight Upper bound of the block range to query (inclusive) + * @param {string} [nextPage] Pagination token for retrieving the next set of results + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listContractEvents: async (networkId: string, protocolName: string, contractAddress: string, contractName: string, eventName: string, fromBlockHeight: number, toBlockHeight: number, nextPage?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'networkId' is not null or undefined + assertParamExists('listContractEvents', 'networkId', networkId) + // verify required parameter 'protocolName' is not null or undefined + assertParamExists('listContractEvents', 'protocolName', protocolName) + // verify required parameter 'contractAddress' is not null or undefined + assertParamExists('listContractEvents', 'contractAddress', contractAddress) + // verify required parameter 'contractName' is not null or undefined + assertParamExists('listContractEvents', 'contractName', contractName) + // verify required parameter 'eventName' is not null or undefined + assertParamExists('listContractEvents', 'eventName', eventName) + // verify required parameter 'fromBlockHeight' is not null or undefined + assertParamExists('listContractEvents', 'fromBlockHeight', fromBlockHeight) + // verify required parameter 'toBlockHeight' is not null or undefined + assertParamExists('listContractEvents', 'toBlockHeight', toBlockHeight) + const localVarPath = `/v1/networks/{network_id}/smart_contracts/{contract_address}/events` + .replace(`{${"network_id"}}`, encodeURIComponent(String(networkId))) + .replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + if (protocolName !== undefined) { + localVarQueryParameter['protocol_name'] = protocolName; + } + + if (contractName !== undefined) { + localVarQueryParameter['contract_name'] = contractName; + } + + if (eventName !== undefined) { + localVarQueryParameter['event_name'] = eventName; + } + + if (fromBlockHeight !== undefined) { + localVarQueryParameter['from_block_height'] = fromBlockHeight; + } + + if (toBlockHeight !== undefined) { + localVarQueryParameter['to_block_height'] = toBlockHeight; + } + + if (nextPage !== undefined) { + localVarQueryParameter['next_page'] = nextPage; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * ContractEventsApi - functional programming interface + * @export + */ +export const ContractEventsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ContractEventsApiAxiosParamCreator(configuration) + return { + /** + * Retrieve events for a specific contract + * @summary List contract events + * @param {string} networkId Unique identifier for the blockchain network + * @param {string} protocolName Case-sensitive name of the blockchain protocol + * @param {string} contractAddress EVM address of the smart contract (42 characters, including \'0x\', in lowercase) + * @param {string} contractName Case-sensitive name of the specific contract within the project + * @param {string} eventName Case-sensitive name of the event to filter for in the contract\'s logs + * @param {number} fromBlockHeight Lower bound of the block range to query (inclusive) + * @param {number} toBlockHeight Upper bound of the block range to query (inclusive) + * @param {string} [nextPage] Pagination token for retrieving the next set of results + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listContractEvents(networkId: string, protocolName: string, contractAddress: string, contractName: string, eventName: string, fromBlockHeight: number, toBlockHeight: number, nextPage?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listContractEvents(networkId, protocolName, contractAddress, contractName, eventName, fromBlockHeight, toBlockHeight, nextPage, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ContractEventsApi.listContractEvents']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * ContractEventsApi - factory interface + * @export + */ +export const ContractEventsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ContractEventsApiFp(configuration) + return { + /** + * Retrieve events for a specific contract + * @summary List contract events + * @param {string} networkId Unique identifier for the blockchain network + * @param {string} protocolName Case-sensitive name of the blockchain protocol + * @param {string} contractAddress EVM address of the smart contract (42 characters, including \'0x\', in lowercase) + * @param {string} contractName Case-sensitive name of the specific contract within the project + * @param {string} eventName Case-sensitive name of the event to filter for in the contract\'s logs + * @param {number} fromBlockHeight Lower bound of the block range to query (inclusive) + * @param {number} toBlockHeight Upper bound of the block range to query (inclusive) + * @param {string} [nextPage] Pagination token for retrieving the next set of results + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listContractEvents(networkId: string, protocolName: string, contractAddress: string, contractName: string, eventName: string, fromBlockHeight: number, toBlockHeight: number, nextPage?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listContractEvents(networkId, protocolName, contractAddress, contractName, eventName, fromBlockHeight, toBlockHeight, nextPage, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * ContractEventsApi - interface + * @export + * @interface ContractEventsApi + */ +export interface ContractEventsApiInterface { + /** + * Retrieve events for a specific contract + * @summary List contract events + * @param {string} networkId Unique identifier for the blockchain network + * @param {string} protocolName Case-sensitive name of the blockchain protocol + * @param {string} contractAddress EVM address of the smart contract (42 characters, including \'0x\', in lowercase) + * @param {string} contractName Case-sensitive name of the specific contract within the project + * @param {string} eventName Case-sensitive name of the event to filter for in the contract\'s logs + * @param {number} fromBlockHeight Lower bound of the block range to query (inclusive) + * @param {number} toBlockHeight Upper bound of the block range to query (inclusive) + * @param {string} [nextPage] Pagination token for retrieving the next set of results + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContractEventsApiInterface + */ + listContractEvents(networkId: string, protocolName: string, contractAddress: string, contractName: string, eventName: string, fromBlockHeight: number, toBlockHeight: number, nextPage?: string, options?: RawAxiosRequestConfig): AxiosPromise; + +} + +/** + * ContractEventsApi - object-oriented interface + * @export + * @class ContractEventsApi + * @extends {BaseAPI} + */ +export class ContractEventsApi extends BaseAPI implements ContractEventsApiInterface { + /** + * Retrieve events for a specific contract + * @summary List contract events + * @param {string} networkId Unique identifier for the blockchain network + * @param {string} protocolName Case-sensitive name of the blockchain protocol + * @param {string} contractAddress EVM address of the smart contract (42 characters, including \'0x\', in lowercase) + * @param {string} contractName Case-sensitive name of the specific contract within the project + * @param {string} eventName Case-sensitive name of the event to filter for in the contract\'s logs + * @param {number} fromBlockHeight Lower bound of the block range to query (inclusive) + * @param {number} toBlockHeight Upper bound of the block range to query (inclusive) + * @param {string} [nextPage] Pagination token for retrieving the next set of results + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContractEventsApi + */ + public listContractEvents(networkId: string, protocolName: string, contractAddress: string, contractName: string, eventName: string, fromBlockHeight: number, toBlockHeight: number, nextPage?: string, options?: RawAxiosRequestConfig) { + return ContractEventsApiFp(this.configuration).listContractEvents(networkId, protocolName, contractAddress, contractName, eventName, fromBlockHeight, toBlockHeight, nextPage, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * ContractInvocationsApi - axios parameter creator + * @export + */ +export const ContractInvocationsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Broadcast a contract invocation. + * @summary Broadcast a contract invocation. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address the contract invocation belongs to. + * @param {string} contractInvocationId The ID of the contract invocation to broadcast. + * @param {BroadcastContractInvocationRequest} broadcastContractInvocationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + broadcastContractInvocation: async (walletId: string, addressId: string, contractInvocationId: string, broadcastContractInvocationRequest: BroadcastContractInvocationRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'walletId' is not null or undefined + assertParamExists('broadcastContractInvocation', 'walletId', walletId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('broadcastContractInvocation', 'addressId', addressId) + // verify required parameter 'contractInvocationId' is not null or undefined + assertParamExists('broadcastContractInvocation', 'contractInvocationId', contractInvocationId) + // verify required parameter 'broadcastContractInvocationRequest' is not null or undefined + assertParamExists('broadcastContractInvocation', 'broadcastContractInvocationRequest', broadcastContractInvocationRequest) + const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/contract_invocations/{contract_invocation_id}/broadcast` + .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))) + .replace(`{${"contract_invocation_id"}}`, encodeURIComponent(String(contractInvocationId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(broadcastContractInvocationRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Create a new contract invocation. + * @summary Create a new contract invocation for an address. + * @param {string} walletId The ID of the wallet the source address belongs to. + * @param {string} addressId The ID of the address to invoke the contract from. + * @param {CreateContractInvocationRequest} createContractInvocationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createContractInvocation: async (walletId: string, addressId: string, createContractInvocationRequest: CreateContractInvocationRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'walletId' is not null or undefined + assertParamExists('createContractInvocation', 'walletId', walletId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('createContractInvocation', 'addressId', addressId) + // verify required parameter 'createContractInvocationRequest' is not null or undefined + assertParamExists('createContractInvocation', 'createContractInvocationRequest', createContractInvocationRequest) + const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/contract_invocations` + .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createContractInvocationRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get a contract invocation by ID. + * @summary Get a contract invocation by ID. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address the contract invocation belongs to. + * @param {string} contractInvocationId The ID of the contract invocation to fetch. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getContractInvocation: async (walletId: string, addressId: string, contractInvocationId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'walletId' is not null or undefined + assertParamExists('getContractInvocation', 'walletId', walletId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('getContractInvocation', 'addressId', addressId) + // verify required parameter 'contractInvocationId' is not null or undefined + assertParamExists('getContractInvocation', 'contractInvocationId', contractInvocationId) + const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/contract_invocations/{contract_invocation_id}` + .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))) + .replace(`{${"contract_invocation_id"}}`, encodeURIComponent(String(contractInvocationId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * List contract invocations for an address. + * @summary List contract invocations for an address. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address to list contract invocations for. + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listContractInvocations: async (walletId: string, addressId: string, limit?: number, page?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'walletId' is not null or undefined + assertParamExists('listContractInvocations', 'walletId', walletId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('listContractInvocations', 'addressId', addressId) + const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/contract_invocations` + .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * ContractInvocationsApi - functional programming interface + * @export + */ +export const ContractInvocationsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ContractInvocationsApiAxiosParamCreator(configuration) + return { + /** + * Broadcast a contract invocation. + * @summary Broadcast a contract invocation. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address the contract invocation belongs to. + * @param {string} contractInvocationId The ID of the contract invocation to broadcast. + * @param {BroadcastContractInvocationRequest} broadcastContractInvocationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async broadcastContractInvocation(walletId: string, addressId: string, contractInvocationId: string, broadcastContractInvocationRequest: BroadcastContractInvocationRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.broadcastContractInvocation(walletId, addressId, contractInvocationId, broadcastContractInvocationRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ContractInvocationsApi.broadcastContractInvocation']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Create a new contract invocation. + * @summary Create a new contract invocation for an address. + * @param {string} walletId The ID of the wallet the source address belongs to. + * @param {string} addressId The ID of the address to invoke the contract from. + * @param {CreateContractInvocationRequest} createContractInvocationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createContractInvocation(walletId: string, addressId: string, createContractInvocationRequest: CreateContractInvocationRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createContractInvocation(walletId, addressId, createContractInvocationRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ContractInvocationsApi.createContractInvocation']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Get a contract invocation by ID. + * @summary Get a contract invocation by ID. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address the contract invocation belongs to. + * @param {string} contractInvocationId The ID of the contract invocation to fetch. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getContractInvocation(walletId: string, addressId: string, contractInvocationId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getContractInvocation(walletId, addressId, contractInvocationId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ContractInvocationsApi.getContractInvocation']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * List contract invocations for an address. + * @summary List contract invocations for an address. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address to list contract invocations for. + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listContractInvocations(walletId: string, addressId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listContractInvocations(walletId, addressId, limit, page, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ContractInvocationsApi.listContractInvocations']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * ContractInvocationsApi - factory interface + * @export + */ +export const ContractInvocationsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ContractInvocationsApiFp(configuration) + return { + /** + * Broadcast a contract invocation. + * @summary Broadcast a contract invocation. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address the contract invocation belongs to. + * @param {string} contractInvocationId The ID of the contract invocation to broadcast. + * @param {BroadcastContractInvocationRequest} broadcastContractInvocationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + broadcastContractInvocation(walletId: string, addressId: string, contractInvocationId: string, broadcastContractInvocationRequest: BroadcastContractInvocationRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.broadcastContractInvocation(walletId, addressId, contractInvocationId, broadcastContractInvocationRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Create a new contract invocation. + * @summary Create a new contract invocation for an address. + * @param {string} walletId The ID of the wallet the source address belongs to. + * @param {string} addressId The ID of the address to invoke the contract from. + * @param {CreateContractInvocationRequest} createContractInvocationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createContractInvocation(walletId: string, addressId: string, createContractInvocationRequest: CreateContractInvocationRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.createContractInvocation(walletId, addressId, createContractInvocationRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Get a contract invocation by ID. + * @summary Get a contract invocation by ID. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address the contract invocation belongs to. + * @param {string} contractInvocationId The ID of the contract invocation to fetch. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getContractInvocation(walletId: string, addressId: string, contractInvocationId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getContractInvocation(walletId, addressId, contractInvocationId, options).then((request) => request(axios, basePath)); + }, + /** + * List contract invocations for an address. + * @summary List contract invocations for an address. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address to list contract invocations for. + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listContractInvocations(walletId: string, addressId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listContractInvocations(walletId, addressId, limit, page, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * ContractInvocationsApi - interface + * @export + * @interface ContractInvocationsApi + */ +export interface ContractInvocationsApiInterface { + /** + * Broadcast a contract invocation. + * @summary Broadcast a contract invocation. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address the contract invocation belongs to. + * @param {string} contractInvocationId The ID of the contract invocation to broadcast. + * @param {BroadcastContractInvocationRequest} broadcastContractInvocationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContractInvocationsApiInterface + */ + broadcastContractInvocation(walletId: string, addressId: string, contractInvocationId: string, broadcastContractInvocationRequest: BroadcastContractInvocationRequest, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Create a new contract invocation. + * @summary Create a new contract invocation for an address. + * @param {string} walletId The ID of the wallet the source address belongs to. + * @param {string} addressId The ID of the address to invoke the contract from. + * @param {CreateContractInvocationRequest} createContractInvocationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContractInvocationsApiInterface + */ + createContractInvocation(walletId: string, addressId: string, createContractInvocationRequest: CreateContractInvocationRequest, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Get a contract invocation by ID. + * @summary Get a contract invocation by ID. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address the contract invocation belongs to. + * @param {string} contractInvocationId The ID of the contract invocation to fetch. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContractInvocationsApiInterface + */ + getContractInvocation(walletId: string, addressId: string, contractInvocationId: string, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * List contract invocations for an address. + * @summary List contract invocations for an address. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address to list contract invocations for. + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContractInvocationsApiInterface + */ + listContractInvocations(walletId: string, addressId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise; + +} + +/** + * ContractInvocationsApi - object-oriented interface + * @export + * @class ContractInvocationsApi + * @extends {BaseAPI} + */ +export class ContractInvocationsApi extends BaseAPI implements ContractInvocationsApiInterface { + /** + * Broadcast a contract invocation. + * @summary Broadcast a contract invocation. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address the contract invocation belongs to. + * @param {string} contractInvocationId The ID of the contract invocation to broadcast. + * @param {BroadcastContractInvocationRequest} broadcastContractInvocationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContractInvocationsApi + */ + public broadcastContractInvocation(walletId: string, addressId: string, contractInvocationId: string, broadcastContractInvocationRequest: BroadcastContractInvocationRequest, options?: RawAxiosRequestConfig) { + return ContractInvocationsApiFp(this.configuration).broadcastContractInvocation(walletId, addressId, contractInvocationId, broadcastContractInvocationRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Create a new contract invocation. + * @summary Create a new contract invocation for an address. + * @param {string} walletId The ID of the wallet the source address belongs to. + * @param {string} addressId The ID of the address to invoke the contract from. + * @param {CreateContractInvocationRequest} createContractInvocationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContractInvocationsApi + */ + public createContractInvocation(walletId: string, addressId: string, createContractInvocationRequest: CreateContractInvocationRequest, options?: RawAxiosRequestConfig) { + return ContractInvocationsApiFp(this.configuration).createContractInvocation(walletId, addressId, createContractInvocationRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get a contract invocation by ID. + * @summary Get a contract invocation by ID. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address the contract invocation belongs to. + * @param {string} contractInvocationId The ID of the contract invocation to fetch. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContractInvocationsApi + */ + public getContractInvocation(walletId: string, addressId: string, contractInvocationId: string, options?: RawAxiosRequestConfig) { + return ContractInvocationsApiFp(this.configuration).getContractInvocation(walletId, addressId, contractInvocationId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * List contract invocations for an address. + * @summary List contract invocations for an address. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address to list contract invocations for. + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContractInvocationsApi + */ + public listContractInvocations(walletId: string, addressId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig) { + return ContractInvocationsApiFp(this.configuration).listContractInvocations(walletId, addressId, limit, page, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * ExternalAddressesApi - axios parameter creator + * @export + */ +export const ExternalAddressesApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Broadcast an arbitrary transaction to the node constructed and signed by an external address. + * @summary Broadcast an arbitrary transaction. + * @param {string} networkId The ID of the network the external address belongs to. + * @param {string} addressId The onchain address of the transaction sender. + * @param {BroadcastExternalTransactionRequest} broadcastExternalTransactionRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + broadcastExternalTransaction: async (networkId: string, addressId: string, broadcastExternalTransactionRequest: BroadcastExternalTransactionRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'networkId' is not null or undefined + assertParamExists('broadcastExternalTransaction', 'networkId', networkId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('broadcastExternalTransaction', 'addressId', addressId) + // verify required parameter 'broadcastExternalTransactionRequest' is not null or undefined + assertParamExists('broadcastExternalTransaction', 'broadcastExternalTransactionRequest', broadcastExternalTransactionRequest) + const localVarPath = `/v1/networks/{network_id}/addresses/{address_id}/transactions` + .replace(`{${"network_id"}}`, encodeURIComponent(String(networkId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(broadcastExternalTransactionRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Broadcast an external address\'s transfer with a signed payload + * @summary Broadcast an external address\' transfer + * @param {string} networkId The ID of the network the address belongs to + * @param {string} addressId The ID of the address the transfer belongs to + * @param {string} transferId The ID of the transfer to broadcast + * @param {BroadcastExternalTransferRequest} broadcastExternalTransferRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + broadcastExternalTransfer: async (networkId: string, addressId: string, transferId: string, broadcastExternalTransferRequest: BroadcastExternalTransferRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'networkId' is not null or undefined + assertParamExists('broadcastExternalTransfer', 'networkId', networkId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('broadcastExternalTransfer', 'addressId', addressId) + // verify required parameter 'transferId' is not null or undefined + assertParamExists('broadcastExternalTransfer', 'transferId', transferId) + // verify required parameter 'broadcastExternalTransferRequest' is not null or undefined + assertParamExists('broadcastExternalTransfer', 'broadcastExternalTransferRequest', broadcastExternalTransferRequest) + const localVarPath = `/v1/networks/{network_id}/addresses/{address_id}/transfers/{transfer_id}/broadcast` + .replace(`{${"network_id"}}`, encodeURIComponent(String(networkId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))) + .replace(`{${"transfer_id"}}`, encodeURIComponent(String(transferId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(broadcastExternalTransferRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Create a new transfer between addresses. + * @summary Create a new transfer + * @param {string} networkId The ID of the network the address is on + * @param {string} addressId The ID of the address to transfer from + * @param {CreateExternalTransferRequest} createExternalTransferRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createExternalTransfer: async (networkId: string, addressId: string, createExternalTransferRequest: CreateExternalTransferRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'networkId' is not null or undefined + assertParamExists('createExternalTransfer', 'networkId', networkId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('createExternalTransfer', 'addressId', addressId) + // verify required parameter 'createExternalTransferRequest' is not null or undefined + assertParamExists('createExternalTransfer', 'createExternalTransferRequest', createExternalTransferRequest) + const localVarPath = `/v1/networks/{network_id}/addresses/{address_id}/transfers` + .replace(`{${"network_id"}}`, encodeURIComponent(String(networkId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createExternalTransferRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get the balance of an asset in an external address + * @summary Get the balance of an asset in an external address + * @param {string} networkId The ID of the blockchain network + * @param {string} addressId The ID of the address to fetch the balance for + * @param {string} assetId The ID of the asset to fetch the balance for + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getExternalAddressBalance: async (networkId: string, addressId: string, assetId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'networkId' is not null or undefined + assertParamExists('getExternalAddressBalance', 'networkId', networkId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('getExternalAddressBalance', 'addressId', addressId) + // verify required parameter 'assetId' is not null or undefined + assertParamExists('getExternalAddressBalance', 'assetId', assetId) + const localVarPath = `/v1/networks/{network_id}/addresses/{address_id}/balances/{asset_id}` + .replace(`{${"network_id"}}`, encodeURIComponent(String(networkId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))) + .replace(`{${"asset_id"}}`, encodeURIComponent(String(assetId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get an external address\' transfer by ID + * @summary Get a external address\' transfer + * @param {string} networkId The ID of the network the address is on + * @param {string} addressId The ID of the address the transfer belongs to + * @param {string} transferId The ID of the transfer to fetch + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getExternalTransfer: async (networkId: string, addressId: string, transferId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'networkId' is not null or undefined + assertParamExists('getExternalTransfer', 'networkId', networkId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('getExternalTransfer', 'addressId', addressId) + // verify required parameter 'transferId' is not null or undefined + assertParamExists('getExternalTransfer', 'transferId', transferId) + const localVarPath = `/v1/networks/{network_id}/addresses/{address_id}/transfers/{transfer_id}` + .replace(`{${"network_id"}}`, encodeURIComponent(String(networkId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))) + .replace(`{${"transfer_id"}}`, encodeURIComponent(String(transferId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get the status of a faucet transaction + * @summary Get the status of a faucet transaction + * @param {string} networkId The ID of the blockchain network + * @param {string} addressId The ID of the address to fetch the faucet transaction for + * @param {string} txHash The hash of the faucet transaction + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getFaucetTransaction: async (networkId: string, addressId: string, txHash: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'networkId' is not null or undefined + assertParamExists('getFaucetTransaction', 'networkId', networkId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('getFaucetTransaction', 'addressId', addressId) + // verify required parameter 'txHash' is not null or undefined + assertParamExists('getFaucetTransaction', 'txHash', txHash) + const localVarPath = `/v1/networks/{network_id}/addresses/{address_id}/faucet/{tx_hash}` + .replace(`{${"network_id"}}`, encodeURIComponent(String(networkId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))) + .replace(`{${"tx_hash"}}`, encodeURIComponent(String(txHash))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * List all of the balances of an external address + * @summary Get the balances of an external address + * @param {string} networkId The ID of the blockchain network + * @param {string} addressId The ID of the address to fetch the balance for + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listExternalAddressBalances: async (networkId: string, addressId: string, page?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'networkId' is not null or undefined + assertParamExists('listExternalAddressBalances', 'networkId', networkId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('listExternalAddressBalances', 'addressId', addressId) + const localVarPath = `/v1/networks/{network_id}/addresses/{address_id}/balances` + .replace(`{${"network_id"}}`, encodeURIComponent(String(networkId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Request faucet funds to be sent to external address. + * @summary Request faucet funds for external address. + * @param {string} networkId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address that is being fetched. + * @param {string} [assetId] The ID of the asset to transfer from the faucet. + * @param {boolean} [skipWait] Whether to skip waiting for the transaction to be mined. This will become the default behavior in the future. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + requestExternalFaucetFunds: async (networkId: string, addressId: string, assetId?: string, skipWait?: boolean, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'networkId' is not null or undefined + assertParamExists('requestExternalFaucetFunds', 'networkId', networkId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('requestExternalFaucetFunds', 'addressId', addressId) + const localVarPath = `/v1/networks/{network_id}/addresses/{address_id}/faucet` + .replace(`{${"network_id"}}`, encodeURIComponent(String(networkId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + if (assetId !== undefined) { + localVarQueryParameter['asset_id'] = assetId; + } + + if (skipWait !== undefined) { + localVarQueryParameter['skip_wait'] = skipWait; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * ExternalAddressesApi - functional programming interface + * @export + */ +export const ExternalAddressesApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ExternalAddressesApiAxiosParamCreator(configuration) + return { + /** + * Broadcast an arbitrary transaction to the node constructed and signed by an external address. + * @summary Broadcast an arbitrary transaction. + * @param {string} networkId The ID of the network the external address belongs to. + * @param {string} addressId The onchain address of the transaction sender. + * @param {BroadcastExternalTransactionRequest} broadcastExternalTransactionRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async broadcastExternalTransaction(networkId: string, addressId: string, broadcastExternalTransactionRequest: BroadcastExternalTransactionRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.broadcastExternalTransaction(networkId, addressId, broadcastExternalTransactionRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ExternalAddressesApi.broadcastExternalTransaction']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Broadcast an external address\'s transfer with a signed payload + * @summary Broadcast an external address\' transfer + * @param {string} networkId The ID of the network the address belongs to + * @param {string} addressId The ID of the address the transfer belongs to + * @param {string} transferId The ID of the transfer to broadcast + * @param {BroadcastExternalTransferRequest} broadcastExternalTransferRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async broadcastExternalTransfer(networkId: string, addressId: string, transferId: string, broadcastExternalTransferRequest: BroadcastExternalTransferRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.broadcastExternalTransfer(networkId, addressId, transferId, broadcastExternalTransferRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ExternalAddressesApi.broadcastExternalTransfer']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Create a new transfer between addresses. + * @summary Create a new transfer + * @param {string} networkId The ID of the network the address is on + * @param {string} addressId The ID of the address to transfer from + * @param {CreateExternalTransferRequest} createExternalTransferRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createExternalTransfer(networkId: string, addressId: string, createExternalTransferRequest: CreateExternalTransferRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createExternalTransfer(networkId, addressId, createExternalTransferRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ExternalAddressesApi.createExternalTransfer']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Get the balance of an asset in an external address + * @summary Get the balance of an asset in an external address + * @param {string} networkId The ID of the blockchain network + * @param {string} addressId The ID of the address to fetch the balance for + * @param {string} assetId The ID of the asset to fetch the balance for + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getExternalAddressBalance(networkId: string, addressId: string, assetId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getExternalAddressBalance(networkId, addressId, assetId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ExternalAddressesApi.getExternalAddressBalance']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Get an external address\' transfer by ID + * @summary Get a external address\' transfer + * @param {string} networkId The ID of the network the address is on + * @param {string} addressId The ID of the address the transfer belongs to + * @param {string} transferId The ID of the transfer to fetch + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getExternalTransfer(networkId: string, addressId: string, transferId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getExternalTransfer(networkId, addressId, transferId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ExternalAddressesApi.getExternalTransfer']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Get the status of a faucet transaction + * @summary Get the status of a faucet transaction + * @param {string} networkId The ID of the blockchain network + * @param {string} addressId The ID of the address to fetch the faucet transaction for + * @param {string} txHash The hash of the faucet transaction + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getFaucetTransaction(networkId: string, addressId: string, txHash: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getFaucetTransaction(networkId, addressId, txHash, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ExternalAddressesApi.getFaucetTransaction']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * List all of the balances of an external address + * @summary Get the balances of an external address + * @param {string} networkId The ID of the blockchain network + * @param {string} addressId The ID of the address to fetch the balance for + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listExternalAddressBalances(networkId: string, addressId: string, page?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listExternalAddressBalances(networkId, addressId, page, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ExternalAddressesApi.listExternalAddressBalances']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Request faucet funds to be sent to external address. + * @summary Request faucet funds for external address. + * @param {string} networkId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address that is being fetched. + * @param {string} [assetId] The ID of the asset to transfer from the faucet. + * @param {boolean} [skipWait] Whether to skip waiting for the transaction to be mined. This will become the default behavior in the future. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async requestExternalFaucetFunds(networkId: string, addressId: string, assetId?: string, skipWait?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.requestExternalFaucetFunds(networkId, addressId, assetId, skipWait, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ExternalAddressesApi.requestExternalFaucetFunds']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * ExternalAddressesApi - factory interface + * @export + */ +export const ExternalAddressesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ExternalAddressesApiFp(configuration) + return { + /** + * Broadcast an arbitrary transaction to the node constructed and signed by an external address. + * @summary Broadcast an arbitrary transaction. + * @param {string} networkId The ID of the network the external address belongs to. + * @param {string} addressId The onchain address of the transaction sender. + * @param {BroadcastExternalTransactionRequest} broadcastExternalTransactionRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + broadcastExternalTransaction(networkId: string, addressId: string, broadcastExternalTransactionRequest: BroadcastExternalTransactionRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.broadcastExternalTransaction(networkId, addressId, broadcastExternalTransactionRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Broadcast an external address\'s transfer with a signed payload + * @summary Broadcast an external address\' transfer + * @param {string} networkId The ID of the network the address belongs to + * @param {string} addressId The ID of the address the transfer belongs to + * @param {string} transferId The ID of the transfer to broadcast + * @param {BroadcastExternalTransferRequest} broadcastExternalTransferRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + broadcastExternalTransfer(networkId: string, addressId: string, transferId: string, broadcastExternalTransferRequest: BroadcastExternalTransferRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.broadcastExternalTransfer(networkId, addressId, transferId, broadcastExternalTransferRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Create a new transfer between addresses. + * @summary Create a new transfer + * @param {string} networkId The ID of the network the address is on + * @param {string} addressId The ID of the address to transfer from + * @param {CreateExternalTransferRequest} createExternalTransferRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createExternalTransfer(networkId: string, addressId: string, createExternalTransferRequest: CreateExternalTransferRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.createExternalTransfer(networkId, addressId, createExternalTransferRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Get the balance of an asset in an external address + * @summary Get the balance of an asset in an external address + * @param {string} networkId The ID of the blockchain network + * @param {string} addressId The ID of the address to fetch the balance for + * @param {string} assetId The ID of the asset to fetch the balance for + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getExternalAddressBalance(networkId: string, addressId: string, assetId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getExternalAddressBalance(networkId, addressId, assetId, options).then((request) => request(axios, basePath)); + }, + /** + * Get an external address\' transfer by ID + * @summary Get a external address\' transfer + * @param {string} networkId The ID of the network the address is on + * @param {string} addressId The ID of the address the transfer belongs to + * @param {string} transferId The ID of the transfer to fetch + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getExternalTransfer(networkId: string, addressId: string, transferId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getExternalTransfer(networkId, addressId, transferId, options).then((request) => request(axios, basePath)); + }, + /** + * Get the status of a faucet transaction + * @summary Get the status of a faucet transaction + * @param {string} networkId The ID of the blockchain network + * @param {string} addressId The ID of the address to fetch the faucet transaction for + * @param {string} txHash The hash of the faucet transaction + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getFaucetTransaction(networkId: string, addressId: string, txHash: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getFaucetTransaction(networkId, addressId, txHash, options).then((request) => request(axios, basePath)); + }, + /** + * List all of the balances of an external address + * @summary Get the balances of an external address + * @param {string} networkId The ID of the blockchain network + * @param {string} addressId The ID of the address to fetch the balance for + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listExternalAddressBalances(networkId: string, addressId: string, page?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listExternalAddressBalances(networkId, addressId, page, options).then((request) => request(axios, basePath)); + }, + /** + * Request faucet funds to be sent to external address. + * @summary Request faucet funds for external address. + * @param {string} networkId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address that is being fetched. + * @param {string} [assetId] The ID of the asset to transfer from the faucet. + * @param {boolean} [skipWait] Whether to skip waiting for the transaction to be mined. This will become the default behavior in the future. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + requestExternalFaucetFunds(networkId: string, addressId: string, assetId?: string, skipWait?: boolean, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.requestExternalFaucetFunds(networkId, addressId, assetId, skipWait, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * ExternalAddressesApi - interface + * @export + * @interface ExternalAddressesApi + */ +export interface ExternalAddressesApiInterface { + /** + * Broadcast an arbitrary transaction to the node constructed and signed by an external address. + * @summary Broadcast an arbitrary transaction. + * @param {string} networkId The ID of the network the external address belongs to. + * @param {string} addressId The onchain address of the transaction sender. + * @param {BroadcastExternalTransactionRequest} broadcastExternalTransactionRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ExternalAddressesApiInterface + */ + broadcastExternalTransaction(networkId: string, addressId: string, broadcastExternalTransactionRequest: BroadcastExternalTransactionRequest, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Broadcast an external address\'s transfer with a signed payload + * @summary Broadcast an external address\' transfer + * @param {string} networkId The ID of the network the address belongs to + * @param {string} addressId The ID of the address the transfer belongs to + * @param {string} transferId The ID of the transfer to broadcast + * @param {BroadcastExternalTransferRequest} broadcastExternalTransferRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ExternalAddressesApiInterface + */ + broadcastExternalTransfer(networkId: string, addressId: string, transferId: string, broadcastExternalTransferRequest: BroadcastExternalTransferRequest, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Create a new transfer between addresses. + * @summary Create a new transfer + * @param {string} networkId The ID of the network the address is on + * @param {string} addressId The ID of the address to transfer from + * @param {CreateExternalTransferRequest} createExternalTransferRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ExternalAddressesApiInterface + */ + createExternalTransfer(networkId: string, addressId: string, createExternalTransferRequest: CreateExternalTransferRequest, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Get the balance of an asset in an external address + * @summary Get the balance of an asset in an external address + * @param {string} networkId The ID of the blockchain network + * @param {string} addressId The ID of the address to fetch the balance for + * @param {string} assetId The ID of the asset to fetch the balance for + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ExternalAddressesApiInterface + */ + getExternalAddressBalance(networkId: string, addressId: string, assetId: string, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Get an external address\' transfer by ID + * @summary Get a external address\' transfer + * @param {string} networkId The ID of the network the address is on + * @param {string} addressId The ID of the address the transfer belongs to + * @param {string} transferId The ID of the transfer to fetch + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ExternalAddressesApiInterface + */ + getExternalTransfer(networkId: string, addressId: string, transferId: string, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Get the status of a faucet transaction + * @summary Get the status of a faucet transaction + * @param {string} networkId The ID of the blockchain network + * @param {string} addressId The ID of the address to fetch the faucet transaction for + * @param {string} txHash The hash of the faucet transaction + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ExternalAddressesApiInterface + */ + getFaucetTransaction(networkId: string, addressId: string, txHash: string, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * List all of the balances of an external address + * @summary Get the balances of an external address + * @param {string} networkId The ID of the blockchain network + * @param {string} addressId The ID of the address to fetch the balance for + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ExternalAddressesApiInterface + */ + listExternalAddressBalances(networkId: string, addressId: string, page?: string, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Request faucet funds to be sent to external address. + * @summary Request faucet funds for external address. + * @param {string} networkId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address that is being fetched. + * @param {string} [assetId] The ID of the asset to transfer from the faucet. + * @param {boolean} [skipWait] Whether to skip waiting for the transaction to be mined. This will become the default behavior in the future. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ExternalAddressesApiInterface + */ + requestExternalFaucetFunds(networkId: string, addressId: string, assetId?: string, skipWait?: boolean, options?: RawAxiosRequestConfig): AxiosPromise; + +} + +/** + * ExternalAddressesApi - object-oriented interface + * @export + * @class ExternalAddressesApi + * @extends {BaseAPI} + */ +export class ExternalAddressesApi extends BaseAPI implements ExternalAddressesApiInterface { + /** + * Broadcast an arbitrary transaction to the node constructed and signed by an external address. + * @summary Broadcast an arbitrary transaction. + * @param {string} networkId The ID of the network the external address belongs to. + * @param {string} addressId The onchain address of the transaction sender. + * @param {BroadcastExternalTransactionRequest} broadcastExternalTransactionRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ExternalAddressesApi + */ + public broadcastExternalTransaction(networkId: string, addressId: string, broadcastExternalTransactionRequest: BroadcastExternalTransactionRequest, options?: RawAxiosRequestConfig) { + return ExternalAddressesApiFp(this.configuration).broadcastExternalTransaction(networkId, addressId, broadcastExternalTransactionRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Broadcast an external address\'s transfer with a signed payload + * @summary Broadcast an external address\' transfer + * @param {string} networkId The ID of the network the address belongs to + * @param {string} addressId The ID of the address the transfer belongs to + * @param {string} transferId The ID of the transfer to broadcast + * @param {BroadcastExternalTransferRequest} broadcastExternalTransferRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ExternalAddressesApi + */ + public broadcastExternalTransfer(networkId: string, addressId: string, transferId: string, broadcastExternalTransferRequest: BroadcastExternalTransferRequest, options?: RawAxiosRequestConfig) { + return ExternalAddressesApiFp(this.configuration).broadcastExternalTransfer(networkId, addressId, transferId, broadcastExternalTransferRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Create a new transfer between addresses. + * @summary Create a new transfer + * @param {string} networkId The ID of the network the address is on + * @param {string} addressId The ID of the address to transfer from + * @param {CreateExternalTransferRequest} createExternalTransferRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ExternalAddressesApi + */ + public createExternalTransfer(networkId: string, addressId: string, createExternalTransferRequest: CreateExternalTransferRequest, options?: RawAxiosRequestConfig) { + return ExternalAddressesApiFp(this.configuration).createExternalTransfer(networkId, addressId, createExternalTransferRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get the balance of an asset in an external address + * @summary Get the balance of an asset in an external address + * @param {string} networkId The ID of the blockchain network + * @param {string} addressId The ID of the address to fetch the balance for + * @param {string} assetId The ID of the asset to fetch the balance for + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ExternalAddressesApi + */ + public getExternalAddressBalance(networkId: string, addressId: string, assetId: string, options?: RawAxiosRequestConfig) { + return ExternalAddressesApiFp(this.configuration).getExternalAddressBalance(networkId, addressId, assetId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get an external address\' transfer by ID + * @summary Get a external address\' transfer + * @param {string} networkId The ID of the network the address is on + * @param {string} addressId The ID of the address the transfer belongs to + * @param {string} transferId The ID of the transfer to fetch + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ExternalAddressesApi + */ + public getExternalTransfer(networkId: string, addressId: string, transferId: string, options?: RawAxiosRequestConfig) { + return ExternalAddressesApiFp(this.configuration).getExternalTransfer(networkId, addressId, transferId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get the status of a faucet transaction + * @summary Get the status of a faucet transaction + * @param {string} networkId The ID of the blockchain network + * @param {string} addressId The ID of the address to fetch the faucet transaction for + * @param {string} txHash The hash of the faucet transaction + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ExternalAddressesApi + */ + public getFaucetTransaction(networkId: string, addressId: string, txHash: string, options?: RawAxiosRequestConfig) { + return ExternalAddressesApiFp(this.configuration).getFaucetTransaction(networkId, addressId, txHash, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * List all of the balances of an external address + * @summary Get the balances of an external address + * @param {string} networkId The ID of the blockchain network + * @param {string} addressId The ID of the address to fetch the balance for + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ExternalAddressesApi + */ + public listExternalAddressBalances(networkId: string, addressId: string, page?: string, options?: RawAxiosRequestConfig) { + return ExternalAddressesApiFp(this.configuration).listExternalAddressBalances(networkId, addressId, page, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Request faucet funds to be sent to external address. + * @summary Request faucet funds for external address. + * @param {string} networkId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address that is being fetched. + * @param {string} [assetId] The ID of the asset to transfer from the faucet. + * @param {boolean} [skipWait] Whether to skip waiting for the transaction to be mined. This will become the default behavior in the future. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ExternalAddressesApi + */ + public requestExternalFaucetFunds(networkId: string, addressId: string, assetId?: string, skipWait?: boolean, options?: RawAxiosRequestConfig) { + return ExternalAddressesApiFp(this.configuration).requestExternalFaucetFunds(networkId, addressId, assetId, skipWait, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * FundApi - axios parameter creator + * @export + */ +export const FundApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create a new fund operation with an address. + * @summary Create a new fund operation. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address to be funded. + * @param {CreateFundOperationRequest} createFundOperationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createFundOperation: async (walletId: string, addressId: string, createFundOperationRequest: CreateFundOperationRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'walletId' is not null or undefined + assertParamExists('createFundOperation', 'walletId', walletId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('createFundOperation', 'addressId', addressId) + // verify required parameter 'createFundOperationRequest' is not null or undefined + assertParamExists('createFundOperation', 'createFundOperationRequest', createFundOperationRequest) + const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/fund_operations` + .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createFundOperationRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Create a new fund operation with an address. + * @summary Create a Fund Operation quote. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address to be funded. + * @param {CreateFundQuoteRequest} createFundQuoteRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createFundQuote: async (walletId: string, addressId: string, createFundQuoteRequest: CreateFundQuoteRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'walletId' is not null or undefined + assertParamExists('createFundQuote', 'walletId', walletId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('createFundQuote', 'addressId', addressId) + // verify required parameter 'createFundQuoteRequest' is not null or undefined + assertParamExists('createFundQuote', 'createFundQuoteRequest', createFundQuoteRequest) + const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/fund_operations/quote` + .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createFundQuoteRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get fund operation. + * @summary Get fund operation. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address that created the fund operation. + * @param {string} fundOperationId The ID of the fund operation to fetch. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getFundOperation: async (walletId: string, addressId: string, fundOperationId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'walletId' is not null or undefined + assertParamExists('getFundOperation', 'walletId', walletId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('getFundOperation', 'addressId', addressId) + // verify required parameter 'fundOperationId' is not null or undefined + assertParamExists('getFundOperation', 'fundOperationId', fundOperationId) + const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/fund_operations/{fund_operation_id}` + .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))) + .replace(`{${"fund_operation_id"}}`, encodeURIComponent(String(fundOperationId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * List fund operations for an address. + * @summary List fund operations for an address. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address to list fund operations for. + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listFundOperations: async (walletId: string, addressId: string, limit?: number, page?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'walletId' is not null or undefined + assertParamExists('listFundOperations', 'walletId', walletId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('listFundOperations', 'addressId', addressId) + const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/fund_operations` + .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * FundApi - functional programming interface + * @export + */ +export const FundApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = FundApiAxiosParamCreator(configuration) + return { + /** + * Create a new fund operation with an address. + * @summary Create a new fund operation. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address to be funded. + * @param {CreateFundOperationRequest} createFundOperationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createFundOperation(walletId: string, addressId: string, createFundOperationRequest: CreateFundOperationRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createFundOperation(walletId, addressId, createFundOperationRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['FundApi.createFundOperation']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Create a new fund operation with an address. + * @summary Create a Fund Operation quote. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address to be funded. + * @param {CreateFundQuoteRequest} createFundQuoteRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createFundQuote(walletId: string, addressId: string, createFundQuoteRequest: CreateFundQuoteRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createFundQuote(walletId, addressId, createFundQuoteRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['FundApi.createFundQuote']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Get fund operation. + * @summary Get fund operation. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address that created the fund operation. + * @param {string} fundOperationId The ID of the fund operation to fetch. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getFundOperation(walletId: string, addressId: string, fundOperationId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getFundOperation(walletId, addressId, fundOperationId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['FundApi.getFundOperation']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * List fund operations for an address. + * @summary List fund operations for an address. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address to list fund operations for. + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listFundOperations(walletId: string, addressId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listFundOperations(walletId, addressId, limit, page, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['FundApi.listFundOperations']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * FundApi - factory interface + * @export + */ +export const FundApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = FundApiFp(configuration) + return { + /** + * Create a new fund operation with an address. + * @summary Create a new fund operation. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address to be funded. + * @param {CreateFundOperationRequest} createFundOperationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createFundOperation(walletId: string, addressId: string, createFundOperationRequest: CreateFundOperationRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.createFundOperation(walletId, addressId, createFundOperationRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Create a new fund operation with an address. + * @summary Create a Fund Operation quote. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address to be funded. + * @param {CreateFundQuoteRequest} createFundQuoteRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createFundQuote(walletId: string, addressId: string, createFundQuoteRequest: CreateFundQuoteRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.createFundQuote(walletId, addressId, createFundQuoteRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Get fund operation. + * @summary Get fund operation. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address that created the fund operation. + * @param {string} fundOperationId The ID of the fund operation to fetch. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getFundOperation(walletId: string, addressId: string, fundOperationId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getFundOperation(walletId, addressId, fundOperationId, options).then((request) => request(axios, basePath)); + }, + /** + * List fund operations for an address. + * @summary List fund operations for an address. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address to list fund operations for. + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listFundOperations(walletId: string, addressId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listFundOperations(walletId, addressId, limit, page, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * FundApi - interface + * @export + * @interface FundApi + */ +export interface FundApiInterface { + /** + * Create a new fund operation with an address. + * @summary Create a new fund operation. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address to be funded. + * @param {CreateFundOperationRequest} createFundOperationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FundApiInterface + */ + createFundOperation(walletId: string, addressId: string, createFundOperationRequest: CreateFundOperationRequest, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Create a new fund operation with an address. + * @summary Create a Fund Operation quote. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address to be funded. + * @param {CreateFundQuoteRequest} createFundQuoteRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FundApiInterface + */ + createFundQuote(walletId: string, addressId: string, createFundQuoteRequest: CreateFundQuoteRequest, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Get fund operation. + * @summary Get fund operation. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address that created the fund operation. + * @param {string} fundOperationId The ID of the fund operation to fetch. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FundApiInterface + */ + getFundOperation(walletId: string, addressId: string, fundOperationId: string, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * List fund operations for an address. + * @summary List fund operations for an address. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address to list fund operations for. + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FundApiInterface + */ + listFundOperations(walletId: string, addressId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise; + +} + +/** + * FundApi - object-oriented interface + * @export + * @class FundApi + * @extends {BaseAPI} + */ +export class FundApi extends BaseAPI implements FundApiInterface { + /** + * Create a new fund operation with an address. + * @summary Create a new fund operation. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address to be funded. + * @param {CreateFundOperationRequest} createFundOperationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FundApi + */ + public createFundOperation(walletId: string, addressId: string, createFundOperationRequest: CreateFundOperationRequest, options?: RawAxiosRequestConfig) { + return FundApiFp(this.configuration).createFundOperation(walletId, addressId, createFundOperationRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Create a new fund operation with an address. + * @summary Create a Fund Operation quote. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address to be funded. + * @param {CreateFundQuoteRequest} createFundQuoteRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FundApi + */ + public createFundQuote(walletId: string, addressId: string, createFundQuoteRequest: CreateFundQuoteRequest, options?: RawAxiosRequestConfig) { + return FundApiFp(this.configuration).createFundQuote(walletId, addressId, createFundQuoteRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get fund operation. + * @summary Get fund operation. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address that created the fund operation. + * @param {string} fundOperationId The ID of the fund operation to fetch. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FundApi + */ + public getFundOperation(walletId: string, addressId: string, fundOperationId: string, options?: RawAxiosRequestConfig) { + return FundApiFp(this.configuration).getFundOperation(walletId, addressId, fundOperationId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * List fund operations for an address. + * @summary List fund operations for an address. + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The onchain address of the address to list fund operations for. + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FundApi + */ + public listFundOperations(walletId: string, addressId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig) { + return FundApiFp(this.configuration).listFundOperations(walletId, addressId, limit, page, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * MPCWalletStakeApi - axios parameter creator + * @export + */ +export const MPCWalletStakeApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Broadcast a staking operation. + * @summary Broadcast a staking operation + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address the staking operation belongs to. + * @param {string} stakingOperationId The ID of the staking operation to broadcast. + * @param {BroadcastStakingOperationRequest} broadcastStakingOperationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + broadcastStakingOperation: async (walletId: string, addressId: string, stakingOperationId: string, broadcastStakingOperationRequest: BroadcastStakingOperationRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'walletId' is not null or undefined + assertParamExists('broadcastStakingOperation', 'walletId', walletId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('broadcastStakingOperation', 'addressId', addressId) + // verify required parameter 'stakingOperationId' is not null or undefined + assertParamExists('broadcastStakingOperation', 'stakingOperationId', stakingOperationId) + // verify required parameter 'broadcastStakingOperationRequest' is not null or undefined + assertParamExists('broadcastStakingOperation', 'broadcastStakingOperationRequest', broadcastStakingOperationRequest) + const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/staking_operations/{staking_operation_id}/broadcast` + .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))) + .replace(`{${"staking_operation_id"}}`, encodeURIComponent(String(stakingOperationId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(broadcastStakingOperationRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Create a new staking operation. + * @summary Create a new staking operation for an address + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address to create the staking operation for. + * @param {CreateStakingOperationRequest} createStakingOperationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createStakingOperation: async (walletId: string, addressId: string, createStakingOperationRequest: CreateStakingOperationRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'walletId' is not null or undefined + assertParamExists('createStakingOperation', 'walletId', walletId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('createStakingOperation', 'addressId', addressId) + // verify required parameter 'createStakingOperationRequest' is not null or undefined + assertParamExists('createStakingOperation', 'createStakingOperationRequest', createStakingOperationRequest) + const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/staking_operations` + .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createStakingOperationRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get the latest state of a staking operation. + * @summary Get the latest state of a staking operation + * @param {string} walletId The ID of the wallet the address belongs to + * @param {string} addressId The ID of the address to fetch the staking operation for. + * @param {string} stakingOperationId The ID of the staking operation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStakingOperation: async (walletId: string, addressId: string, stakingOperationId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'walletId' is not null or undefined + assertParamExists('getStakingOperation', 'walletId', walletId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('getStakingOperation', 'addressId', addressId) + // verify required parameter 'stakingOperationId' is not null or undefined + assertParamExists('getStakingOperation', 'stakingOperationId', stakingOperationId) + const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/staking_operations/{staking_operation_id}` + .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))) + .replace(`{${"staking_operation_id"}}`, encodeURIComponent(String(stakingOperationId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * MPCWalletStakeApi - functional programming interface + * @export + */ +export const MPCWalletStakeApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = MPCWalletStakeApiAxiosParamCreator(configuration) + return { + /** + * Broadcast a staking operation. + * @summary Broadcast a staking operation + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address the staking operation belongs to. + * @param {string} stakingOperationId The ID of the staking operation to broadcast. + * @param {BroadcastStakingOperationRequest} broadcastStakingOperationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async broadcastStakingOperation(walletId: string, addressId: string, stakingOperationId: string, broadcastStakingOperationRequest: BroadcastStakingOperationRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.broadcastStakingOperation(walletId, addressId, stakingOperationId, broadcastStakingOperationRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['MPCWalletStakeApi.broadcastStakingOperation']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Create a new staking operation. + * @summary Create a new staking operation for an address + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address to create the staking operation for. + * @param {CreateStakingOperationRequest} createStakingOperationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createStakingOperation(walletId: string, addressId: string, createStakingOperationRequest: CreateStakingOperationRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createStakingOperation(walletId, addressId, createStakingOperationRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['MPCWalletStakeApi.createStakingOperation']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Get the latest state of a staking operation. + * @summary Get the latest state of a staking operation + * @param {string} walletId The ID of the wallet the address belongs to + * @param {string} addressId The ID of the address to fetch the staking operation for. + * @param {string} stakingOperationId The ID of the staking operation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStakingOperation(walletId: string, addressId: string, stakingOperationId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStakingOperation(walletId, addressId, stakingOperationId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['MPCWalletStakeApi.getStakingOperation']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * MPCWalletStakeApi - factory interface + * @export + */ +export const MPCWalletStakeApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = MPCWalletStakeApiFp(configuration) + return { + /** + * Broadcast a staking operation. + * @summary Broadcast a staking operation + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address the staking operation belongs to. + * @param {string} stakingOperationId The ID of the staking operation to broadcast. + * @param {BroadcastStakingOperationRequest} broadcastStakingOperationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + broadcastStakingOperation(walletId: string, addressId: string, stakingOperationId: string, broadcastStakingOperationRequest: BroadcastStakingOperationRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.broadcastStakingOperation(walletId, addressId, stakingOperationId, broadcastStakingOperationRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Create a new staking operation. + * @summary Create a new staking operation for an address + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address to create the staking operation for. + * @param {CreateStakingOperationRequest} createStakingOperationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createStakingOperation(walletId: string, addressId: string, createStakingOperationRequest: CreateStakingOperationRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.createStakingOperation(walletId, addressId, createStakingOperationRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Get the latest state of a staking operation. + * @summary Get the latest state of a staking operation + * @param {string} walletId The ID of the wallet the address belongs to + * @param {string} addressId The ID of the address to fetch the staking operation for. + * @param {string} stakingOperationId The ID of the staking operation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStakingOperation(walletId: string, addressId: string, stakingOperationId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getStakingOperation(walletId, addressId, stakingOperationId, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * MPCWalletStakeApi - interface + * @export + * @interface MPCWalletStakeApi + */ +export interface MPCWalletStakeApiInterface { + /** + * Broadcast a staking operation. + * @summary Broadcast a staking operation + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address the staking operation belongs to. + * @param {string} stakingOperationId The ID of the staking operation to broadcast. + * @param {BroadcastStakingOperationRequest} broadcastStakingOperationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MPCWalletStakeApiInterface + */ + broadcastStakingOperation(walletId: string, addressId: string, stakingOperationId: string, broadcastStakingOperationRequest: BroadcastStakingOperationRequest, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Create a new staking operation. + * @summary Create a new staking operation for an address + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address to create the staking operation for. + * @param {CreateStakingOperationRequest} createStakingOperationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MPCWalletStakeApiInterface + */ + createStakingOperation(walletId: string, addressId: string, createStakingOperationRequest: CreateStakingOperationRequest, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Get the latest state of a staking operation. + * @summary Get the latest state of a staking operation + * @param {string} walletId The ID of the wallet the address belongs to + * @param {string} addressId The ID of the address to fetch the staking operation for. + * @param {string} stakingOperationId The ID of the staking operation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MPCWalletStakeApiInterface + */ + getStakingOperation(walletId: string, addressId: string, stakingOperationId: string, options?: RawAxiosRequestConfig): AxiosPromise; + +} + +/** + * MPCWalletStakeApi - object-oriented interface + * @export + * @class MPCWalletStakeApi + * @extends {BaseAPI} + */ +export class MPCWalletStakeApi extends BaseAPI implements MPCWalletStakeApiInterface { + /** + * Broadcast a staking operation. + * @summary Broadcast a staking operation + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address the staking operation belongs to. + * @param {string} stakingOperationId The ID of the staking operation to broadcast. + * @param {BroadcastStakingOperationRequest} broadcastStakingOperationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MPCWalletStakeApi + */ + public broadcastStakingOperation(walletId: string, addressId: string, stakingOperationId: string, broadcastStakingOperationRequest: BroadcastStakingOperationRequest, options?: RawAxiosRequestConfig) { + return MPCWalletStakeApiFp(this.configuration).broadcastStakingOperation(walletId, addressId, stakingOperationId, broadcastStakingOperationRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Create a new staking operation. + * @summary Create a new staking operation for an address + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address to create the staking operation for. + * @param {CreateStakingOperationRequest} createStakingOperationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MPCWalletStakeApi + */ + public createStakingOperation(walletId: string, addressId: string, createStakingOperationRequest: CreateStakingOperationRequest, options?: RawAxiosRequestConfig) { + return MPCWalletStakeApiFp(this.configuration).createStakingOperation(walletId, addressId, createStakingOperationRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get the latest state of a staking operation. + * @summary Get the latest state of a staking operation + * @param {string} walletId The ID of the wallet the address belongs to + * @param {string} addressId The ID of the address to fetch the staking operation for. + * @param {string} stakingOperationId The ID of the staking operation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MPCWalletStakeApi + */ + public getStakingOperation(walletId: string, addressId: string, stakingOperationId: string, options?: RawAxiosRequestConfig) { + return MPCWalletStakeApiFp(this.configuration).getStakingOperation(walletId, addressId, stakingOperationId, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * NetworksApi - axios parameter creator + * @export + */ +export const NetworksApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Get network + * @summary Get network by ID + * @param {string} networkId The ID of the network to fetch. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getNetwork: async (networkId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'networkId' is not null or undefined + assertParamExists('getNetwork', 'networkId', networkId) + const localVarPath = `/v1/networks/{network_id}` + .replace(`{${"network_id"}}`, encodeURIComponent(String(networkId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * NetworksApi - functional programming interface + * @export + */ +export const NetworksApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = NetworksApiAxiosParamCreator(configuration) + return { + /** + * Get network + * @summary Get network by ID + * @param {string} networkId The ID of the network to fetch. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getNetwork(networkId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getNetwork(networkId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['NetworksApi.getNetwork']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * NetworksApi - factory interface + * @export + */ +export const NetworksApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = NetworksApiFp(configuration) + return { + /** + * Get network + * @summary Get network by ID + * @param {string} networkId The ID of the network to fetch. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getNetwork(networkId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getNetwork(networkId, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * NetworksApi - interface + * @export + * @interface NetworksApi + */ +export interface NetworksApiInterface { + /** + * Get network + * @summary Get network by ID + * @param {string} networkId The ID of the network to fetch. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof NetworksApiInterface + */ + getNetwork(networkId: string, options?: RawAxiosRequestConfig): AxiosPromise; + +} + +/** + * NetworksApi - object-oriented interface + * @export + * @class NetworksApi + * @extends {BaseAPI} + */ +export class NetworksApi extends BaseAPI implements NetworksApiInterface { + /** + * Get network + * @summary Get network by ID + * @param {string} networkId The ID of the network to fetch. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof NetworksApi + */ + public getNetwork(networkId: string, options?: RawAxiosRequestConfig) { + return NetworksApiFp(this.configuration).getNetwork(networkId, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * OnchainIdentityApi - axios parameter creator + * @export + */ +export const OnchainIdentityApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Obtains onchain identity for an address on a specific network + * @summary Obtains onchain identity for an address on a specific network + * @param {string} networkId The ID of the blockchain network + * @param {string} addressId The ID of the address to fetch the identity for + * @param {Array} [roles] A filter by role of the names related to this address (managed or owned) + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + resolveIdentityByAddress: async (networkId: string, addressId: string, roles?: Array, limit?: number, page?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'networkId' is not null or undefined + assertParamExists('resolveIdentityByAddress', 'networkId', networkId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('resolveIdentityByAddress', 'addressId', addressId) + const localVarPath = `/v1/networks/{network_id}/addresses/{address_id}/identity` + .replace(`{${"network_id"}}`, encodeURIComponent(String(networkId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + if (roles) { + localVarQueryParameter['roles'] = roles.join(COLLECTION_FORMATS.csv); + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * OnchainIdentityApi - functional programming interface + * @export + */ +export const OnchainIdentityApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = OnchainIdentityApiAxiosParamCreator(configuration) + return { + /** + * Obtains onchain identity for an address on a specific network + * @summary Obtains onchain identity for an address on a specific network + * @param {string} networkId The ID of the blockchain network + * @param {string} addressId The ID of the address to fetch the identity for + * @param {Array} [roles] A filter by role of the names related to this address (managed or owned) + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async resolveIdentityByAddress(networkId: string, addressId: string, roles?: Array, limit?: number, page?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.resolveIdentityByAddress(networkId, addressId, roles, limit, page, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OnchainIdentityApi.resolveIdentityByAddress']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * OnchainIdentityApi - factory interface + * @export + */ +export const OnchainIdentityApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = OnchainIdentityApiFp(configuration) + return { + /** + * Obtains onchain identity for an address on a specific network + * @summary Obtains onchain identity for an address on a specific network + * @param {string} networkId The ID of the blockchain network + * @param {string} addressId The ID of the address to fetch the identity for + * @param {Array} [roles] A filter by role of the names related to this address (managed or owned) + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + resolveIdentityByAddress(networkId: string, addressId: string, roles?: Array, limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.resolveIdentityByAddress(networkId, addressId, roles, limit, page, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * OnchainIdentityApi - interface + * @export + * @interface OnchainIdentityApi + */ +export interface OnchainIdentityApiInterface { + /** + * Obtains onchain identity for an address on a specific network + * @summary Obtains onchain identity for an address on a specific network + * @param {string} networkId The ID of the blockchain network + * @param {string} addressId The ID of the address to fetch the identity for + * @param {Array} [roles] A filter by role of the names related to this address (managed or owned) + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OnchainIdentityApiInterface + */ + resolveIdentityByAddress(networkId: string, addressId: string, roles?: Array, limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise; + +} + +/** + * OnchainIdentityApi - object-oriented interface + * @export + * @class OnchainIdentityApi + * @extends {BaseAPI} + */ +export class OnchainIdentityApi extends BaseAPI implements OnchainIdentityApiInterface { + /** + * Obtains onchain identity for an address on a specific network + * @summary Obtains onchain identity for an address on a specific network + * @param {string} networkId The ID of the blockchain network + * @param {string} addressId The ID of the address to fetch the identity for + * @param {Array} [roles] A filter by role of the names related to this address (managed or owned) + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OnchainIdentityApi + */ + public resolveIdentityByAddress(networkId: string, addressId: string, roles?: Array, limit?: number, page?: string, options?: RawAxiosRequestConfig) { + return OnchainIdentityApiFp(this.configuration).resolveIdentityByAddress(networkId, addressId, roles, limit, page, options).then((request) => request(this.axios, this.basePath)); + } +} + +/** + * @export + */ +export const ResolveIdentityByAddressRolesEnum = { + Managed: 'managed', + Owned: 'owned' +} as const; +export type ResolveIdentityByAddressRolesEnum = typeof ResolveIdentityByAddressRolesEnum[keyof typeof ResolveIdentityByAddressRolesEnum]; + + +/** + * ReputationApi - axios parameter creator + * @export + */ +export const ReputationApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Get the onchain reputation of an external address + * @summary Get the onchain reputation of an external address + * @param {string} networkId The ID of the blockchain network. + * @param {string} addressId The ID of the address to fetch the reputation for. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAddressReputation: async (networkId: string, addressId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'networkId' is not null or undefined + assertParamExists('getAddressReputation', 'networkId', networkId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('getAddressReputation', 'addressId', addressId) + const localVarPath = `/v1/networks/{network_id}/addresses/{address_id}/reputation` + .replace(`{${"network_id"}}`, encodeURIComponent(String(networkId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * ReputationApi - functional programming interface + * @export + */ +export const ReputationApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ReputationApiAxiosParamCreator(configuration) + return { + /** + * Get the onchain reputation of an external address + * @summary Get the onchain reputation of an external address + * @param {string} networkId The ID of the blockchain network. + * @param {string} addressId The ID of the address to fetch the reputation for. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getAddressReputation(networkId: string, addressId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAddressReputation(networkId, addressId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ReputationApi.getAddressReputation']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * ReputationApi - factory interface + * @export + */ +export const ReputationApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ReputationApiFp(configuration) + return { + /** + * Get the onchain reputation of an external address + * @summary Get the onchain reputation of an external address + * @param {string} networkId The ID of the blockchain network. + * @param {string} addressId The ID of the address to fetch the reputation for. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAddressReputation(networkId: string, addressId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getAddressReputation(networkId, addressId, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * ReputationApi - interface + * @export + * @interface ReputationApi + */ +export interface ReputationApiInterface { + /** + * Get the onchain reputation of an external address + * @summary Get the onchain reputation of an external address + * @param {string} networkId The ID of the blockchain network. + * @param {string} addressId The ID of the address to fetch the reputation for. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ReputationApiInterface + */ + getAddressReputation(networkId: string, addressId: string, options?: RawAxiosRequestConfig): AxiosPromise; + +} + +/** + * ReputationApi - object-oriented interface + * @export + * @class ReputationApi + * @extends {BaseAPI} + */ +export class ReputationApi extends BaseAPI implements ReputationApiInterface { + /** + * Get the onchain reputation of an external address + * @summary Get the onchain reputation of an external address + * @param {string} networkId The ID of the blockchain network. + * @param {string} addressId The ID of the address to fetch the reputation for. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ReputationApi + */ + public getAddressReputation(networkId: string, addressId: string, options?: RawAxiosRequestConfig) { + return ReputationApiFp(this.configuration).getAddressReputation(networkId, addressId, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * ServerSignersApi - axios parameter creator + * @export + */ +export const ServerSignersApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create a new Server-Signer + * @summary Create a new Server-Signer + * @param {CreateServerSignerRequest} [createServerSignerRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createServerSigner: async (createServerSignerRequest?: CreateServerSignerRequest, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/server_signers`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createServerSignerRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get a server signer by ID + * @summary Get a server signer by ID + * @param {string} serverSignerId The ID of the server signer to fetch + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getServerSigner: async (serverSignerId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'serverSignerId' is not null or undefined + assertParamExists('getServerSigner', 'serverSignerId', serverSignerId) + const localVarPath = `/v1/server_signers/{server_signer_id}` + .replace(`{${"server_signer_id"}}`, encodeURIComponent(String(serverSignerId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * List events for a server signer + * @summary List events for a server signer + * @param {string} serverSignerId The ID of the server signer to fetch events for + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + listServerSignerEvents: async (serverSignerId: string, limit?: number, page?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'serverSignerId' is not null or undefined + assertParamExists('listServerSignerEvents', 'serverSignerId', serverSignerId) + const localVarPath = `/v1/server_signers/{server_signer_id}/events` + .replace(`{${"server_signer_id"}}`, encodeURIComponent(String(serverSignerId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * List server signers for the current project + * @summary List server signers for the current project + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listServerSigners: async (limit?: number, page?: string, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/server_signers`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Submit the result of a server signer event + * @summary Submit the result of a server signer event + * @param {string} serverSignerId The ID of the server signer to submit the event result for + * @param {SeedCreationEventResult} [seedCreationEventResult] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + submitServerSignerSeedEventResult: async (serverSignerId: string, seedCreationEventResult?: SeedCreationEventResult, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'serverSignerId' is not null or undefined + assertParamExists('submitServerSignerSeedEventResult', 'serverSignerId', serverSignerId) + const localVarPath = `/v1/server_signers/{server_signer_id}/seed_event_result` + .replace(`{${"server_signer_id"}}`, encodeURIComponent(String(serverSignerId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(seedCreationEventResult, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Submit the result of a server signer event + * @summary Submit the result of a server signer event + * @param {string} serverSignerId The ID of the server signer to submit the event result for + * @param {SignatureCreationEventResult} [signatureCreationEventResult] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + submitServerSignerSignatureEventResult: async (serverSignerId: string, signatureCreationEventResult?: SignatureCreationEventResult, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'serverSignerId' is not null or undefined + assertParamExists('submitServerSignerSignatureEventResult', 'serverSignerId', serverSignerId) + const localVarPath = `/v1/server_signers/{server_signer_id}/signature_event_result` + .replace(`{${"server_signer_id"}}`, encodeURIComponent(String(serverSignerId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(signatureCreationEventResult, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * ServerSignersApi - functional programming interface + * @export + */ +export const ServerSignersApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ServerSignersApiAxiosParamCreator(configuration) + return { + /** + * Create a new Server-Signer + * @summary Create a new Server-Signer + * @param {CreateServerSignerRequest} [createServerSignerRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createServerSigner(createServerSignerRequest?: CreateServerSignerRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createServerSigner(createServerSignerRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ServerSignersApi.createServerSigner']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Get a server signer by ID + * @summary Get a server signer by ID + * @param {string} serverSignerId The ID of the server signer to fetch + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getServerSigner(serverSignerId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getServerSigner(serverSignerId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ServerSignersApi.getServerSigner']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * List events for a server signer + * @summary List events for a server signer + * @param {string} serverSignerId The ID of the server signer to fetch events for + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + async listServerSignerEvents(serverSignerId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listServerSignerEvents(serverSignerId, limit, page, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ServerSignersApi.listServerSignerEvents']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * List server signers for the current project + * @summary List server signers for the current project + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listServerSigners(limit?: number, page?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listServerSigners(limit, page, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ServerSignersApi.listServerSigners']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Submit the result of a server signer event + * @summary Submit the result of a server signer event + * @param {string} serverSignerId The ID of the server signer to submit the event result for + * @param {SeedCreationEventResult} [seedCreationEventResult] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async submitServerSignerSeedEventResult(serverSignerId: string, seedCreationEventResult?: SeedCreationEventResult, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.submitServerSignerSeedEventResult(serverSignerId, seedCreationEventResult, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ServerSignersApi.submitServerSignerSeedEventResult']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Submit the result of a server signer event + * @summary Submit the result of a server signer event + * @param {string} serverSignerId The ID of the server signer to submit the event result for + * @param {SignatureCreationEventResult} [signatureCreationEventResult] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async submitServerSignerSignatureEventResult(serverSignerId: string, signatureCreationEventResult?: SignatureCreationEventResult, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.submitServerSignerSignatureEventResult(serverSignerId, signatureCreationEventResult, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ServerSignersApi.submitServerSignerSignatureEventResult']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * ServerSignersApi - factory interface + * @export + */ +export const ServerSignersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ServerSignersApiFp(configuration) + return { + /** + * Create a new Server-Signer + * @summary Create a new Server-Signer + * @param {CreateServerSignerRequest} [createServerSignerRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createServerSigner(createServerSignerRequest?: CreateServerSignerRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.createServerSigner(createServerSignerRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Get a server signer by ID + * @summary Get a server signer by ID + * @param {string} serverSignerId The ID of the server signer to fetch + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getServerSigner(serverSignerId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getServerSigner(serverSignerId, options).then((request) => request(axios, basePath)); + }, + /** + * List events for a server signer + * @summary List events for a server signer + * @param {string} serverSignerId The ID of the server signer to fetch events for + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + listServerSignerEvents(serverSignerId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listServerSignerEvents(serverSignerId, limit, page, options).then((request) => request(axios, basePath)); + }, + /** + * List server signers for the current project + * @summary List server signers for the current project + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listServerSigners(limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listServerSigners(limit, page, options).then((request) => request(axios, basePath)); + }, + /** + * Submit the result of a server signer event + * @summary Submit the result of a server signer event + * @param {string} serverSignerId The ID of the server signer to submit the event result for + * @param {SeedCreationEventResult} [seedCreationEventResult] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + submitServerSignerSeedEventResult(serverSignerId: string, seedCreationEventResult?: SeedCreationEventResult, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.submitServerSignerSeedEventResult(serverSignerId, seedCreationEventResult, options).then((request) => request(axios, basePath)); + }, + /** + * Submit the result of a server signer event + * @summary Submit the result of a server signer event + * @param {string} serverSignerId The ID of the server signer to submit the event result for + * @param {SignatureCreationEventResult} [signatureCreationEventResult] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + submitServerSignerSignatureEventResult(serverSignerId: string, signatureCreationEventResult?: SignatureCreationEventResult, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.submitServerSignerSignatureEventResult(serverSignerId, signatureCreationEventResult, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * ServerSignersApi - interface + * @export + * @interface ServerSignersApi + */ +export interface ServerSignersApiInterface { + /** + * Create a new Server-Signer + * @summary Create a new Server-Signer + * @param {CreateServerSignerRequest} [createServerSignerRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ServerSignersApiInterface + */ + createServerSigner(createServerSignerRequest?: CreateServerSignerRequest, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Get a server signer by ID + * @summary Get a server signer by ID + * @param {string} serverSignerId The ID of the server signer to fetch + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ServerSignersApiInterface + */ + getServerSigner(serverSignerId: string, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * List events for a server signer + * @summary List events for a server signer + * @param {string} serverSignerId The ID of the server signer to fetch events for + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + * @memberof ServerSignersApiInterface + */ + listServerSignerEvents(serverSignerId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * List server signers for the current project + * @summary List server signers for the current project + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ServerSignersApiInterface + */ + listServerSigners(limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Submit the result of a server signer event + * @summary Submit the result of a server signer event + * @param {string} serverSignerId The ID of the server signer to submit the event result for + * @param {SeedCreationEventResult} [seedCreationEventResult] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ServerSignersApiInterface + */ + submitServerSignerSeedEventResult(serverSignerId: string, seedCreationEventResult?: SeedCreationEventResult, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Submit the result of a server signer event + * @summary Submit the result of a server signer event + * @param {string} serverSignerId The ID of the server signer to submit the event result for + * @param {SignatureCreationEventResult} [signatureCreationEventResult] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ServerSignersApiInterface + */ + submitServerSignerSignatureEventResult(serverSignerId: string, signatureCreationEventResult?: SignatureCreationEventResult, options?: RawAxiosRequestConfig): AxiosPromise; + +} + +/** + * ServerSignersApi - object-oriented interface + * @export + * @class ServerSignersApi + * @extends {BaseAPI} + */ +export class ServerSignersApi extends BaseAPI implements ServerSignersApiInterface { + /** + * Create a new Server-Signer + * @summary Create a new Server-Signer + * @param {CreateServerSignerRequest} [createServerSignerRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ServerSignersApi + */ + public createServerSigner(createServerSignerRequest?: CreateServerSignerRequest, options?: RawAxiosRequestConfig) { + return ServerSignersApiFp(this.configuration).createServerSigner(createServerSignerRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get a server signer by ID + * @summary Get a server signer by ID + * @param {string} serverSignerId The ID of the server signer to fetch + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ServerSignersApi + */ + public getServerSigner(serverSignerId: string, options?: RawAxiosRequestConfig) { + return ServerSignersApiFp(this.configuration).getServerSigner(serverSignerId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * List events for a server signer + * @summary List events for a server signer + * @param {string} serverSignerId The ID of the server signer to fetch events for + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + * @memberof ServerSignersApi + */ + public listServerSignerEvents(serverSignerId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig) { + return ServerSignersApiFp(this.configuration).listServerSignerEvents(serverSignerId, limit, page, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * List server signers for the current project + * @summary List server signers for the current project + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ServerSignersApi + */ + public listServerSigners(limit?: number, page?: string, options?: RawAxiosRequestConfig) { + return ServerSignersApiFp(this.configuration).listServerSigners(limit, page, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Submit the result of a server signer event + * @summary Submit the result of a server signer event + * @param {string} serverSignerId The ID of the server signer to submit the event result for + * @param {SeedCreationEventResult} [seedCreationEventResult] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ServerSignersApi + */ + public submitServerSignerSeedEventResult(serverSignerId: string, seedCreationEventResult?: SeedCreationEventResult, options?: RawAxiosRequestConfig) { + return ServerSignersApiFp(this.configuration).submitServerSignerSeedEventResult(serverSignerId, seedCreationEventResult, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Submit the result of a server signer event + * @summary Submit the result of a server signer event + * @param {string} serverSignerId The ID of the server signer to submit the event result for + * @param {SignatureCreationEventResult} [signatureCreationEventResult] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ServerSignersApi + */ + public submitServerSignerSignatureEventResult(serverSignerId: string, signatureCreationEventResult?: SignatureCreationEventResult, options?: RawAxiosRequestConfig) { + return ServerSignersApiFp(this.configuration).submitServerSignerSignatureEventResult(serverSignerId, signatureCreationEventResult, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * SmartContractsApi - axios parameter creator + * @export + */ +export const SmartContractsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Compile a smart contract + * @summary Compile a smart contract + * @param {CompileSmartContractRequest} compileSmartContractRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + compileSmartContract: async (compileSmartContractRequest: CompileSmartContractRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'compileSmartContractRequest' is not null or undefined + assertParamExists('compileSmartContract', 'compileSmartContractRequest', compileSmartContractRequest) + const localVarPath = `/v1/smart_contracts/compile`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(compileSmartContractRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Create a new smart contract + * @summary Create a new smart contract + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address to deploy the smart contract from. + * @param {CreateSmartContractRequest} createSmartContractRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createSmartContract: async (walletId: string, addressId: string, createSmartContractRequest: CreateSmartContractRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'walletId' is not null or undefined + assertParamExists('createSmartContract', 'walletId', walletId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('createSmartContract', 'addressId', addressId) + // verify required parameter 'createSmartContractRequest' is not null or undefined + assertParamExists('createSmartContract', 'createSmartContractRequest', createSmartContractRequest) + const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/smart_contracts` + .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createSmartContractRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Deploys a smart contract, by broadcasting the transaction to the network. + * @summary Deploy a smart contract + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address to broadcast the transaction from. + * @param {string} smartContractId The UUID of the smart contract to broadcast the transaction to. + * @param {DeploySmartContractRequest} deploySmartContractRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deploySmartContract: async (walletId: string, addressId: string, smartContractId: string, deploySmartContractRequest: DeploySmartContractRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'walletId' is not null or undefined + assertParamExists('deploySmartContract', 'walletId', walletId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('deploySmartContract', 'addressId', addressId) + // verify required parameter 'smartContractId' is not null or undefined + assertParamExists('deploySmartContract', 'smartContractId', smartContractId) + // verify required parameter 'deploySmartContractRequest' is not null or undefined + assertParamExists('deploySmartContract', 'deploySmartContractRequest', deploySmartContractRequest) + const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/smart_contracts/{smart_contract_id}/deploy` + .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))) + .replace(`{${"smart_contract_id"}}`, encodeURIComponent(String(smartContractId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(deploySmartContractRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get a specific smart contract deployed by address. + * @summary Get a specific smart contract deployed by address + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address to fetch the smart contract for. + * @param {string} smartContractId The UUID of the smart contract to fetch. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSmartContract: async (walletId: string, addressId: string, smartContractId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'walletId' is not null or undefined + assertParamExists('getSmartContract', 'walletId', walletId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('getSmartContract', 'addressId', addressId) + // verify required parameter 'smartContractId' is not null or undefined + assertParamExists('getSmartContract', 'smartContractId', smartContractId) + const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/smart_contracts/{smart_contract_id}` + .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))) + .replace(`{${"smart_contract_id"}}`, encodeURIComponent(String(smartContractId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * List smart contracts + * @summary List smart contracts + * @param {string} [page] Pagination token for retrieving the next set of results + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listSmartContracts: async (page?: string, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/smart_contracts`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Perform a read operation on a smart contract without creating a transaction + * @summary Read data from a smart contract + * @param {string} networkId + * @param {string} contractAddress + * @param {ReadContractRequest} readContractRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + readContract: async (networkId: string, contractAddress: string, readContractRequest: ReadContractRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'networkId' is not null or undefined + assertParamExists('readContract', 'networkId', networkId) + // verify required parameter 'contractAddress' is not null or undefined + assertParamExists('readContract', 'contractAddress', contractAddress) + // verify required parameter 'readContractRequest' is not null or undefined + assertParamExists('readContract', 'readContractRequest', readContractRequest) + const localVarPath = `/v1/networks/{network_id}/smart_contracts/{contract_address}/read` + .replace(`{${"network_id"}}`, encodeURIComponent(String(networkId))) + .replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(readContractRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Register a smart contract + * @summary Register a smart contract + * @param {string} networkId The ID of the network to fetch. + * @param {string} contractAddress EVM address of the smart contract (42 characters, including \'0x\', in lowercase) + * @param {RegisterSmartContractRequest} [registerSmartContractRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + registerSmartContract: async (networkId: string, contractAddress: string, registerSmartContractRequest?: RegisterSmartContractRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'networkId' is not null or undefined + assertParamExists('registerSmartContract', 'networkId', networkId) + // verify required parameter 'contractAddress' is not null or undefined + assertParamExists('registerSmartContract', 'contractAddress', contractAddress) + const localVarPath = `/v1/networks/{network_id}/smart_contracts/{contract_address}/register` + .replace(`{${"network_id"}}`, encodeURIComponent(String(networkId))) + .replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(registerSmartContractRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Update a smart contract + * @summary Update a smart contract + * @param {string} networkId The ID of the network to fetch. + * @param {string} contractAddress EVM address of the smart contract (42 characters, including \'0x\', in lowercase) + * @param {UpdateSmartContractRequest} [updateSmartContractRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateSmartContract: async (networkId: string, contractAddress: string, updateSmartContractRequest?: UpdateSmartContractRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'networkId' is not null or undefined + assertParamExists('updateSmartContract', 'networkId', networkId) + // verify required parameter 'contractAddress' is not null or undefined + assertParamExists('updateSmartContract', 'contractAddress', contractAddress) + const localVarPath = `/v1/networks/{network_id}/smart_contracts/{contract_address}` + .replace(`{${"network_id"}}`, encodeURIComponent(String(networkId))) + .replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(updateSmartContractRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * SmartContractsApi - functional programming interface + * @export + */ +export const SmartContractsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = SmartContractsApiAxiosParamCreator(configuration) + return { + /** + * Compile a smart contract + * @summary Compile a smart contract + * @param {CompileSmartContractRequest} compileSmartContractRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async compileSmartContract(compileSmartContractRequest: CompileSmartContractRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.compileSmartContract(compileSmartContractRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SmartContractsApi.compileSmartContract']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Create a new smart contract + * @summary Create a new smart contract + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address to deploy the smart contract from. + * @param {CreateSmartContractRequest} createSmartContractRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createSmartContract(walletId: string, addressId: string, createSmartContractRequest: CreateSmartContractRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createSmartContract(walletId, addressId, createSmartContractRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SmartContractsApi.createSmartContract']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Deploys a smart contract, by broadcasting the transaction to the network. + * @summary Deploy a smart contract + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address to broadcast the transaction from. + * @param {string} smartContractId The UUID of the smart contract to broadcast the transaction to. + * @param {DeploySmartContractRequest} deploySmartContractRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deploySmartContract(walletId: string, addressId: string, smartContractId: string, deploySmartContractRequest: DeploySmartContractRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deploySmartContract(walletId, addressId, smartContractId, deploySmartContractRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SmartContractsApi.deploySmartContract']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Get a specific smart contract deployed by address. + * @summary Get a specific smart contract deployed by address + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address to fetch the smart contract for. + * @param {string} smartContractId The UUID of the smart contract to fetch. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSmartContract(walletId: string, addressId: string, smartContractId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSmartContract(walletId, addressId, smartContractId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SmartContractsApi.getSmartContract']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * List smart contracts + * @summary List smart contracts + * @param {string} [page] Pagination token for retrieving the next set of results + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listSmartContracts(page?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listSmartContracts(page, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SmartContractsApi.listSmartContracts']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Perform a read operation on a smart contract without creating a transaction + * @summary Read data from a smart contract + * @param {string} networkId + * @param {string} contractAddress + * @param {ReadContractRequest} readContractRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async readContract(networkId: string, contractAddress: string, readContractRequest: ReadContractRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.readContract(networkId, contractAddress, readContractRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SmartContractsApi.readContract']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Register a smart contract + * @summary Register a smart contract + * @param {string} networkId The ID of the network to fetch. + * @param {string} contractAddress EVM address of the smart contract (42 characters, including \'0x\', in lowercase) + * @param {RegisterSmartContractRequest} [registerSmartContractRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async registerSmartContract(networkId: string, contractAddress: string, registerSmartContractRequest?: RegisterSmartContractRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.registerSmartContract(networkId, contractAddress, registerSmartContractRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SmartContractsApi.registerSmartContract']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Update a smart contract + * @summary Update a smart contract + * @param {string} networkId The ID of the network to fetch. + * @param {string} contractAddress EVM address of the smart contract (42 characters, including \'0x\', in lowercase) + * @param {UpdateSmartContractRequest} [updateSmartContractRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateSmartContract(networkId: string, contractAddress: string, updateSmartContractRequest?: UpdateSmartContractRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateSmartContract(networkId, contractAddress, updateSmartContractRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SmartContractsApi.updateSmartContract']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * SmartContractsApi - factory interface + * @export + */ +export const SmartContractsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = SmartContractsApiFp(configuration) + return { + /** + * Compile a smart contract + * @summary Compile a smart contract + * @param {CompileSmartContractRequest} compileSmartContractRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + compileSmartContract(compileSmartContractRequest: CompileSmartContractRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.compileSmartContract(compileSmartContractRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Create a new smart contract + * @summary Create a new smart contract + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address to deploy the smart contract from. + * @param {CreateSmartContractRequest} createSmartContractRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createSmartContract(walletId: string, addressId: string, createSmartContractRequest: CreateSmartContractRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.createSmartContract(walletId, addressId, createSmartContractRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Deploys a smart contract, by broadcasting the transaction to the network. + * @summary Deploy a smart contract + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address to broadcast the transaction from. + * @param {string} smartContractId The UUID of the smart contract to broadcast the transaction to. + * @param {DeploySmartContractRequest} deploySmartContractRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deploySmartContract(walletId: string, addressId: string, smartContractId: string, deploySmartContractRequest: DeploySmartContractRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.deploySmartContract(walletId, addressId, smartContractId, deploySmartContractRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Get a specific smart contract deployed by address. + * @summary Get a specific smart contract deployed by address + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address to fetch the smart contract for. + * @param {string} smartContractId The UUID of the smart contract to fetch. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSmartContract(walletId: string, addressId: string, smartContractId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getSmartContract(walletId, addressId, smartContractId, options).then((request) => request(axios, basePath)); + }, + /** + * List smart contracts + * @summary List smart contracts + * @param {string} [page] Pagination token for retrieving the next set of results + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listSmartContracts(page?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listSmartContracts(page, options).then((request) => request(axios, basePath)); + }, + /** + * Perform a read operation on a smart contract without creating a transaction + * @summary Read data from a smart contract + * @param {string} networkId + * @param {string} contractAddress + * @param {ReadContractRequest} readContractRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + readContract(networkId: string, contractAddress: string, readContractRequest: ReadContractRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.readContract(networkId, contractAddress, readContractRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Register a smart contract + * @summary Register a smart contract + * @param {string} networkId The ID of the network to fetch. + * @param {string} contractAddress EVM address of the smart contract (42 characters, including \'0x\', in lowercase) + * @param {RegisterSmartContractRequest} [registerSmartContractRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + registerSmartContract(networkId: string, contractAddress: string, registerSmartContractRequest?: RegisterSmartContractRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.registerSmartContract(networkId, contractAddress, registerSmartContractRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Update a smart contract + * @summary Update a smart contract + * @param {string} networkId The ID of the network to fetch. + * @param {string} contractAddress EVM address of the smart contract (42 characters, including \'0x\', in lowercase) + * @param {UpdateSmartContractRequest} [updateSmartContractRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateSmartContract(networkId: string, contractAddress: string, updateSmartContractRequest?: UpdateSmartContractRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.updateSmartContract(networkId, contractAddress, updateSmartContractRequest, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * SmartContractsApi - interface + * @export + * @interface SmartContractsApi + */ +export interface SmartContractsApiInterface { + /** + * Compile a smart contract + * @summary Compile a smart contract + * @param {CompileSmartContractRequest} compileSmartContractRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SmartContractsApiInterface */ - 'next_page': string; + compileSmartContract(compileSmartContractRequest: CompileSmartContractRequest, options?: RawAxiosRequestConfig): AxiosPromise; + /** - * The total number of wallets - * @type {number} - * @memberof WalletList + * Create a new smart contract + * @summary Create a new smart contract + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address to deploy the smart contract from. + * @param {CreateSmartContractRequest} createSmartContractRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SmartContractsApiInterface */ - 'total_count': number; + createSmartContract(walletId: string, addressId: string, createSmartContractRequest: CreateSmartContractRequest, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Deploys a smart contract, by broadcasting the transaction to the network. + * @summary Deploy a smart contract + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address to broadcast the transaction from. + * @param {string} smartContractId The UUID of the smart contract to broadcast the transaction to. + * @param {DeploySmartContractRequest} deploySmartContractRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SmartContractsApiInterface + */ + deploySmartContract(walletId: string, addressId: string, smartContractId: string, deploySmartContractRequest: DeploySmartContractRequest, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Get a specific smart contract deployed by address. + * @summary Get a specific smart contract deployed by address + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address to fetch the smart contract for. + * @param {string} smartContractId The UUID of the smart contract to fetch. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SmartContractsApiInterface + */ + getSmartContract(walletId: string, addressId: string, smartContractId: string, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * List smart contracts + * @summary List smart contracts + * @param {string} [page] Pagination token for retrieving the next set of results + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SmartContractsApiInterface + */ + listSmartContracts(page?: string, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Perform a read operation on a smart contract without creating a transaction + * @summary Read data from a smart contract + * @param {string} networkId + * @param {string} contractAddress + * @param {ReadContractRequest} readContractRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SmartContractsApiInterface + */ + readContract(networkId: string, contractAddress: string, readContractRequest: ReadContractRequest, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Register a smart contract + * @summary Register a smart contract + * @param {string} networkId The ID of the network to fetch. + * @param {string} contractAddress EVM address of the smart contract (42 characters, including \'0x\', in lowercase) + * @param {RegisterSmartContractRequest} [registerSmartContractRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SmartContractsApiInterface + */ + registerSmartContract(networkId: string, contractAddress: string, registerSmartContractRequest?: RegisterSmartContractRequest, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Update a smart contract + * @summary Update a smart contract + * @param {string} networkId The ID of the network to fetch. + * @param {string} contractAddress EVM address of the smart contract (42 characters, including \'0x\', in lowercase) + * @param {UpdateSmartContractRequest} [updateSmartContractRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SmartContractsApiInterface + */ + updateSmartContract(networkId: string, contractAddress: string, updateSmartContractRequest?: UpdateSmartContractRequest, options?: RawAxiosRequestConfig): AxiosPromise; + } /** - * AddressesApi - axios parameter creator + * SmartContractsApi - object-oriented interface * @export + * @class SmartContractsApi + * @extends {BaseAPI} */ -export const AddressesApiAxiosParamCreator = function (configuration?: Configuration) { +export class SmartContractsApi extends BaseAPI implements SmartContractsApiInterface { + /** + * Compile a smart contract + * @summary Compile a smart contract + * @param {CompileSmartContractRequest} compileSmartContractRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SmartContractsApi + */ + public compileSmartContract(compileSmartContractRequest: CompileSmartContractRequest, options?: RawAxiosRequestConfig) { + return SmartContractsApiFp(this.configuration).compileSmartContract(compileSmartContractRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Create a new smart contract + * @summary Create a new smart contract + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address to deploy the smart contract from. + * @param {CreateSmartContractRequest} createSmartContractRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SmartContractsApi + */ + public createSmartContract(walletId: string, addressId: string, createSmartContractRequest: CreateSmartContractRequest, options?: RawAxiosRequestConfig) { + return SmartContractsApiFp(this.configuration).createSmartContract(walletId, addressId, createSmartContractRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Deploys a smart contract, by broadcasting the transaction to the network. + * @summary Deploy a smart contract + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address to broadcast the transaction from. + * @param {string} smartContractId The UUID of the smart contract to broadcast the transaction to. + * @param {DeploySmartContractRequest} deploySmartContractRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SmartContractsApi + */ + public deploySmartContract(walletId: string, addressId: string, smartContractId: string, deploySmartContractRequest: DeploySmartContractRequest, options?: RawAxiosRequestConfig) { + return SmartContractsApiFp(this.configuration).deploySmartContract(walletId, addressId, smartContractId, deploySmartContractRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get a specific smart contract deployed by address. + * @summary Get a specific smart contract deployed by address + * @param {string} walletId The ID of the wallet the address belongs to. + * @param {string} addressId The ID of the address to fetch the smart contract for. + * @param {string} smartContractId The UUID of the smart contract to fetch. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SmartContractsApi + */ + public getSmartContract(walletId: string, addressId: string, smartContractId: string, options?: RawAxiosRequestConfig) { + return SmartContractsApiFp(this.configuration).getSmartContract(walletId, addressId, smartContractId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * List smart contracts + * @summary List smart contracts + * @param {string} [page] Pagination token for retrieving the next set of results + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SmartContractsApi + */ + public listSmartContracts(page?: string, options?: RawAxiosRequestConfig) { + return SmartContractsApiFp(this.configuration).listSmartContracts(page, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Perform a read operation on a smart contract without creating a transaction + * @summary Read data from a smart contract + * @param {string} networkId + * @param {string} contractAddress + * @param {ReadContractRequest} readContractRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SmartContractsApi + */ + public readContract(networkId: string, contractAddress: string, readContractRequest: ReadContractRequest, options?: RawAxiosRequestConfig) { + return SmartContractsApiFp(this.configuration).readContract(networkId, contractAddress, readContractRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Register a smart contract + * @summary Register a smart contract + * @param {string} networkId The ID of the network to fetch. + * @param {string} contractAddress EVM address of the smart contract (42 characters, including \'0x\', in lowercase) + * @param {RegisterSmartContractRequest} [registerSmartContractRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SmartContractsApi + */ + public registerSmartContract(networkId: string, contractAddress: string, registerSmartContractRequest?: RegisterSmartContractRequest, options?: RawAxiosRequestConfig) { + return SmartContractsApiFp(this.configuration).registerSmartContract(networkId, contractAddress, registerSmartContractRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Update a smart contract + * @summary Update a smart contract + * @param {string} networkId The ID of the network to fetch. + * @param {string} contractAddress EVM address of the smart contract (42 characters, including \'0x\', in lowercase) + * @param {UpdateSmartContractRequest} [updateSmartContractRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SmartContractsApi + */ + public updateSmartContract(networkId: string, contractAddress: string, updateSmartContractRequest?: UpdateSmartContractRequest, options?: RawAxiosRequestConfig) { + return SmartContractsApiFp(this.configuration).updateSmartContract(networkId, contractAddress, updateSmartContractRequest, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * SmartWalletsApi - axios parameter creator + * @export + */ +export const SmartWalletsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * Create a new address scoped to the wallet. - * @summary Create a new address - * @param {string} walletId The ID of the wallet to create the address in. - * @param {CreateAddressRequest} [createAddressRequest] + * Broadcast a user operation + * @summary Broadcast a user operation + * @param {string} smartWalletAddress The address of the smart wallet to broadcast the user operation from. + * @param {string} userOpHash The hash of the user operation to broadcast + * @param {BroadcastUserOperationRequest} [broadcastUserOperationRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createAddress: async (walletId: string, createAddressRequest?: CreateAddressRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'walletId' is not null or undefined - assertParamExists('createAddress', 'walletId', walletId) - const localVarPath = `/v1/wallets/{wallet_id}/addresses` - .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))); + broadcastUserOperation: async (smartWalletAddress: string, userOpHash: string, broadcastUserOperationRequest?: BroadcastUserOperationRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'smartWalletAddress' is not null or undefined + assertParamExists('broadcastUserOperation', 'smartWalletAddress', smartWalletAddress) + // verify required parameter 'userOpHash' is not null or undefined + assertParamExists('broadcastUserOperation', 'userOpHash', userOpHash) + const localVarPath = `/v1/smart_wallets/{smart_wallet_address}/user_operations/{user_op_hash}/broadcast` + .replace(`{${"smart_wallet_address"}}`, encodeURIComponent(String(smartWalletAddress))) + .replace(`{${"user_op_hash"}}`, encodeURIComponent(String(userOpHash))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -1325,6 +10023,9 @@ export const AddressesApiAxiosParamCreator = function (configuration?: Configura const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -1332,7 +10033,7 @@ export const AddressesApiAxiosParamCreator = function (configuration?: Configura setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(createAddressRequest, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(broadcastUserOperationRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -1340,21 +10041,14 @@ export const AddressesApiAxiosParamCreator = function (configuration?: Configura }; }, /** - * Get address - * @summary Get address by onchain address - * @param {string} walletId The ID of the wallet the address belongs to. - * @param {string} addressId The onchain address of the address that is being fetched. + * Create a new smart wallet, not scoped to a given network. + * @summary Create a new smart wallet + * @param {CreateSmartWalletRequest} [createSmartWalletRequest] * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getAddress: async (walletId: string, addressId: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'walletId' is not null or undefined - assertParamExists('getAddress', 'walletId', walletId) - // verify required parameter 'addressId' is not null or undefined - assertParamExists('getAddress', 'addressId', addressId) - const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}` - .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) - .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))); + * @throws {RequiredError} + */ + createSmartWallet: async (createSmartWalletRequest?: CreateSmartWalletRequest, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/smart_wallets`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -1362,15 +10056,21 @@ export const AddressesApiAxiosParamCreator = function (configuration?: Configura baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createSmartWalletRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -1378,25 +10078,22 @@ export const AddressesApiAxiosParamCreator = function (configuration?: Configura }; }, /** - * Get address balance - * @summary Get address balance for asset - * @param {string} walletId The ID of the wallet to fetch the balance for - * @param {string} addressId The onchain address of the address that is being fetched. - * @param {string} assetId The symbol of the asset to fetch the balance for + * Create a new user operation on a smart wallet. + * @summary Create a new user operation + * @param {string} smartWalletAddress The address of the smart wallet to create the user operation on. + * @param {string} networkId The ID of the network to create the user operation on. + * @param {CreateUserOperationRequest} [createUserOperationRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAddressBalance: async (walletId: string, addressId: string, assetId: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'walletId' is not null or undefined - assertParamExists('getAddressBalance', 'walletId', walletId) - // verify required parameter 'addressId' is not null or undefined - assertParamExists('getAddressBalance', 'addressId', addressId) - // verify required parameter 'assetId' is not null or undefined - assertParamExists('getAddressBalance', 'assetId', assetId) - const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/balances/{asset_id}` - .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) - .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))) - .replace(`{${"asset_id"}}`, encodeURIComponent(String(assetId))); + createUserOperation: async (smartWalletAddress: string, networkId: string, createUserOperationRequest?: CreateUserOperationRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'smartWalletAddress' is not null or undefined + assertParamExists('createUserOperation', 'smartWalletAddress', smartWalletAddress) + // verify required parameter 'networkId' is not null or undefined + assertParamExists('createUserOperation', 'networkId', networkId) + const localVarPath = `/v1/smart_wallets/{smart_wallet_address}/networks/{network_id}/user_operations` + .replace(`{${"smart_wallet_address"}}`, encodeURIComponent(String(smartWalletAddress))) + .replace(`{${"network_id"}}`, encodeURIComponent(String(networkId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -1404,15 +10101,21 @@ export const AddressesApiAxiosParamCreator = function (configuration?: Configura baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createUserOperationRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -1420,22 +10123,17 @@ export const AddressesApiAxiosParamCreator = function (configuration?: Configura }; }, /** - * Get address balances - * @summary Get all balances for address - * @param {string} walletId The ID of the wallet to fetch the balances for - * @param {string} addressId The onchain address of the address that is being fetched. - * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * Get smart wallet + * @summary Get smart wallet by address + * @param {string} smartWalletAddress The address of that smart wallet to fetch. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listAddressBalances: async (walletId: string, addressId: string, page?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'walletId' is not null or undefined - assertParamExists('listAddressBalances', 'walletId', walletId) - // verify required parameter 'addressId' is not null or undefined - assertParamExists('listAddressBalances', 'addressId', addressId) - const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/balances` - .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) - .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))); + getSmartWallet: async (smartWalletAddress: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'smartWalletAddress' is not null or undefined + assertParamExists('getSmartWallet', 'smartWalletAddress', smartWalletAddress) + const localVarPath = `/v1/smart_wallets/{smart_wallet_address}` + .replace(`{${"smart_wallet_address"}}`, encodeURIComponent(String(smartWalletAddress))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -1447,9 +10145,11 @@ export const AddressesApiAxiosParamCreator = function (configuration?: Configura const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) @@ -1463,19 +10163,21 @@ export const AddressesApiAxiosParamCreator = function (configuration?: Configura }; }, /** - * List addresses in the wallet. - * @summary List addresses in a wallet. - * @param {string} walletId The ID of the wallet whose addresses to fetch - * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. - * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * Get user operation + * @summary Get user operation + * @param {string} smartWalletAddress The address of the smart wallet the user operation belongs to. + * @param {string} userOpHash The hash of the user operation to fetch * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listAddresses: async (walletId: string, limit?: number, page?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'walletId' is not null or undefined - assertParamExists('listAddresses', 'walletId', walletId) - const localVarPath = `/v1/wallets/{wallet_id}/addresses` - .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))); + getUserOperation: async (smartWalletAddress: string, userOpHash: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'smartWalletAddress' is not null or undefined + assertParamExists('getUserOperation', 'smartWalletAddress', smartWalletAddress) + // verify required parameter 'userOpHash' is not null or undefined + assertParamExists('getUserOperation', 'userOpHash', userOpHash) + const localVarPath = `/v1/smart_wallets/{smart_wallet_address}/user_operations/{user_op_hash}` + .replace(`{${"smart_wallet_address"}}`, encodeURIComponent(String(smartWalletAddress))) + .replace(`{${"user_op_hash"}}`, encodeURIComponent(String(userOpHash))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -1487,13 +10189,11 @@ export const AddressesApiAxiosParamCreator = function (configuration?: Configura const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) @@ -1507,21 +10207,15 @@ export const AddressesApiAxiosParamCreator = function (configuration?: Configura }; }, /** - * Request faucet funds to be sent to onchain address. - * @summary Request faucet funds for onchain address. - * @param {string} walletId The ID of the wallet the address belongs to. - * @param {string} addressId The onchain address of the address that is being fetched. + * List smart wallets + * @summary List smart wallets + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - requestFaucetFunds: async (walletId: string, addressId: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'walletId' is not null or undefined - assertParamExists('requestFaucetFunds', 'walletId', walletId) - // verify required parameter 'addressId' is not null or undefined - assertParamExists('requestFaucetFunds', 'addressId', addressId) - const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/faucet` - .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) - .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))); + listSmartWallets: async (limit?: number, page?: string, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/smart_wallets`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -1529,10 +10223,24 @@ export const AddressesApiAxiosParamCreator = function (configuration?: Configura baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -1548,371 +10256,354 @@ export const AddressesApiAxiosParamCreator = function (configuration?: Configura }; /** - * AddressesApi - functional programming interface + * SmartWalletsApi - functional programming interface * @export */ -export const AddressesApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = AddressesApiAxiosParamCreator(configuration) +export const SmartWalletsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = SmartWalletsApiAxiosParamCreator(configuration) return { /** - * Create a new address scoped to the wallet. - * @summary Create a new address - * @param {string} walletId The ID of the wallet to create the address in. - * @param {CreateAddressRequest} [createAddressRequest] + * Broadcast a user operation + * @summary Broadcast a user operation + * @param {string} smartWalletAddress The address of the smart wallet to broadcast the user operation from. + * @param {string} userOpHash The hash of the user operation to broadcast + * @param {BroadcastUserOperationRequest} [broadcastUserOperationRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createAddress(walletId: string, createAddressRequest?: CreateAddressRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise
        > { - const localVarAxiosArgs = await localVarAxiosParamCreator.createAddress(walletId, createAddressRequest, options); + async broadcastUserOperation(smartWalletAddress: string, userOpHash: string, broadcastUserOperationRequest?: BroadcastUserOperationRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.broadcastUserOperation(smartWalletAddress, userOpHash, broadcastUserOperationRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AddressesApi.createAddress']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['SmartWalletsApi.broadcastUserOperation']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Get address - * @summary Get address by onchain address - * @param {string} walletId The ID of the wallet the address belongs to. - * @param {string} addressId The onchain address of the address that is being fetched. + * Create a new smart wallet, not scoped to a given network. + * @summary Create a new smart wallet + * @param {CreateSmartWalletRequest} [createSmartWalletRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getAddress(walletId: string, addressId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise
        > { - const localVarAxiosArgs = await localVarAxiosParamCreator.getAddress(walletId, addressId, options); + async createSmartWallet(createSmartWalletRequest?: CreateSmartWalletRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createSmartWallet(createSmartWalletRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AddressesApi.getAddress']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['SmartWalletsApi.createSmartWallet']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Get address balance - * @summary Get address balance for asset - * @param {string} walletId The ID of the wallet to fetch the balance for - * @param {string} addressId The onchain address of the address that is being fetched. - * @param {string} assetId The symbol of the asset to fetch the balance for + * Create a new user operation on a smart wallet. + * @summary Create a new user operation + * @param {string} smartWalletAddress The address of the smart wallet to create the user operation on. + * @param {string} networkId The ID of the network to create the user operation on. + * @param {CreateUserOperationRequest} [createUserOperationRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getAddressBalance(walletId: string, addressId: string, assetId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getAddressBalance(walletId, addressId, assetId, options); + async createUserOperation(smartWalletAddress: string, networkId: string, createUserOperationRequest?: CreateUserOperationRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createUserOperation(smartWalletAddress, networkId, createUserOperationRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AddressesApi.getAddressBalance']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['SmartWalletsApi.createUserOperation']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Get address balances - * @summary Get all balances for address - * @param {string} walletId The ID of the wallet to fetch the balances for - * @param {string} addressId The onchain address of the address that is being fetched. - * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * Get smart wallet + * @summary Get smart wallet by address + * @param {string} smartWalletAddress The address of that smart wallet to fetch. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listAddressBalances(walletId: string, addressId: string, page?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listAddressBalances(walletId, addressId, page, options); + async getSmartWallet(smartWalletAddress: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSmartWallet(smartWalletAddress, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AddressesApi.listAddressBalances']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['SmartWalletsApi.getSmartWallet']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * List addresses in the wallet. - * @summary List addresses in a wallet. - * @param {string} walletId The ID of the wallet whose addresses to fetch - * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. - * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * Get user operation + * @summary Get user operation + * @param {string} smartWalletAddress The address of the smart wallet the user operation belongs to. + * @param {string} userOpHash The hash of the user operation to fetch * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listAddresses(walletId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listAddresses(walletId, limit, page, options); + async getUserOperation(smartWalletAddress: string, userOpHash: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getUserOperation(smartWalletAddress, userOpHash, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AddressesApi.listAddresses']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['SmartWalletsApi.getUserOperation']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Request faucet funds to be sent to onchain address. - * @summary Request faucet funds for onchain address. - * @param {string} walletId The ID of the wallet the address belongs to. - * @param {string} addressId The onchain address of the address that is being fetched. + * List smart wallets + * @summary List smart wallets + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async requestFaucetFunds(walletId: string, addressId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.requestFaucetFunds(walletId, addressId, options); + async listSmartWallets(limit?: number, page?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listSmartWallets(limit, page, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AddressesApi.requestFaucetFunds']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['SmartWalletsApi.listSmartWallets']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** - * AddressesApi - factory interface + * SmartWalletsApi - factory interface * @export */ -export const AddressesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = AddressesApiFp(configuration) +export const SmartWalletsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = SmartWalletsApiFp(configuration) return { /** - * Create a new address scoped to the wallet. - * @summary Create a new address - * @param {string} walletId The ID of the wallet to create the address in. - * @param {CreateAddressRequest} [createAddressRequest] + * Broadcast a user operation + * @summary Broadcast a user operation + * @param {string} smartWalletAddress The address of the smart wallet to broadcast the user operation from. + * @param {string} userOpHash The hash of the user operation to broadcast + * @param {BroadcastUserOperationRequest} [broadcastUserOperationRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createAddress(walletId: string, createAddressRequest?: CreateAddressRequest, options?: any): AxiosPromise
        { - return localVarFp.createAddress(walletId, createAddressRequest, options).then((request) => request(axios, basePath)); + broadcastUserOperation(smartWalletAddress: string, userOpHash: string, broadcastUserOperationRequest?: BroadcastUserOperationRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.broadcastUserOperation(smartWalletAddress, userOpHash, broadcastUserOperationRequest, options).then((request) => request(axios, basePath)); }, /** - * Get address - * @summary Get address by onchain address - * @param {string} walletId The ID of the wallet the address belongs to. - * @param {string} addressId The onchain address of the address that is being fetched. + * Create a new smart wallet, not scoped to a given network. + * @summary Create a new smart wallet + * @param {CreateSmartWalletRequest} [createSmartWalletRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAddress(walletId: string, addressId: string, options?: any): AxiosPromise
        { - return localVarFp.getAddress(walletId, addressId, options).then((request) => request(axios, basePath)); + createSmartWallet(createSmartWalletRequest?: CreateSmartWalletRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.createSmartWallet(createSmartWalletRequest, options).then((request) => request(axios, basePath)); }, /** - * Get address balance - * @summary Get address balance for asset - * @param {string} walletId The ID of the wallet to fetch the balance for - * @param {string} addressId The onchain address of the address that is being fetched. - * @param {string} assetId The symbol of the asset to fetch the balance for + * Create a new user operation on a smart wallet. + * @summary Create a new user operation + * @param {string} smartWalletAddress The address of the smart wallet to create the user operation on. + * @param {string} networkId The ID of the network to create the user operation on. + * @param {CreateUserOperationRequest} [createUserOperationRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAddressBalance(walletId: string, addressId: string, assetId: string, options?: any): AxiosPromise { - return localVarFp.getAddressBalance(walletId, addressId, assetId, options).then((request) => request(axios, basePath)); + createUserOperation(smartWalletAddress: string, networkId: string, createUserOperationRequest?: CreateUserOperationRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.createUserOperation(smartWalletAddress, networkId, createUserOperationRequest, options).then((request) => request(axios, basePath)); }, /** - * Get address balances - * @summary Get all balances for address - * @param {string} walletId The ID of the wallet to fetch the balances for - * @param {string} addressId The onchain address of the address that is being fetched. - * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * Get smart wallet + * @summary Get smart wallet by address + * @param {string} smartWalletAddress The address of that smart wallet to fetch. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listAddressBalances(walletId: string, addressId: string, page?: string, options?: any): AxiosPromise { - return localVarFp.listAddressBalances(walletId, addressId, page, options).then((request) => request(axios, basePath)); + getSmartWallet(smartWalletAddress: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getSmartWallet(smartWalletAddress, options).then((request) => request(axios, basePath)); }, /** - * List addresses in the wallet. - * @summary List addresses in a wallet. - * @param {string} walletId The ID of the wallet whose addresses to fetch - * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. - * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * Get user operation + * @summary Get user operation + * @param {string} smartWalletAddress The address of the smart wallet the user operation belongs to. + * @param {string} userOpHash The hash of the user operation to fetch * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listAddresses(walletId: string, limit?: number, page?: string, options?: any): AxiosPromise { - return localVarFp.listAddresses(walletId, limit, page, options).then((request) => request(axios, basePath)); + getUserOperation(smartWalletAddress: string, userOpHash: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getUserOperation(smartWalletAddress, userOpHash, options).then((request) => request(axios, basePath)); }, /** - * Request faucet funds to be sent to onchain address. - * @summary Request faucet funds for onchain address. - * @param {string} walletId The ID of the wallet the address belongs to. - * @param {string} addressId The onchain address of the address that is being fetched. + * List smart wallets + * @summary List smart wallets + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - requestFaucetFunds(walletId: string, addressId: string, options?: any): AxiosPromise { - return localVarFp.requestFaucetFunds(walletId, addressId, options).then((request) => request(axios, basePath)); + listSmartWallets(limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listSmartWallets(limit, page, options).then((request) => request(axios, basePath)); }, }; }; /** - * AddressesApi - interface + * SmartWalletsApi - interface * @export - * @interface AddressesApi + * @interface SmartWalletsApi */ -export interface AddressesApiInterface { +export interface SmartWalletsApiInterface { /** - * Create a new address scoped to the wallet. - * @summary Create a new address - * @param {string} walletId The ID of the wallet to create the address in. - * @param {CreateAddressRequest} [createAddressRequest] + * Broadcast a user operation + * @summary Broadcast a user operation + * @param {string} smartWalletAddress The address of the smart wallet to broadcast the user operation from. + * @param {string} userOpHash The hash of the user operation to broadcast + * @param {BroadcastUserOperationRequest} [broadcastUserOperationRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AddressesApiInterface + * @memberof SmartWalletsApiInterface */ - createAddress(walletId: string, createAddressRequest?: CreateAddressRequest, options?: RawAxiosRequestConfig): AxiosPromise
        ; + broadcastUserOperation(smartWalletAddress: string, userOpHash: string, broadcastUserOperationRequest?: BroadcastUserOperationRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** - * Get address - * @summary Get address by onchain address - * @param {string} walletId The ID of the wallet the address belongs to. - * @param {string} addressId The onchain address of the address that is being fetched. + * Create a new smart wallet, not scoped to a given network. + * @summary Create a new smart wallet + * @param {CreateSmartWalletRequest} [createSmartWalletRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AddressesApiInterface + * @memberof SmartWalletsApiInterface */ - getAddress(walletId: string, addressId: string, options?: RawAxiosRequestConfig): AxiosPromise
        ; + createSmartWallet(createSmartWalletRequest?: CreateSmartWalletRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** - * Get address balance - * @summary Get address balance for asset - * @param {string} walletId The ID of the wallet to fetch the balance for - * @param {string} addressId The onchain address of the address that is being fetched. - * @param {string} assetId The symbol of the asset to fetch the balance for + * Create a new user operation on a smart wallet. + * @summary Create a new user operation + * @param {string} smartWalletAddress The address of the smart wallet to create the user operation on. + * @param {string} networkId The ID of the network to create the user operation on. + * @param {CreateUserOperationRequest} [createUserOperationRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AddressesApiInterface + * @memberof SmartWalletsApiInterface */ - getAddressBalance(walletId: string, addressId: string, assetId: string, options?: RawAxiosRequestConfig): AxiosPromise; + createUserOperation(smartWalletAddress: string, networkId: string, createUserOperationRequest?: CreateUserOperationRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** - * Get address balances - * @summary Get all balances for address - * @param {string} walletId The ID of the wallet to fetch the balances for - * @param {string} addressId The onchain address of the address that is being fetched. - * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * Get smart wallet + * @summary Get smart wallet by address + * @param {string} smartWalletAddress The address of that smart wallet to fetch. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AddressesApiInterface + * @memberof SmartWalletsApiInterface */ - listAddressBalances(walletId: string, addressId: string, page?: string, options?: RawAxiosRequestConfig): AxiosPromise; + getSmartWallet(smartWalletAddress: string, options?: RawAxiosRequestConfig): AxiosPromise; /** - * List addresses in the wallet. - * @summary List addresses in a wallet. - * @param {string} walletId The ID of the wallet whose addresses to fetch - * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. - * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * Get user operation + * @summary Get user operation + * @param {string} smartWalletAddress The address of the smart wallet the user operation belongs to. + * @param {string} userOpHash The hash of the user operation to fetch * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AddressesApiInterface + * @memberof SmartWalletsApiInterface */ - listAddresses(walletId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise; + getUserOperation(smartWalletAddress: string, userOpHash: string, options?: RawAxiosRequestConfig): AxiosPromise; /** - * Request faucet funds to be sent to onchain address. - * @summary Request faucet funds for onchain address. - * @param {string} walletId The ID of the wallet the address belongs to. - * @param {string} addressId The onchain address of the address that is being fetched. + * List smart wallets + * @summary List smart wallets + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AddressesApiInterface + * @memberof SmartWalletsApiInterface */ - requestFaucetFunds(walletId: string, addressId: string, options?: RawAxiosRequestConfig): AxiosPromise; + listSmartWallets(limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise; } /** - * AddressesApi - object-oriented interface + * SmartWalletsApi - object-oriented interface * @export - * @class AddressesApi + * @class SmartWalletsApi * @extends {BaseAPI} */ -export class AddressesApi extends BaseAPI implements AddressesApiInterface { +export class SmartWalletsApi extends BaseAPI implements SmartWalletsApiInterface { /** - * Create a new address scoped to the wallet. - * @summary Create a new address - * @param {string} walletId The ID of the wallet to create the address in. - * @param {CreateAddressRequest} [createAddressRequest] + * Broadcast a user operation + * @summary Broadcast a user operation + * @param {string} smartWalletAddress The address of the smart wallet to broadcast the user operation from. + * @param {string} userOpHash The hash of the user operation to broadcast + * @param {BroadcastUserOperationRequest} [broadcastUserOperationRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AddressesApi + * @memberof SmartWalletsApi */ - public createAddress(walletId: string, createAddressRequest?: CreateAddressRequest, options?: RawAxiosRequestConfig) { - return AddressesApiFp(this.configuration).createAddress(walletId, createAddressRequest, options).then((request) => request(this.axios, this.basePath)); + public broadcastUserOperation(smartWalletAddress: string, userOpHash: string, broadcastUserOperationRequest?: BroadcastUserOperationRequest, options?: RawAxiosRequestConfig) { + return SmartWalletsApiFp(this.configuration).broadcastUserOperation(smartWalletAddress, userOpHash, broadcastUserOperationRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * Get address - * @summary Get address by onchain address - * @param {string} walletId The ID of the wallet the address belongs to. - * @param {string} addressId The onchain address of the address that is being fetched. + * Create a new smart wallet, not scoped to a given network. + * @summary Create a new smart wallet + * @param {CreateSmartWalletRequest} [createSmartWalletRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AddressesApi + * @memberof SmartWalletsApi */ - public getAddress(walletId: string, addressId: string, options?: RawAxiosRequestConfig) { - return AddressesApiFp(this.configuration).getAddress(walletId, addressId, options).then((request) => request(this.axios, this.basePath)); + public createSmartWallet(createSmartWalletRequest?: CreateSmartWalletRequest, options?: RawAxiosRequestConfig) { + return SmartWalletsApiFp(this.configuration).createSmartWallet(createSmartWalletRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * Get address balance - * @summary Get address balance for asset - * @param {string} walletId The ID of the wallet to fetch the balance for - * @param {string} addressId The onchain address of the address that is being fetched. - * @param {string} assetId The symbol of the asset to fetch the balance for + * Create a new user operation on a smart wallet. + * @summary Create a new user operation + * @param {string} smartWalletAddress The address of the smart wallet to create the user operation on. + * @param {string} networkId The ID of the network to create the user operation on. + * @param {CreateUserOperationRequest} [createUserOperationRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AddressesApi + * @memberof SmartWalletsApi */ - public getAddressBalance(walletId: string, addressId: string, assetId: string, options?: RawAxiosRequestConfig) { - return AddressesApiFp(this.configuration).getAddressBalance(walletId, addressId, assetId, options).then((request) => request(this.axios, this.basePath)); + public createUserOperation(smartWalletAddress: string, networkId: string, createUserOperationRequest?: CreateUserOperationRequest, options?: RawAxiosRequestConfig) { + return SmartWalletsApiFp(this.configuration).createUserOperation(smartWalletAddress, networkId, createUserOperationRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * Get address balances - * @summary Get all balances for address - * @param {string} walletId The ID of the wallet to fetch the balances for - * @param {string} addressId The onchain address of the address that is being fetched. - * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * Get smart wallet + * @summary Get smart wallet by address + * @param {string} smartWalletAddress The address of that smart wallet to fetch. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AddressesApi + * @memberof SmartWalletsApi */ - public listAddressBalances(walletId: string, addressId: string, page?: string, options?: RawAxiosRequestConfig) { - return AddressesApiFp(this.configuration).listAddressBalances(walletId, addressId, page, options).then((request) => request(this.axios, this.basePath)); + public getSmartWallet(smartWalletAddress: string, options?: RawAxiosRequestConfig) { + return SmartWalletsApiFp(this.configuration).getSmartWallet(smartWalletAddress, options).then((request) => request(this.axios, this.basePath)); } /** - * List addresses in the wallet. - * @summary List addresses in a wallet. - * @param {string} walletId The ID of the wallet whose addresses to fetch - * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. - * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * Get user operation + * @summary Get user operation + * @param {string} smartWalletAddress The address of the smart wallet the user operation belongs to. + * @param {string} userOpHash The hash of the user operation to fetch * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AddressesApi + * @memberof SmartWalletsApi */ - public listAddresses(walletId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig) { - return AddressesApiFp(this.configuration).listAddresses(walletId, limit, page, options).then((request) => request(this.axios, this.basePath)); + public getUserOperation(smartWalletAddress: string, userOpHash: string, options?: RawAxiosRequestConfig) { + return SmartWalletsApiFp(this.configuration).getUserOperation(smartWalletAddress, userOpHash, options).then((request) => request(this.axios, this.basePath)); } /** - * Request faucet funds to be sent to onchain address. - * @summary Request faucet funds for onchain address. - * @param {string} walletId The ID of the wallet the address belongs to. - * @param {string} addressId The onchain address of the address that is being fetched. + * List smart wallets + * @summary List smart wallets + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AddressesApi + * @memberof SmartWalletsApi */ - public requestFaucetFunds(walletId: string, addressId: string, options?: RawAxiosRequestConfig) { - return AddressesApiFp(this.configuration).requestFaucetFunds(walletId, addressId, options).then((request) => request(this.axios, this.basePath)); + public listSmartWallets(limit?: number, page?: string, options?: RawAxiosRequestConfig) { + return SmartWalletsApiFp(this.configuration).listSmartWallets(limit, page, options).then((request) => request(this.axios, this.basePath)); } } /** - * AssetsApi - axios parameter creator + * StakeApi - axios parameter creator * @export */ -export const AssetsApiAxiosParamCreator = function (configuration?: Configuration) { +export const StakeApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * Get the asset for the specified asset ID. - * @summary Get the asset for the specified asset ID. - * @param {string} networkId The ID of the blockchain network - * @param {string} assetId The ID of the asset to fetch + * Build a new staking operation + * @summary Build a new staking operation + * @param {BuildStakingOperationRequest} buildStakingOperationRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAsset: async (networkId: string, assetId: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'networkId' is not null or undefined - assertParamExists('getAsset', 'networkId', networkId) - // verify required parameter 'assetId' is not null or undefined - assertParamExists('getAsset', 'assetId', assetId) - const localVarPath = `/v1/networks/{network_id}/assets/{asset_id}` - .replace(`{${"network_id"}}`, encodeURIComponent(String(networkId))) - .replace(`{${"asset_id"}}`, encodeURIComponent(String(assetId))); + buildStakingOperation: async (buildStakingOperationRequest: BuildStakingOperationRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'buildStakingOperationRequest' is not null or undefined + assertParamExists('buildStakingOperation', 'buildStakingOperationRequest', buildStakingOperationRequest) + const localVarPath = `/v1/stake/build`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -1920,137 +10611,181 @@ export const AssetsApiAxiosParamCreator = function (configuration?: Configuratio baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(buildStakingOperationRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, - } -}; - -/** - * AssetsApi - functional programming interface - * @export - */ -export const AssetsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = AssetsApiAxiosParamCreator(configuration) - return { /** - * Get the asset for the specified asset ID. - * @summary Get the asset for the specified asset ID. - * @param {string} networkId The ID of the blockchain network - * @param {string} assetId The ID of the asset to fetch + * Fetch historical staking balances for given address. + * @summary Fetch historical staking balances + * @param {string} networkId The ID of the blockchain network. + * @param {string} assetId The ID of the asset for which the historical staking balances are being fetched. + * @param {string} addressId The onchain address for which the historical staking balances are being fetched. + * @param {string} startTime The start time of this historical staking balance period. + * @param {string} endTime The end time of this historical staking balance period. + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 50. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getAsset(networkId: string, assetId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getAsset(networkId, assetId, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AssetsApi.getAsset']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; + fetchHistoricalStakingBalances: async (networkId: string, assetId: string, addressId: string, startTime: string, endTime: string, limit?: number, page?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'networkId' is not null or undefined + assertParamExists('fetchHistoricalStakingBalances', 'networkId', networkId) + // verify required parameter 'assetId' is not null or undefined + assertParamExists('fetchHistoricalStakingBalances', 'assetId', assetId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('fetchHistoricalStakingBalances', 'addressId', addressId) + // verify required parameter 'startTime' is not null or undefined + assertParamExists('fetchHistoricalStakingBalances', 'startTime', startTime) + // verify required parameter 'endTime' is not null or undefined + assertParamExists('fetchHistoricalStakingBalances', 'endTime', endTime) + const localVarPath = `/v1/networks/{network_id}/addresses/{address_id}/stake/balances` + .replace(`{${"network_id"}}`, encodeURIComponent(String(networkId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } -/** - * AssetsApi - factory interface - * @export - */ -export const AssetsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = AssetsApiFp(configuration) - return { + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (assetId !== undefined) { + localVarQueryParameter['asset_id'] = assetId; + } + + if (startTime !== undefined) { + localVarQueryParameter['start_time'] = (startTime as any instanceof Date) ? + (startTime as any).toISOString() : + startTime; + } + + if (endTime !== undefined) { + localVarQueryParameter['end_time'] = (endTime as any instanceof Date) ? + (endTime as any).toISOString() : + endTime; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** - * Get the asset for the specified asset ID. - * @summary Get the asset for the specified asset ID. - * @param {string} networkId The ID of the blockchain network - * @param {string} assetId The ID of the asset to fetch + * Fetch staking rewards for a list of addresses + * @summary Fetch staking rewards + * @param {FetchStakingRewardsRequest} fetchStakingRewardsRequest + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 50. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAsset(networkId: string, assetId: string, options?: any): AxiosPromise { - return localVarFp.getAsset(networkId, assetId, options).then((request) => request(axios, basePath)); - }, - }; -}; + fetchStakingRewards: async (fetchStakingRewardsRequest: FetchStakingRewardsRequest, limit?: number, page?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fetchStakingRewardsRequest' is not null or undefined + assertParamExists('fetchStakingRewards', 'fetchStakingRewardsRequest', fetchStakingRewardsRequest) + const localVarPath = `/v1/stake/rewards/search`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } -/** - * AssetsApi - interface - * @export - * @interface AssetsApi - */ -export interface AssetsApiInterface { - /** - * Get the asset for the specified asset ID. - * @summary Get the asset for the specified asset ID. - * @param {string} networkId The ID of the blockchain network - * @param {string} assetId The ID of the asset to fetch - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AssetsApiInterface - */ - getAsset(networkId: string, assetId: string, options?: RawAxiosRequestConfig): AxiosPromise; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; -} + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) -/** - * AssetsApi - object-oriented interface - * @export - * @class AssetsApi - * @extends {BaseAPI} - */ -export class AssetsApi extends BaseAPI implements AssetsApiInterface { - /** - * Get the asset for the specified asset ID. - * @summary Get the asset for the specified asset ID. - * @param {string} networkId The ID of the blockchain network - * @param {string} assetId The ID of the asset to fetch - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AssetsApi - */ - public getAsset(networkId: string, assetId: string, options?: RawAxiosRequestConfig) { - return AssetsApiFp(this.configuration).getAsset(networkId, assetId, options).then((request) => request(this.axios, this.basePath)); - } -} + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } -/** - * ExternalAddressesApi - axios parameter creator - * @export - */ -export const ExternalAddressesApiAxiosParamCreator = function (configuration?: Configuration) { - return { + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(fetchStakingRewardsRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** - * Get the balance of an asset in an external address - * @summary Get the balance of an asset in an external address + * Get the latest state of a staking operation + * @summary Get the latest state of a staking operation * @param {string} networkId The ID of the blockchain network - * @param {string} addressId The ID of the address to fetch the balance for - * @param {string} assetId The ID of the asset to fetch the balance for + * @param {string} addressId The ID of the address to fetch the staking operation for + * @param {string} stakingOperationId The ID of the staking operation * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getExternalAddressBalance: async (networkId: string, addressId: string, assetId: string, options: RawAxiosRequestConfig = {}): Promise => { + getExternalStakingOperation: async (networkId: string, addressId: string, stakingOperationId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'networkId' is not null or undefined - assertParamExists('getExternalAddressBalance', 'networkId', networkId) + assertParamExists('getExternalStakingOperation', 'networkId', networkId) // verify required parameter 'addressId' is not null or undefined - assertParamExists('getExternalAddressBalance', 'addressId', addressId) - // verify required parameter 'assetId' is not null or undefined - assertParamExists('getExternalAddressBalance', 'assetId', assetId) - const localVarPath = `/v1/networks/{network_id}/addresses/{address_id}/balances/{asset_id}` + assertParamExists('getExternalStakingOperation', 'addressId', addressId) + // verify required parameter 'stakingOperationId' is not null or undefined + assertParamExists('getExternalStakingOperation', 'stakingOperationId', stakingOperationId) + const localVarPath = `/v1/networks/{network_id}/addresses/{address_id}/staking_operations/{staking_operation_id}` .replace(`{${"network_id"}}`, encodeURIComponent(String(networkId))) .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))) - .replace(`{${"asset_id"}}`, encodeURIComponent(String(assetId))); + .replace(`{${"staking_operation_id"}}`, encodeURIComponent(String(stakingOperationId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -2062,6 +10797,12 @@ export const ExternalAddressesApiAxiosParamCreator = function (configuration?: C const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -2074,22 +10815,67 @@ export const ExternalAddressesApiAxiosParamCreator = function (configuration?: C }; }, /** - * List all of the balances of an external address - * @summary Get the balances of an external address - * @param {string} networkId The ID of the blockchain network - * @param {string} addressId The ID of the address to fetch the balance for - * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * Get staking context for an address + * @summary Get staking context + * @param {GetStakingContextRequest} getStakingContextRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listExternalAddressBalances: async (networkId: string, addressId: string, page?: string, options: RawAxiosRequestConfig = {}): Promise => { + getStakingContext: async (getStakingContextRequest: GetStakingContextRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'getStakingContextRequest' is not null or undefined + assertParamExists('getStakingContext', 'getStakingContextRequest', getStakingContextRequest) + const localVarPath = `/v1/stake/context`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(getStakingContextRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get a validator belonging to the user for a given network, asset and id. + * @summary Get a validator belonging to the CDP project + * @param {string} networkId The ID of the blockchain network. + * @param {string} assetId The symbol of the asset to get the validator for. + * @param {string} validatorId The unique id of the validator to fetch details for. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getValidator: async (networkId: string, assetId: string, validatorId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'networkId' is not null or undefined - assertParamExists('listExternalAddressBalances', 'networkId', networkId) - // verify required parameter 'addressId' is not null or undefined - assertParamExists('listExternalAddressBalances', 'addressId', addressId) - const localVarPath = `/v1/networks/{network_id}/addresses/{address_id}/balances` + assertParamExists('getValidator', 'networkId', networkId) + // verify required parameter 'assetId' is not null or undefined + assertParamExists('getValidator', 'assetId', assetId) + // verify required parameter 'validatorId' is not null or undefined + assertParamExists('getValidator', 'validatorId', validatorId) + const localVarPath = `/v1/networks/{network_id}/assets/{asset_id}/validators/{validator_id}` .replace(`{${"network_id"}}`, encodeURIComponent(String(networkId))) - .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))); + .replace(`{${"asset_id"}}`, encodeURIComponent(String(assetId))) + .replace(`{${"validator_id"}}`, encodeURIComponent(String(validatorId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -2101,9 +10887,11 @@ export const ExternalAddressesApiAxiosParamCreator = function (configuration?: C const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) @@ -2117,21 +10905,24 @@ export const ExternalAddressesApiAxiosParamCreator = function (configuration?: C }; }, /** - * Request faucet funds to be sent to external address. - * @summary Request faucet funds for external address. - * @param {string} networkId The ID of the wallet the address belongs to. - * @param {string} addressId The onchain address of the address that is being fetched. + * List validators belonging to the user for a given network and asset. + * @summary List validators belonging to the CDP project + * @param {string} networkId The ID of the blockchain network. + * @param {string} assetId The symbol of the asset to get the validators for. + * @param {ValidatorStatus} [status] A filter to list validators based on a status. + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 50. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - requestExternalFaucetFunds: async (networkId: string, addressId: string, options: RawAxiosRequestConfig = {}): Promise => { + listValidators: async (networkId: string, assetId: string, status?: ValidatorStatus, limit?: number, page?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'networkId' is not null or undefined - assertParamExists('requestExternalFaucetFunds', 'networkId', networkId) - // verify required parameter 'addressId' is not null or undefined - assertParamExists('requestExternalFaucetFunds', 'addressId', addressId) - const localVarPath = `/v1/networks/{network_id}/addresses/{address_id}/faucet` + assertParamExists('listValidators', 'networkId', networkId) + // verify required parameter 'assetId' is not null or undefined + assertParamExists('listValidators', 'assetId', assetId) + const localVarPath = `/v1/networks/{network_id}/assets/{asset_id}/validators` .replace(`{${"network_id"}}`, encodeURIComponent(String(networkId))) - .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))); + .replace(`{${"asset_id"}}`, encodeURIComponent(String(assetId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -2139,10 +10930,28 @@ export const ExternalAddressesApiAxiosParamCreator = function (configuration?: C baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + if (status !== undefined) { + localVarQueryParameter['status'] = status; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -2158,213 +10967,451 @@ export const ExternalAddressesApiAxiosParamCreator = function (configuration?: C }; /** - * ExternalAddressesApi - functional programming interface + * StakeApi - functional programming interface * @export */ -export const ExternalAddressesApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = ExternalAddressesApiAxiosParamCreator(configuration) +export const StakeApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = StakeApiAxiosParamCreator(configuration) return { /** - * Get the balance of an asset in an external address - * @summary Get the balance of an asset in an external address - * @param {string} networkId The ID of the blockchain network - * @param {string} addressId The ID of the address to fetch the balance for - * @param {string} assetId The ID of the asset to fetch the balance for + * Build a new staking operation + * @summary Build a new staking operation + * @param {BuildStakingOperationRequest} buildStakingOperationRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getExternalAddressBalance(networkId: string, addressId: string, assetId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getExternalAddressBalance(networkId, addressId, assetId, options); + async buildStakingOperation(buildStakingOperationRequest: BuildStakingOperationRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.buildStakingOperation(buildStakingOperationRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ExternalAddressesApi.getExternalAddressBalance']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['StakeApi.buildStakingOperation']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * List all of the balances of an external address - * @summary Get the balances of an external address - * @param {string} networkId The ID of the blockchain network - * @param {string} addressId The ID of the address to fetch the balance for + * Fetch historical staking balances for given address. + * @summary Fetch historical staking balances + * @param {string} networkId The ID of the blockchain network. + * @param {string} assetId The ID of the asset for which the historical staking balances are being fetched. + * @param {string} addressId The onchain address for which the historical staking balances are being fetched. + * @param {string} startTime The start time of this historical staking balance period. + * @param {string} endTime The end time of this historical staking balance period. + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 50. * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listExternalAddressBalances(networkId: string, addressId: string, page?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listExternalAddressBalances(networkId, addressId, page, options); + async fetchHistoricalStakingBalances(networkId: string, assetId: string, addressId: string, startTime: string, endTime: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchHistoricalStakingBalances(networkId, assetId, addressId, startTime, endTime, limit, page, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ExternalAddressesApi.listExternalAddressBalances']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['StakeApi.fetchHistoricalStakingBalances']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Request faucet funds to be sent to external address. - * @summary Request faucet funds for external address. - * @param {string} networkId The ID of the wallet the address belongs to. - * @param {string} addressId The onchain address of the address that is being fetched. + * Fetch staking rewards for a list of addresses + * @summary Fetch staking rewards + * @param {FetchStakingRewardsRequest} fetchStakingRewardsRequest + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 50. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async requestExternalFaucetFunds(networkId: string, addressId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.requestExternalFaucetFunds(networkId, addressId, options); + async fetchStakingRewards(fetchStakingRewardsRequest: FetchStakingRewardsRequest, limit?: number, page?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchStakingRewards(fetchStakingRewardsRequest, limit, page, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ExternalAddressesApi.requestExternalFaucetFunds']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['StakeApi.fetchStakingRewards']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Get the latest state of a staking operation + * @summary Get the latest state of a staking operation + * @param {string} networkId The ID of the blockchain network + * @param {string} addressId The ID of the address to fetch the staking operation for + * @param {string} stakingOperationId The ID of the staking operation + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getExternalStakingOperation(networkId: string, addressId: string, stakingOperationId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getExternalStakingOperation(networkId, addressId, stakingOperationId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['StakeApi.getExternalStakingOperation']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Get staking context for an address + * @summary Get staking context + * @param {GetStakingContextRequest} getStakingContextRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStakingContext(getStakingContextRequest: GetStakingContextRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStakingContext(getStakingContextRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['StakeApi.getStakingContext']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Get a validator belonging to the user for a given network, asset and id. + * @summary Get a validator belonging to the CDP project + * @param {string} networkId The ID of the blockchain network. + * @param {string} assetId The symbol of the asset to get the validator for. + * @param {string} validatorId The unique id of the validator to fetch details for. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getValidator(networkId: string, assetId: string, validatorId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getValidator(networkId, assetId, validatorId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['StakeApi.getValidator']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * List validators belonging to the user for a given network and asset. + * @summary List validators belonging to the CDP project + * @param {string} networkId The ID of the blockchain network. + * @param {string} assetId The symbol of the asset to get the validators for. + * @param {ValidatorStatus} [status] A filter to list validators based on a status. + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 50. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listValidators(networkId: string, assetId: string, status?: ValidatorStatus, limit?: number, page?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listValidators(networkId, assetId, status, limit, page, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['StakeApi.listValidators']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** - * ExternalAddressesApi - factory interface + * StakeApi - factory interface * @export */ -export const ExternalAddressesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = ExternalAddressesApiFp(configuration) +export const StakeApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = StakeApiFp(configuration) return { /** - * Get the balance of an asset in an external address - * @summary Get the balance of an asset in an external address - * @param {string} networkId The ID of the blockchain network - * @param {string} addressId The ID of the address to fetch the balance for - * @param {string} assetId The ID of the asset to fetch the balance for + * Build a new staking operation + * @summary Build a new staking operation + * @param {BuildStakingOperationRequest} buildStakingOperationRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getExternalAddressBalance(networkId: string, addressId: string, assetId: string, options?: any): AxiosPromise { - return localVarFp.getExternalAddressBalance(networkId, addressId, assetId, options).then((request) => request(axios, basePath)); + buildStakingOperation(buildStakingOperationRequest: BuildStakingOperationRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.buildStakingOperation(buildStakingOperationRequest, options).then((request) => request(axios, basePath)); }, /** - * List all of the balances of an external address - * @summary Get the balances of an external address - * @param {string} networkId The ID of the blockchain network - * @param {string} addressId The ID of the address to fetch the balance for + * Fetch historical staking balances for given address. + * @summary Fetch historical staking balances + * @param {string} networkId The ID of the blockchain network. + * @param {string} assetId The ID of the asset for which the historical staking balances are being fetched. + * @param {string} addressId The onchain address for which the historical staking balances are being fetched. + * @param {string} startTime The start time of this historical staking balance period. + * @param {string} endTime The end time of this historical staking balance period. + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 50. * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listExternalAddressBalances(networkId: string, addressId: string, page?: string, options?: any): AxiosPromise { - return localVarFp.listExternalAddressBalances(networkId, addressId, page, options).then((request) => request(axios, basePath)); + fetchHistoricalStakingBalances(networkId: string, assetId: string, addressId: string, startTime: string, endTime: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchHistoricalStakingBalances(networkId, assetId, addressId, startTime, endTime, limit, page, options).then((request) => request(axios, basePath)); }, /** - * Request faucet funds to be sent to external address. - * @summary Request faucet funds for external address. - * @param {string} networkId The ID of the wallet the address belongs to. - * @param {string} addressId The onchain address of the address that is being fetched. + * Fetch staking rewards for a list of addresses + * @summary Fetch staking rewards + * @param {FetchStakingRewardsRequest} fetchStakingRewardsRequest + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 50. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fetchStakingRewards(fetchStakingRewardsRequest: FetchStakingRewardsRequest, limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchStakingRewards(fetchStakingRewardsRequest, limit, page, options).then((request) => request(axios, basePath)); + }, + /** + * Get the latest state of a staking operation + * @summary Get the latest state of a staking operation + * @param {string} networkId The ID of the blockchain network + * @param {string} addressId The ID of the address to fetch the staking operation for + * @param {string} stakingOperationId The ID of the staking operation + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getExternalStakingOperation(networkId: string, addressId: string, stakingOperationId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getExternalStakingOperation(networkId, addressId, stakingOperationId, options).then((request) => request(axios, basePath)); + }, + /** + * Get staking context for an address + * @summary Get staking context + * @param {GetStakingContextRequest} getStakingContextRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStakingContext(getStakingContextRequest: GetStakingContextRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getStakingContext(getStakingContextRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Get a validator belonging to the user for a given network, asset and id. + * @summary Get a validator belonging to the CDP project + * @param {string} networkId The ID of the blockchain network. + * @param {string} assetId The symbol of the asset to get the validator for. + * @param {string} validatorId The unique id of the validator to fetch details for. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getValidator(networkId: string, assetId: string, validatorId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getValidator(networkId, assetId, validatorId, options).then((request) => request(axios, basePath)); + }, + /** + * List validators belonging to the user for a given network and asset. + * @summary List validators belonging to the CDP project + * @param {string} networkId The ID of the blockchain network. + * @param {string} assetId The symbol of the asset to get the validators for. + * @param {ValidatorStatus} [status] A filter to list validators based on a status. + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 50. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - requestExternalFaucetFunds(networkId: string, addressId: string, options?: any): AxiosPromise { - return localVarFp.requestExternalFaucetFunds(networkId, addressId, options).then((request) => request(axios, basePath)); + listValidators(networkId: string, assetId: string, status?: ValidatorStatus, limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listValidators(networkId, assetId, status, limit, page, options).then((request) => request(axios, basePath)); }, }; }; /** - * ExternalAddressesApi - interface + * StakeApi - interface * @export - * @interface ExternalAddressesApi + * @interface StakeApi */ -export interface ExternalAddressesApiInterface { +export interface StakeApiInterface { /** - * Get the balance of an asset in an external address - * @summary Get the balance of an asset in an external address + * Build a new staking operation + * @summary Build a new staking operation + * @param {BuildStakingOperationRequest} buildStakingOperationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StakeApiInterface + */ + buildStakingOperation(buildStakingOperationRequest: BuildStakingOperationRequest, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Fetch historical staking balances for given address. + * @summary Fetch historical staking balances + * @param {string} networkId The ID of the blockchain network. + * @param {string} assetId The ID of the asset for which the historical staking balances are being fetched. + * @param {string} addressId The onchain address for which the historical staking balances are being fetched. + * @param {string} startTime The start time of this historical staking balance period. + * @param {string} endTime The end time of this historical staking balance period. + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 50. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StakeApiInterface + */ + fetchHistoricalStakingBalances(networkId: string, assetId: string, addressId: string, startTime: string, endTime: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Fetch staking rewards for a list of addresses + * @summary Fetch staking rewards + * @param {FetchStakingRewardsRequest} fetchStakingRewardsRequest + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 50. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StakeApiInterface + */ + fetchStakingRewards(fetchStakingRewardsRequest: FetchStakingRewardsRequest, limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Get the latest state of a staking operation + * @summary Get the latest state of a staking operation * @param {string} networkId The ID of the blockchain network - * @param {string} addressId The ID of the address to fetch the balance for - * @param {string} assetId The ID of the asset to fetch the balance for + * @param {string} addressId The ID of the address to fetch the staking operation for + * @param {string} stakingOperationId The ID of the staking operation + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StakeApiInterface + */ + getExternalStakingOperation(networkId: string, addressId: string, stakingOperationId: string, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Get staking context for an address + * @summary Get staking context + * @param {GetStakingContextRequest} getStakingContextRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StakeApiInterface + */ + getStakingContext(getStakingContextRequest: GetStakingContextRequest, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * Get a validator belonging to the user for a given network, asset and id. + * @summary Get a validator belonging to the CDP project + * @param {string} networkId The ID of the blockchain network. + * @param {string} assetId The symbol of the asset to get the validator for. + * @param {string} validatorId The unique id of the validator to fetch details for. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StakeApiInterface + */ + getValidator(networkId: string, assetId: string, validatorId: string, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * List validators belonging to the user for a given network and asset. + * @summary List validators belonging to the CDP project + * @param {string} networkId The ID of the blockchain network. + * @param {string} assetId The symbol of the asset to get the validators for. + * @param {ValidatorStatus} [status] A filter to list validators based on a status. + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 50. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StakeApiInterface + */ + listValidators(networkId: string, assetId: string, status?: ValidatorStatus, limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise; + +} + +/** + * StakeApi - object-oriented interface + * @export + * @class StakeApi + * @extends {BaseAPI} + */ +export class StakeApi extends BaseAPI implements StakeApiInterface { + /** + * Build a new staking operation + * @summary Build a new staking operation + * @param {BuildStakingOperationRequest} buildStakingOperationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StakeApi + */ + public buildStakingOperation(buildStakingOperationRequest: BuildStakingOperationRequest, options?: RawAxiosRequestConfig) { + return StakeApiFp(this.configuration).buildStakingOperation(buildStakingOperationRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetch historical staking balances for given address. + * @summary Fetch historical staking balances + * @param {string} networkId The ID of the blockchain network. + * @param {string} assetId The ID of the asset for which the historical staking balances are being fetched. + * @param {string} addressId The onchain address for which the historical staking balances are being fetched. + * @param {string} startTime The start time of this historical staking balance period. + * @param {string} endTime The end time of this historical staking balance period. + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 50. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ExternalAddressesApiInterface + * @memberof StakeApi */ - getExternalAddressBalance(networkId: string, addressId: string, assetId: string, options?: RawAxiosRequestConfig): AxiosPromise; + public fetchHistoricalStakingBalances(networkId: string, assetId: string, addressId: string, startTime: string, endTime: string, limit?: number, page?: string, options?: RawAxiosRequestConfig) { + return StakeApiFp(this.configuration).fetchHistoricalStakingBalances(networkId, assetId, addressId, startTime, endTime, limit, page, options).then((request) => request(this.axios, this.basePath)); + } /** - * List all of the balances of an external address - * @summary Get the balances of an external address - * @param {string} networkId The ID of the blockchain network - * @param {string} addressId The ID of the address to fetch the balance for + * Fetch staking rewards for a list of addresses + * @summary Fetch staking rewards + * @param {FetchStakingRewardsRequest} fetchStakingRewardsRequest + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 50. * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ExternalAddressesApiInterface + * @memberof StakeApi */ - listExternalAddressBalances(networkId: string, addressId: string, page?: string, options?: RawAxiosRequestConfig): AxiosPromise; + public fetchStakingRewards(fetchStakingRewardsRequest: FetchStakingRewardsRequest, limit?: number, page?: string, options?: RawAxiosRequestConfig) { + return StakeApiFp(this.configuration).fetchStakingRewards(fetchStakingRewardsRequest, limit, page, options).then((request) => request(this.axios, this.basePath)); + } /** - * Request faucet funds to be sent to external address. - * @summary Request faucet funds for external address. - * @param {string} networkId The ID of the wallet the address belongs to. - * @param {string} addressId The onchain address of the address that is being fetched. + * Get the latest state of a staking operation + * @summary Get the latest state of a staking operation + * @param {string} networkId The ID of the blockchain network + * @param {string} addressId The ID of the address to fetch the staking operation for + * @param {string} stakingOperationId The ID of the staking operation * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ExternalAddressesApiInterface + * @memberof StakeApi */ - requestExternalFaucetFunds(networkId: string, addressId: string, options?: RawAxiosRequestConfig): AxiosPromise; - -} + public getExternalStakingOperation(networkId: string, addressId: string, stakingOperationId: string, options?: RawAxiosRequestConfig) { + return StakeApiFp(this.configuration).getExternalStakingOperation(networkId, addressId, stakingOperationId, options).then((request) => request(this.axios, this.basePath)); + } -/** - * ExternalAddressesApi - object-oriented interface - * @export - * @class ExternalAddressesApi - * @extends {BaseAPI} - */ -export class ExternalAddressesApi extends BaseAPI implements ExternalAddressesApiInterface { /** - * Get the balance of an asset in an external address - * @summary Get the balance of an asset in an external address - * @param {string} networkId The ID of the blockchain network - * @param {string} addressId The ID of the address to fetch the balance for - * @param {string} assetId The ID of the asset to fetch the balance for + * Get staking context for an address + * @summary Get staking context + * @param {GetStakingContextRequest} getStakingContextRequest * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ExternalAddressesApi + * @memberof StakeApi */ - public getExternalAddressBalance(networkId: string, addressId: string, assetId: string, options?: RawAxiosRequestConfig) { - return ExternalAddressesApiFp(this.configuration).getExternalAddressBalance(networkId, addressId, assetId, options).then((request) => request(this.axios, this.basePath)); + public getStakingContext(getStakingContextRequest: GetStakingContextRequest, options?: RawAxiosRequestConfig) { + return StakeApiFp(this.configuration).getStakingContext(getStakingContextRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * List all of the balances of an external address - * @summary Get the balances of an external address - * @param {string} networkId The ID of the blockchain network - * @param {string} addressId The ID of the address to fetch the balance for - * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * Get a validator belonging to the user for a given network, asset and id. + * @summary Get a validator belonging to the CDP project + * @param {string} networkId The ID of the blockchain network. + * @param {string} assetId The symbol of the asset to get the validator for. + * @param {string} validatorId The unique id of the validator to fetch details for. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ExternalAddressesApi + * @memberof StakeApi */ - public listExternalAddressBalances(networkId: string, addressId: string, page?: string, options?: RawAxiosRequestConfig) { - return ExternalAddressesApiFp(this.configuration).listExternalAddressBalances(networkId, addressId, page, options).then((request) => request(this.axios, this.basePath)); + public getValidator(networkId: string, assetId: string, validatorId: string, options?: RawAxiosRequestConfig) { + return StakeApiFp(this.configuration).getValidator(networkId, assetId, validatorId, options).then((request) => request(this.axios, this.basePath)); } /** - * Request faucet funds to be sent to external address. - * @summary Request faucet funds for external address. - * @param {string} networkId The ID of the wallet the address belongs to. - * @param {string} addressId The onchain address of the address that is being fetched. + * List validators belonging to the user for a given network and asset. + * @summary List validators belonging to the CDP project + * @param {string} networkId The ID of the blockchain network. + * @param {string} assetId The symbol of the asset to get the validators for. + * @param {ValidatorStatus} [status] A filter to list validators based on a status. + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 50. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ExternalAddressesApi + * @memberof StakeApi */ - public requestExternalFaucetFunds(networkId: string, addressId: string, options?: RawAxiosRequestConfig) { - return ExternalAddressesApiFp(this.configuration).requestExternalFaucetFunds(networkId, addressId, options).then((request) => request(this.axios, this.basePath)); + public listValidators(networkId: string, assetId: string, status?: ValidatorStatus, limit?: number, page?: string, options?: RawAxiosRequestConfig) { + return StakeApiFp(this.configuration).listValidators(networkId, assetId, status, limit, page, options).then((request) => request(this.axios, this.basePath)); } } /** - * ServerSignersApi - axios parameter creator + * TradesApi - axios parameter creator * @export */ -export const ServerSignersApiAxiosParamCreator = function (configuration?: Configuration) { +export const TradesApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * Create a new Server-Signer - * @summary Create a new Server-Signer - * @param {CreateServerSignerRequest} [createServerSignerRequest] + * Broadcast a trade + * @summary Broadcast a trade + * @param {string} walletId The ID of the wallet the address belongs to + * @param {string} addressId The ID of the address the trade belongs to + * @param {string} tradeId The ID of the trade to broadcast + * @param {BroadcastTradeRequest} broadcastTradeRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createServerSigner: async (createServerSignerRequest?: CreateServerSignerRequest, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/v1/server_signers`; + broadcastTrade: async (walletId: string, addressId: string, tradeId: string, broadcastTradeRequest: BroadcastTradeRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'walletId' is not null or undefined + assertParamExists('broadcastTrade', 'walletId', walletId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('broadcastTrade', 'addressId', addressId) + // verify required parameter 'tradeId' is not null or undefined + assertParamExists('broadcastTrade', 'tradeId', tradeId) + // verify required parameter 'broadcastTradeRequest' is not null or undefined + assertParamExists('broadcastTrade', 'broadcastTradeRequest', broadcastTradeRequest) + const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/trades/{trade_id}/broadcast` + .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))) + .replace(`{${"trade_id"}}`, encodeURIComponent(String(tradeId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -2376,6 +11423,9 @@ export const ServerSignersApiAxiosParamCreator = function (configuration?: Confi const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -2383,7 +11433,7 @@ export const ServerSignersApiAxiosParamCreator = function (configuration?: Confi setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(createServerSignerRequest, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(broadcastTradeRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -2391,17 +11441,24 @@ export const ServerSignersApiAxiosParamCreator = function (configuration?: Confi }; }, /** - * Get a server signer by ID - * @summary Get a server signer by ID - * @param {string} serverSignerId The ID of the server signer to fetch + * Create a new trade + * @summary Create a new trade for an address + * @param {string} walletId The ID of the wallet the source address belongs to + * @param {string} addressId The ID of the address to conduct the trade from + * @param {CreateTradeRequest} createTradeRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getServerSigner: async (serverSignerId: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'serverSignerId' is not null or undefined - assertParamExists('getServerSigner', 'serverSignerId', serverSignerId) - const localVarPath = `/v1/server_signers/{server_signer_id}` - .replace(`{${"server_signer_id"}}`, encodeURIComponent(String(serverSignerId))); + createTrade: async (walletId: string, addressId: string, createTradeRequest: CreateTradeRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'walletId' is not null or undefined + assertParamExists('createTrade', 'walletId', walletId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('createTrade', 'addressId', addressId) + // verify required parameter 'createTradeRequest' is not null or undefined + assertParamExists('createTrade', 'createTradeRequest', createTradeRequest) + const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/trades` + .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -2409,15 +11466,21 @@ export const ServerSignersApiAxiosParamCreator = function (configuration?: Confi baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createTradeRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -2425,19 +11488,25 @@ export const ServerSignersApiAxiosParamCreator = function (configuration?: Confi }; }, /** - * List events for a server signer - * @summary List events for a server signer - * @param {string} serverSignerId The ID of the server signer to fetch events for - * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. - * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * Get a trade by ID + * @summary Get a trade by ID + * @param {string} walletId The ID of the wallet the address belongs to + * @param {string} addressId The ID of the address the trade belongs to + * @param {string} tradeId The ID of the trade to fetch * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listServerSignerEvents: async (serverSignerId: string, limit?: number, page?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'serverSignerId' is not null or undefined - assertParamExists('listServerSignerEvents', 'serverSignerId', serverSignerId) - const localVarPath = `/v1/server_signers/{server_signer_id}/events` - .replace(`{${"server_signer_id"}}`, encodeURIComponent(String(serverSignerId))); + getTrade: async (walletId: string, addressId: string, tradeId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'walletId' is not null or undefined + assertParamExists('getTrade', 'walletId', walletId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('getTrade', 'addressId', addressId) + // verify required parameter 'tradeId' is not null or undefined + assertParamExists('getTrade', 'tradeId', tradeId) + const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/trades/{trade_id}` + .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))) + .replace(`{${"trade_id"}}`, encodeURIComponent(String(tradeId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -2449,13 +11518,11 @@ export const ServerSignersApiAxiosParamCreator = function (configuration?: Confi const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) @@ -2469,96 +11536,23 @@ export const ServerSignersApiAxiosParamCreator = function (configuration?: Confi }; }, /** - * List server signers for the current project - * @summary List server signers for the current project + * List trades for an address. + * @summary List trades for an address. + * @param {string} walletId The ID of the wallet the address belongs to + * @param {string} addressId The ID of the address to list trades for * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listServerSigners: async (limit?: number, page?: string, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/v1/server_signers`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Submit the result of a server signer event - * @summary Submit the result of a server signer event - * @param {string} serverSignerId The ID of the server signer to submit the event result for - * @param {SeedCreationEventResult} [seedCreationEventResult] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - submitServerSignerSeedEventResult: async (serverSignerId: string, seedCreationEventResult?: SeedCreationEventResult, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'serverSignerId' is not null or undefined - assertParamExists('submitServerSignerSeedEventResult', 'serverSignerId', serverSignerId) - const localVarPath = `/v1/server_signers/{server_signer_id}/seed_event_result` - .replace(`{${"server_signer_id"}}`, encodeURIComponent(String(serverSignerId))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(seedCreationEventResult, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Submit the result of a server signer event - * @summary Submit the result of a server signer event - * @param {string} serverSignerId The ID of the server signer to submit the event result for - * @param {SignatureCreationEventResult} [signatureCreationEventResult] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - submitServerSignerSignatureEventResult: async (serverSignerId: string, signatureCreationEventResult?: SignatureCreationEventResult, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'serverSignerId' is not null or undefined - assertParamExists('submitServerSignerSignatureEventResult', 'serverSignerId', serverSignerId) - const localVarPath = `/v1/server_signers/{server_signer_id}/signature_event_result` - .replace(`{${"server_signer_id"}}`, encodeURIComponent(String(serverSignerId))); + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listTrades: async (walletId: string, addressId: string, limit?: number, page?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'walletId' is not null or undefined + assertParamExists('listTrades', 'walletId', walletId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('listTrades', 'addressId', addressId) + const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/trades` + .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -2566,18 +11560,29 @@ export const ServerSignersApiAxiosParamCreator = function (configuration?: Confi baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } - - localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(signatureCreationEventResult, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -2588,350 +11593,287 @@ export const ServerSignersApiAxiosParamCreator = function (configuration?: Confi }; /** - * ServerSignersApi - functional programming interface + * TradesApi - functional programming interface * @export */ -export const ServerSignersApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = ServerSignersApiAxiosParamCreator(configuration) +export const TradesApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = TradesApiAxiosParamCreator(configuration) return { /** - * Create a new Server-Signer - * @summary Create a new Server-Signer - * @param {CreateServerSignerRequest} [createServerSignerRequest] + * Broadcast a trade + * @summary Broadcast a trade + * @param {string} walletId The ID of the wallet the address belongs to + * @param {string} addressId The ID of the address the trade belongs to + * @param {string} tradeId The ID of the trade to broadcast + * @param {BroadcastTradeRequest} broadcastTradeRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createServerSigner(createServerSignerRequest?: CreateServerSignerRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createServerSigner(createServerSignerRequest, options); + async broadcastTrade(walletId: string, addressId: string, tradeId: string, broadcastTradeRequest: BroadcastTradeRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.broadcastTrade(walletId, addressId, tradeId, broadcastTradeRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ServerSignersApi.createServerSigner']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['TradesApi.broadcastTrade']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Get a server signer by ID - * @summary Get a server signer by ID - * @param {string} serverSignerId The ID of the server signer to fetch + * Create a new trade + * @summary Create a new trade for an address + * @param {string} walletId The ID of the wallet the source address belongs to + * @param {string} addressId The ID of the address to conduct the trade from + * @param {CreateTradeRequest} createTradeRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getServerSigner(serverSignerId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getServerSigner(serverSignerId, options); + async createTrade(walletId: string, addressId: string, createTradeRequest: CreateTradeRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createTrade(walletId, addressId, createTradeRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ServerSignersApi.getServerSigner']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['TradesApi.createTrade']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * List events for a server signer - * @summary List events for a server signer - * @param {string} serverSignerId The ID of the server signer to fetch events for - * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. - * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * Get a trade by ID + * @summary Get a trade by ID + * @param {string} walletId The ID of the wallet the address belongs to + * @param {string} addressId The ID of the address the trade belongs to + * @param {string} tradeId The ID of the trade to fetch * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listServerSignerEvents(serverSignerId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listServerSignerEvents(serverSignerId, limit, page, options); + async getTrade(walletId: string, addressId: string, tradeId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTrade(walletId, addressId, tradeId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ServerSignersApi.listServerSignerEvents']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['TradesApi.getTrade']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * List server signers for the current project - * @summary List server signers for the current project + * List trades for an address. + * @summary List trades for an address. + * @param {string} walletId The ID of the wallet the address belongs to + * @param {string} addressId The ID of the address to list trades for * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listServerSigners(limit?: number, page?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listServerSigners(limit, page, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ServerSignersApi.listServerSigners']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Submit the result of a server signer event - * @summary Submit the result of a server signer event - * @param {string} serverSignerId The ID of the server signer to submit the event result for - * @param {SeedCreationEventResult} [seedCreationEventResult] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async submitServerSignerSeedEventResult(serverSignerId: string, seedCreationEventResult?: SeedCreationEventResult, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.submitServerSignerSeedEventResult(serverSignerId, seedCreationEventResult, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ServerSignersApi.submitServerSignerSeedEventResult']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Submit the result of a server signer event - * @summary Submit the result of a server signer event - * @param {string} serverSignerId The ID of the server signer to submit the event result for - * @param {SignatureCreationEventResult} [signatureCreationEventResult] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async submitServerSignerSignatureEventResult(serverSignerId: string, signatureCreationEventResult?: SignatureCreationEventResult, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.submitServerSignerSignatureEventResult(serverSignerId, signatureCreationEventResult, options); + async listTrades(walletId: string, addressId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listTrades(walletId, addressId, limit, page, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ServerSignersApi.submitServerSignerSignatureEventResult']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['TradesApi.listTrades']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** - * ServerSignersApi - factory interface + * TradesApi - factory interface * @export */ -export const ServerSignersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = ServerSignersApiFp(configuration) +export const TradesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = TradesApiFp(configuration) return { /** - * Create a new Server-Signer - * @summary Create a new Server-Signer - * @param {CreateServerSignerRequest} [createServerSignerRequest] + * Broadcast a trade + * @summary Broadcast a trade + * @param {string} walletId The ID of the wallet the address belongs to + * @param {string} addressId The ID of the address the trade belongs to + * @param {string} tradeId The ID of the trade to broadcast + * @param {BroadcastTradeRequest} broadcastTradeRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createServerSigner(createServerSignerRequest?: CreateServerSignerRequest, options?: any): AxiosPromise { - return localVarFp.createServerSigner(createServerSignerRequest, options).then((request) => request(axios, basePath)); + broadcastTrade(walletId: string, addressId: string, tradeId: string, broadcastTradeRequest: BroadcastTradeRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.broadcastTrade(walletId, addressId, tradeId, broadcastTradeRequest, options).then((request) => request(axios, basePath)); }, /** - * Get a server signer by ID - * @summary Get a server signer by ID - * @param {string} serverSignerId The ID of the server signer to fetch + * Create a new trade + * @summary Create a new trade for an address + * @param {string} walletId The ID of the wallet the source address belongs to + * @param {string} addressId The ID of the address to conduct the trade from + * @param {CreateTradeRequest} createTradeRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getServerSigner(serverSignerId: string, options?: any): AxiosPromise { - return localVarFp.getServerSigner(serverSignerId, options).then((request) => request(axios, basePath)); + createTrade(walletId: string, addressId: string, createTradeRequest: CreateTradeRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.createTrade(walletId, addressId, createTradeRequest, options).then((request) => request(axios, basePath)); }, /** - * List events for a server signer - * @summary List events for a server signer - * @param {string} serverSignerId The ID of the server signer to fetch events for - * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. - * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * Get a trade by ID + * @summary Get a trade by ID + * @param {string} walletId The ID of the wallet the address belongs to + * @param {string} addressId The ID of the address the trade belongs to + * @param {string} tradeId The ID of the trade to fetch * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listServerSignerEvents(serverSignerId: string, limit?: number, page?: string, options?: any): AxiosPromise { - return localVarFp.listServerSignerEvents(serverSignerId, limit, page, options).then((request) => request(axios, basePath)); + getTrade(walletId: string, addressId: string, tradeId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getTrade(walletId, addressId, tradeId, options).then((request) => request(axios, basePath)); }, /** - * List server signers for the current project - * @summary List server signers for the current project + * List trades for an address. + * @summary List trades for an address. + * @param {string} walletId The ID of the wallet the address belongs to + * @param {string} addressId The ID of the address to list trades for * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listServerSigners(limit?: number, page?: string, options?: any): AxiosPromise { - return localVarFp.listServerSigners(limit, page, options).then((request) => request(axios, basePath)); - }, - /** - * Submit the result of a server signer event - * @summary Submit the result of a server signer event - * @param {string} serverSignerId The ID of the server signer to submit the event result for - * @param {SeedCreationEventResult} [seedCreationEventResult] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - submitServerSignerSeedEventResult(serverSignerId: string, seedCreationEventResult?: SeedCreationEventResult, options?: any): AxiosPromise { - return localVarFp.submitServerSignerSeedEventResult(serverSignerId, seedCreationEventResult, options).then((request) => request(axios, basePath)); - }, - /** - * Submit the result of a server signer event - * @summary Submit the result of a server signer event - * @param {string} serverSignerId The ID of the server signer to submit the event result for - * @param {SignatureCreationEventResult} [signatureCreationEventResult] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - submitServerSignerSignatureEventResult(serverSignerId: string, signatureCreationEventResult?: SignatureCreationEventResult, options?: any): AxiosPromise { - return localVarFp.submitServerSignerSignatureEventResult(serverSignerId, signatureCreationEventResult, options).then((request) => request(axios, basePath)); + listTrades(walletId: string, addressId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listTrades(walletId, addressId, limit, page, options).then((request) => request(axios, basePath)); }, }; }; /** - * ServerSignersApi - interface + * TradesApi - interface * @export - * @interface ServerSignersApi + * @interface TradesApi */ -export interface ServerSignersApiInterface { - /** - * Create a new Server-Signer - * @summary Create a new Server-Signer - * @param {CreateServerSignerRequest} [createServerSignerRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ServerSignersApiInterface - */ - createServerSigner(createServerSignerRequest?: CreateServerSignerRequest, options?: RawAxiosRequestConfig): AxiosPromise; - - /** - * Get a server signer by ID - * @summary Get a server signer by ID - * @param {string} serverSignerId The ID of the server signer to fetch - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ServerSignersApiInterface - */ - getServerSigner(serverSignerId: string, options?: RawAxiosRequestConfig): AxiosPromise; - +export interface TradesApiInterface { /** - * List events for a server signer - * @summary List events for a server signer - * @param {string} serverSignerId The ID of the server signer to fetch events for - * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. - * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * Broadcast a trade + * @summary Broadcast a trade + * @param {string} walletId The ID of the wallet the address belongs to + * @param {string} addressId The ID of the address the trade belongs to + * @param {string} tradeId The ID of the trade to broadcast + * @param {BroadcastTradeRequest} broadcastTradeRequest * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ServerSignersApiInterface + * @memberof TradesApiInterface */ - listServerSignerEvents(serverSignerId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise; + broadcastTrade(walletId: string, addressId: string, tradeId: string, broadcastTradeRequest: BroadcastTradeRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** - * List server signers for the current project - * @summary List server signers for the current project - * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. - * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * Create a new trade + * @summary Create a new trade for an address + * @param {string} walletId The ID of the wallet the source address belongs to + * @param {string} addressId The ID of the address to conduct the trade from + * @param {CreateTradeRequest} createTradeRequest * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ServerSignersApiInterface + * @memberof TradesApiInterface */ - listServerSigners(limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise; + createTrade(walletId: string, addressId: string, createTradeRequest: CreateTradeRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** - * Submit the result of a server signer event - * @summary Submit the result of a server signer event - * @param {string} serverSignerId The ID of the server signer to submit the event result for - * @param {SeedCreationEventResult} [seedCreationEventResult] + * Get a trade by ID + * @summary Get a trade by ID + * @param {string} walletId The ID of the wallet the address belongs to + * @param {string} addressId The ID of the address the trade belongs to + * @param {string} tradeId The ID of the trade to fetch * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ServerSignersApiInterface + * @memberof TradesApiInterface */ - submitServerSignerSeedEventResult(serverSignerId: string, seedCreationEventResult?: SeedCreationEventResult, options?: RawAxiosRequestConfig): AxiosPromise; + getTrade(walletId: string, addressId: string, tradeId: string, options?: RawAxiosRequestConfig): AxiosPromise; /** - * Submit the result of a server signer event - * @summary Submit the result of a server signer event - * @param {string} serverSignerId The ID of the server signer to submit the event result for - * @param {SignatureCreationEventResult} [signatureCreationEventResult] + * List trades for an address. + * @summary List trades for an address. + * @param {string} walletId The ID of the wallet the address belongs to + * @param {string} addressId The ID of the address to list trades for + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ServerSignersApiInterface + * @memberof TradesApiInterface */ - submitServerSignerSignatureEventResult(serverSignerId: string, signatureCreationEventResult?: SignatureCreationEventResult, options?: RawAxiosRequestConfig): AxiosPromise; + listTrades(walletId: string, addressId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise; } /** - * ServerSignersApi - object-oriented interface + * TradesApi - object-oriented interface * @export - * @class ServerSignersApi + * @class TradesApi * @extends {BaseAPI} */ -export class ServerSignersApi extends BaseAPI implements ServerSignersApiInterface { +export class TradesApi extends BaseAPI implements TradesApiInterface { /** - * Create a new Server-Signer - * @summary Create a new Server-Signer - * @param {CreateServerSignerRequest} [createServerSignerRequest] + * Broadcast a trade + * @summary Broadcast a trade + * @param {string} walletId The ID of the wallet the address belongs to + * @param {string} addressId The ID of the address the trade belongs to + * @param {string} tradeId The ID of the trade to broadcast + * @param {BroadcastTradeRequest} broadcastTradeRequest * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ServerSignersApi + * @memberof TradesApi */ - public createServerSigner(createServerSignerRequest?: CreateServerSignerRequest, options?: RawAxiosRequestConfig) { - return ServerSignersApiFp(this.configuration).createServerSigner(createServerSignerRequest, options).then((request) => request(this.axios, this.basePath)); + public broadcastTrade(walletId: string, addressId: string, tradeId: string, broadcastTradeRequest: BroadcastTradeRequest, options?: RawAxiosRequestConfig) { + return TradesApiFp(this.configuration).broadcastTrade(walletId, addressId, tradeId, broadcastTradeRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * Get a server signer by ID - * @summary Get a server signer by ID - * @param {string} serverSignerId The ID of the server signer to fetch + * Create a new trade + * @summary Create a new trade for an address + * @param {string} walletId The ID of the wallet the source address belongs to + * @param {string} addressId The ID of the address to conduct the trade from + * @param {CreateTradeRequest} createTradeRequest * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ServerSignersApi + * @memberof TradesApi */ - public getServerSigner(serverSignerId: string, options?: RawAxiosRequestConfig) { - return ServerSignersApiFp(this.configuration).getServerSigner(serverSignerId, options).then((request) => request(this.axios, this.basePath)); + public createTrade(walletId: string, addressId: string, createTradeRequest: CreateTradeRequest, options?: RawAxiosRequestConfig) { + return TradesApiFp(this.configuration).createTrade(walletId, addressId, createTradeRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * List events for a server signer - * @summary List events for a server signer - * @param {string} serverSignerId The ID of the server signer to fetch events for - * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. - * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * Get a trade by ID + * @summary Get a trade by ID + * @param {string} walletId The ID of the wallet the address belongs to + * @param {string} addressId The ID of the address the trade belongs to + * @param {string} tradeId The ID of the trade to fetch * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ServerSignersApi + * @memberof TradesApi */ - public listServerSignerEvents(serverSignerId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig) { - return ServerSignersApiFp(this.configuration).listServerSignerEvents(serverSignerId, limit, page, options).then((request) => request(this.axios, this.basePath)); + public getTrade(walletId: string, addressId: string, tradeId: string, options?: RawAxiosRequestConfig) { + return TradesApiFp(this.configuration).getTrade(walletId, addressId, tradeId, options).then((request) => request(this.axios, this.basePath)); } /** - * List server signers for the current project - * @summary List server signers for the current project + * List trades for an address. + * @summary List trades for an address. + * @param {string} walletId The ID of the wallet the address belongs to + * @param {string} addressId The ID of the address to list trades for * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ServerSignersApi - */ - public listServerSigners(limit?: number, page?: string, options?: RawAxiosRequestConfig) { - return ServerSignersApiFp(this.configuration).listServerSigners(limit, page, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Submit the result of a server signer event - * @summary Submit the result of a server signer event - * @param {string} serverSignerId The ID of the server signer to submit the event result for - * @param {SeedCreationEventResult} [seedCreationEventResult] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ServerSignersApi - */ - public submitServerSignerSeedEventResult(serverSignerId: string, seedCreationEventResult?: SeedCreationEventResult, options?: RawAxiosRequestConfig) { - return ServerSignersApiFp(this.configuration).submitServerSignerSeedEventResult(serverSignerId, seedCreationEventResult, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Submit the result of a server signer event - * @summary Submit the result of a server signer event - * @param {string} serverSignerId The ID of the server signer to submit the event result for - * @param {SignatureCreationEventResult} [signatureCreationEventResult] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ServerSignersApi + * @memberof TradesApi */ - public submitServerSignerSignatureEventResult(serverSignerId: string, signatureCreationEventResult?: SignatureCreationEventResult, options?: RawAxiosRequestConfig) { - return ServerSignersApiFp(this.configuration).submitServerSignerSignatureEventResult(serverSignerId, signatureCreationEventResult, options).then((request) => request(this.axios, this.basePath)); + public listTrades(walletId: string, addressId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig) { + return TradesApiFp(this.configuration).listTrades(walletId, addressId, limit, page, options).then((request) => request(this.axios, this.basePath)); } } /** - * StakeApi - axios parameter creator + * TransactionHistoryApi - axios parameter creator * @export */ -export const StakeApiAxiosParamCreator = function (configuration?: Configuration) { +export const TransactionHistoryApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * Build a new staking operation - * @summary Build a new staking operation - * @param {BuildStakingOperationRequest} buildStakingOperationRequest + * List all transactions that interact with the address. + * @summary List transactions for an address. + * @param {string} networkId The ID of the blockchain network + * @param {string} addressId The ID of the address to fetch the transactions for. + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - buildStakingOperation: async (buildStakingOperationRequest: BuildStakingOperationRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'buildStakingOperationRequest' is not null or undefined - assertParamExists('buildStakingOperation', 'buildStakingOperationRequest', buildStakingOperationRequest) - const localVarPath = `/v1/stake/build`; + listAddressTransactions: async (networkId: string, addressId: string, limit?: number, page?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'networkId' is not null or undefined + assertParamExists('listAddressTransactions', 'networkId', networkId) + // verify required parameter 'addressId' is not null or undefined + assertParamExists('listAddressTransactions', 'addressId', addressId) + const localVarPath = `/v1/networks/{network_id}/addresses/{address_id}/transactions` + .replace(`{${"network_id"}}`, encodeURIComponent(String(networkId))) + .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -2939,47 +11881,15 @@ export const StakeApiAxiosParamCreator = function (configuration?: Configuration baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(buildStakingOperationRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetch staking rewards for a list of addresses - * @summary Fetch staking rewards - * @param {FetchStakingRewardsRequest} fetchStakingRewardsRequest - * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 50. - * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - fetchStakingRewards: async (fetchStakingRewardsRequest: FetchStakingRewardsRequest, limit?: number, page?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fetchStakingRewardsRequest' is not null or undefined - assertParamExists('fetchStakingRewards', 'fetchStakingRewardsRequest', fetchStakingRewardsRequest) - const localVarPath = `/v1/stake/rewards/search`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) if (limit !== undefined) { localVarQueryParameter['limit'] = limit; @@ -2991,48 +11901,9 @@ export const StakeApiAxiosParamCreator = function (configuration?: Configuration - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(fetchStakingRewardsRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Get staking context for an address - * @summary Get staking context - * @param {GetStakingContextRequest} getStakingContextRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStakingContext: async (getStakingContextRequest: GetStakingContextRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'getStakingContextRequest' is not null or undefined - assertParamExists('getStakingContext', 'getStakingContextRequest', getStakingContextRequest) - const localVarPath = `/v1/stake/context`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(getStakingContextRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -3043,215 +11914,129 @@ export const StakeApiAxiosParamCreator = function (configuration?: Configuration }; /** - * StakeApi - functional programming interface - * @export - */ -export const StakeApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = StakeApiAxiosParamCreator(configuration) - return { - /** - * Build a new staking operation - * @summary Build a new staking operation - * @param {BuildStakingOperationRequest} buildStakingOperationRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async buildStakingOperation(buildStakingOperationRequest: BuildStakingOperationRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.buildStakingOperation(buildStakingOperationRequest, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['StakeApi.buildStakingOperation']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetch staking rewards for a list of addresses - * @summary Fetch staking rewards - * @param {FetchStakingRewardsRequest} fetchStakingRewardsRequest - * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 50. - * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async fetchStakingRewards(fetchStakingRewardsRequest: FetchStakingRewardsRequest, limit?: number, page?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.fetchStakingRewards(fetchStakingRewardsRequest, limit, page, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['StakeApi.fetchStakingRewards']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Get staking context for an address - * @summary Get staking context - * @param {GetStakingContextRequest} getStakingContextRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStakingContext(getStakingContextRequest: GetStakingContextRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStakingContext(getStakingContextRequest, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['StakeApi.getStakingContext']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * StakeApi - factory interface + * TransactionHistoryApi - functional programming interface * @export - */ -export const StakeApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = StakeApiFp(configuration) - return { - /** - * Build a new staking operation - * @summary Build a new staking operation - * @param {BuildStakingOperationRequest} buildStakingOperationRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - buildStakingOperation(buildStakingOperationRequest: BuildStakingOperationRequest, options?: any): AxiosPromise { - return localVarFp.buildStakingOperation(buildStakingOperationRequest, options).then((request) => request(axios, basePath)); - }, + */ +export const TransactionHistoryApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = TransactionHistoryApiAxiosParamCreator(configuration) + return { /** - * Fetch staking rewards for a list of addresses - * @summary Fetch staking rewards - * @param {FetchStakingRewardsRequest} fetchStakingRewardsRequest - * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 50. + * List all transactions that interact with the address. + * @summary List transactions for an address. + * @param {string} networkId The ID of the blockchain network + * @param {string} addressId The ID of the address to fetch the transactions for. + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fetchStakingRewards(fetchStakingRewardsRequest: FetchStakingRewardsRequest, limit?: number, page?: string, options?: any): AxiosPromise { - return localVarFp.fetchStakingRewards(fetchStakingRewardsRequest, limit, page, options).then((request) => request(axios, basePath)); + async listAddressTransactions(networkId: string, addressId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listAddressTransactions(networkId, addressId, limit, page, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['TransactionHistoryApi.listAddressTransactions']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, + } +}; + +/** + * TransactionHistoryApi - factory interface + * @export + */ +export const TransactionHistoryApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = TransactionHistoryApiFp(configuration) + return { /** - * Get staking context for an address - * @summary Get staking context - * @param {GetStakingContextRequest} getStakingContextRequest + * List all transactions that interact with the address. + * @summary List transactions for an address. + * @param {string} networkId The ID of the blockchain network + * @param {string} addressId The ID of the address to fetch the transactions for. + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getStakingContext(getStakingContextRequest: GetStakingContextRequest, options?: any): AxiosPromise { - return localVarFp.getStakingContext(getStakingContextRequest, options).then((request) => request(axios, basePath)); + listAddressTransactions(networkId: string, addressId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listAddressTransactions(networkId, addressId, limit, page, options).then((request) => request(axios, basePath)); }, }; }; /** - * StakeApi - interface + * TransactionHistoryApi - interface * @export - * @interface StakeApi + * @interface TransactionHistoryApi */ -export interface StakeApiInterface { - /** - * Build a new staking operation - * @summary Build a new staking operation - * @param {BuildStakingOperationRequest} buildStakingOperationRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof StakeApiInterface - */ - buildStakingOperation(buildStakingOperationRequest: BuildStakingOperationRequest, options?: RawAxiosRequestConfig): AxiosPromise; - +export interface TransactionHistoryApiInterface { /** - * Fetch staking rewards for a list of addresses - * @summary Fetch staking rewards - * @param {FetchStakingRewardsRequest} fetchStakingRewardsRequest - * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 50. + * List all transactions that interact with the address. + * @summary List transactions for an address. + * @param {string} networkId The ID of the blockchain network + * @param {string} addressId The ID of the address to fetch the transactions for. + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof StakeApiInterface - */ - fetchStakingRewards(fetchStakingRewardsRequest: FetchStakingRewardsRequest, limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise; - - /** - * Get staking context for an address - * @summary Get staking context - * @param {GetStakingContextRequest} getStakingContextRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof StakeApiInterface + * @memberof TransactionHistoryApiInterface */ - getStakingContext(getStakingContextRequest: GetStakingContextRequest, options?: RawAxiosRequestConfig): AxiosPromise; + listAddressTransactions(networkId: string, addressId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise; } /** - * StakeApi - object-oriented interface + * TransactionHistoryApi - object-oriented interface * @export - * @class StakeApi + * @class TransactionHistoryApi * @extends {BaseAPI} */ -export class StakeApi extends BaseAPI implements StakeApiInterface { - /** - * Build a new staking operation - * @summary Build a new staking operation - * @param {BuildStakingOperationRequest} buildStakingOperationRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof StakeApi - */ - public buildStakingOperation(buildStakingOperationRequest: BuildStakingOperationRequest, options?: RawAxiosRequestConfig) { - return StakeApiFp(this.configuration).buildStakingOperation(buildStakingOperationRequest, options).then((request) => request(this.axios, this.basePath)); - } - +export class TransactionHistoryApi extends BaseAPI implements TransactionHistoryApiInterface { /** - * Fetch staking rewards for a list of addresses - * @summary Fetch staking rewards - * @param {FetchStakingRewardsRequest} fetchStakingRewardsRequest - * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 50. + * List all transactions that interact with the address. + * @summary List transactions for an address. + * @param {string} networkId The ID of the blockchain network + * @param {string} addressId The ID of the address to fetch the transactions for. + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof StakeApi - */ - public fetchStakingRewards(fetchStakingRewardsRequest: FetchStakingRewardsRequest, limit?: number, page?: string, options?: RawAxiosRequestConfig) { - return StakeApiFp(this.configuration).fetchStakingRewards(fetchStakingRewardsRequest, limit, page, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Get staking context for an address - * @summary Get staking context - * @param {GetStakingContextRequest} getStakingContextRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof StakeApi + * @memberof TransactionHistoryApi */ - public getStakingContext(getStakingContextRequest: GetStakingContextRequest, options?: RawAxiosRequestConfig) { - return StakeApiFp(this.configuration).getStakingContext(getStakingContextRequest, options).then((request) => request(this.axios, this.basePath)); + public listAddressTransactions(networkId: string, addressId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig) { + return TransactionHistoryApiFp(this.configuration).listAddressTransactions(networkId, addressId, limit, page, options).then((request) => request(this.axios, this.basePath)); } } /** - * TradesApi - axios parameter creator + * TransfersApi - axios parameter creator * @export */ -export const TradesApiAxiosParamCreator = function (configuration?: Configuration) { +export const TransfersApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * Broadcast a trade - * @summary Broadcast a trade + * Broadcast a transfer + * @summary Broadcast a transfer * @param {string} walletId The ID of the wallet the address belongs to - * @param {string} addressId The ID of the address the trade belongs to - * @param {string} tradeId The ID of the trade to broadcast - * @param {BroadcastTradeRequest} broadcastTradeRequest + * @param {string} addressId The ID of the address the transfer belongs to + * @param {string} transferId The ID of the transfer to broadcast + * @param {BroadcastTransferRequest} broadcastTransferRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - broadcastTrade: async (walletId: string, addressId: string, tradeId: string, broadcastTradeRequest: BroadcastTradeRequest, options: RawAxiosRequestConfig = {}): Promise => { + broadcastTransfer: async (walletId: string, addressId: string, transferId: string, broadcastTransferRequest: BroadcastTransferRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'walletId' is not null or undefined - assertParamExists('broadcastTrade', 'walletId', walletId) + assertParamExists('broadcastTransfer', 'walletId', walletId) // verify required parameter 'addressId' is not null or undefined - assertParamExists('broadcastTrade', 'addressId', addressId) - // verify required parameter 'tradeId' is not null or undefined - assertParamExists('broadcastTrade', 'tradeId', tradeId) - // verify required parameter 'broadcastTradeRequest' is not null or undefined - assertParamExists('broadcastTrade', 'broadcastTradeRequest', broadcastTradeRequest) - const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/trades/{trade_id}/broadcast` + assertParamExists('broadcastTransfer', 'addressId', addressId) + // verify required parameter 'transferId' is not null or undefined + assertParamExists('broadcastTransfer', 'transferId', transferId) + // verify required parameter 'broadcastTransferRequest' is not null or undefined + assertParamExists('broadcastTransfer', 'broadcastTransferRequest', broadcastTransferRequest) + const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/transfers/{transfer_id}/broadcast` .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))) - .replace(`{${"trade_id"}}`, encodeURIComponent(String(tradeId))); + .replace(`{${"transfer_id"}}`, encodeURIComponent(String(transferId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -3263,6 +12048,9 @@ export const TradesApiAxiosParamCreator = function (configuration?: Configuratio const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -3270,7 +12058,7 @@ export const TradesApiAxiosParamCreator = function (configuration?: Configuratio setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(broadcastTradeRequest, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(broadcastTransferRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -3278,22 +12066,22 @@ export const TradesApiAxiosParamCreator = function (configuration?: Configuratio }; }, /** - * Create a new trade - * @summary Create a new trade for an address + * Create a new transfer + * @summary Create a new transfer for an address * @param {string} walletId The ID of the wallet the source address belongs to - * @param {string} addressId The ID of the address to conduct the trade from - * @param {CreateTradeRequest} createTradeRequest + * @param {string} addressId The ID of the address to transfer from + * @param {CreateTransferRequest} createTransferRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createTrade: async (walletId: string, addressId: string, createTradeRequest: CreateTradeRequest, options: RawAxiosRequestConfig = {}): Promise => { + createTransfer: async (walletId: string, addressId: string, createTransferRequest: CreateTransferRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'walletId' is not null or undefined - assertParamExists('createTrade', 'walletId', walletId) + assertParamExists('createTransfer', 'walletId', walletId) // verify required parameter 'addressId' is not null or undefined - assertParamExists('createTrade', 'addressId', addressId) - // verify required parameter 'createTradeRequest' is not null or undefined - assertParamExists('createTrade', 'createTradeRequest', createTradeRequest) - const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/trades` + assertParamExists('createTransfer', 'addressId', addressId) + // verify required parameter 'createTransferRequest' is not null or undefined + assertParamExists('createTransfer', 'createTransferRequest', createTransferRequest) + const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/transfers` .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -3307,6 +12095,9 @@ export const TradesApiAxiosParamCreator = function (configuration?: Configuratio const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -3314,7 +12105,7 @@ export const TradesApiAxiosParamCreator = function (configuration?: Configuratio setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(createTradeRequest, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(createTransferRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -3322,25 +12113,25 @@ export const TradesApiAxiosParamCreator = function (configuration?: Configuratio }; }, /** - * Get a trade by ID - * @summary Get a trade by ID + * Get a transfer by ID + * @summary Get a transfer by ID * @param {string} walletId The ID of the wallet the address belongs to - * @param {string} addressId The ID of the address the trade belongs to - * @param {string} tradeId The ID of the trade to fetch + * @param {string} addressId The ID of the address the transfer belongs to + * @param {string} transferId The ID of the transfer to fetch * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getTrade: async (walletId: string, addressId: string, tradeId: string, options: RawAxiosRequestConfig = {}): Promise => { + getTransfer: async (walletId: string, addressId: string, transferId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'walletId' is not null or undefined - assertParamExists('getTrade', 'walletId', walletId) + assertParamExists('getTransfer', 'walletId', walletId) // verify required parameter 'addressId' is not null or undefined - assertParamExists('getTrade', 'addressId', addressId) - // verify required parameter 'tradeId' is not null or undefined - assertParamExists('getTrade', 'tradeId', tradeId) - const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/trades/{trade_id}` + assertParamExists('getTransfer', 'addressId', addressId) + // verify required parameter 'transferId' is not null or undefined + assertParamExists('getTransfer', 'transferId', transferId) + const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/transfers/{transfer_id}` .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))) - .replace(`{${"trade_id"}}`, encodeURIComponent(String(tradeId))); + .replace(`{${"transfer_id"}}`, encodeURIComponent(String(transferId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -3352,6 +12143,12 @@ export const TradesApiAxiosParamCreator = function (configuration?: Configuratio const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -3364,21 +12161,21 @@ export const TradesApiAxiosParamCreator = function (configuration?: Configuratio }; }, /** - * List trades for an address. - * @summary List trades for an address. + * List transfers for an address. + * @summary List transfers for an address. * @param {string} walletId The ID of the wallet the address belongs to - * @param {string} addressId The ID of the address to list trades for + * @param {string} addressId The ID of the address to list transfers for * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listTrades: async (walletId: string, addressId: string, limit?: number, page?: string, options: RawAxiosRequestConfig = {}): Promise => { + listTransfers: async (walletId: string, addressId: string, limit?: number, page?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'walletId' is not null or undefined - assertParamExists('listTrades', 'walletId', walletId) + assertParamExists('listTransfers', 'walletId', walletId) // verify required parameter 'addressId' is not null or undefined - assertParamExists('listTrades', 'addressId', addressId) - const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/trades` + assertParamExists('listTransfers', 'addressId', addressId) + const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/transfers` .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -3392,6 +12189,12 @@ export const TradesApiAxiosParamCreator = function (configuration?: Configuratio const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } @@ -3415,292 +12218,396 @@ export const TradesApiAxiosParamCreator = function (configuration?: Configuratio }; /** - * TradesApi - functional programming interface + * TransfersApi - functional programming interface * @export */ -export const TradesApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = TradesApiAxiosParamCreator(configuration) +export const TransfersApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = TransfersApiAxiosParamCreator(configuration) return { /** - * Broadcast a trade - * @summary Broadcast a trade + * Broadcast a transfer + * @summary Broadcast a transfer * @param {string} walletId The ID of the wallet the address belongs to - * @param {string} addressId The ID of the address the trade belongs to - * @param {string} tradeId The ID of the trade to broadcast - * @param {BroadcastTradeRequest} broadcastTradeRequest + * @param {string} addressId The ID of the address the transfer belongs to + * @param {string} transferId The ID of the transfer to broadcast + * @param {BroadcastTransferRequest} broadcastTransferRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async broadcastTrade(walletId: string, addressId: string, tradeId: string, broadcastTradeRequest: BroadcastTradeRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.broadcastTrade(walletId, addressId, tradeId, broadcastTradeRequest, options); + async broadcastTransfer(walletId: string, addressId: string, transferId: string, broadcastTransferRequest: BroadcastTransferRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.broadcastTransfer(walletId, addressId, transferId, broadcastTransferRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['TradesApi.broadcastTrade']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['TransfersApi.broadcastTransfer']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Create a new trade - * @summary Create a new trade for an address + * Create a new transfer + * @summary Create a new transfer for an address * @param {string} walletId The ID of the wallet the source address belongs to - * @param {string} addressId The ID of the address to conduct the trade from - * @param {CreateTradeRequest} createTradeRequest + * @param {string} addressId The ID of the address to transfer from + * @param {CreateTransferRequest} createTransferRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createTrade(walletId: string, addressId: string, createTradeRequest: CreateTradeRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createTrade(walletId, addressId, createTradeRequest, options); + async createTransfer(walletId: string, addressId: string, createTransferRequest: CreateTransferRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createTransfer(walletId, addressId, createTransferRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['TradesApi.createTrade']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['TransfersApi.createTransfer']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Get a trade by ID - * @summary Get a trade by ID + * Get a transfer by ID + * @summary Get a transfer by ID * @param {string} walletId The ID of the wallet the address belongs to - * @param {string} addressId The ID of the address the trade belongs to - * @param {string} tradeId The ID of the trade to fetch + * @param {string} addressId The ID of the address the transfer belongs to + * @param {string} transferId The ID of the transfer to fetch * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getTrade(walletId: string, addressId: string, tradeId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getTrade(walletId, addressId, tradeId, options); + async getTransfer(walletId: string, addressId: string, transferId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTransfer(walletId, addressId, transferId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['TradesApi.getTrade']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['TransfersApi.getTransfer']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * List trades for an address. - * @summary List trades for an address. + * List transfers for an address. + * @summary List transfers for an address. * @param {string} walletId The ID of the wallet the address belongs to - * @param {string} addressId The ID of the address to list trades for + * @param {string} addressId The ID of the address to list transfers for * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listTrades(walletId: string, addressId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listTrades(walletId, addressId, limit, page, options); + async listTransfers(walletId: string, addressId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listTransfers(walletId, addressId, limit, page, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['TradesApi.listTrades']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['TransfersApi.listTransfers']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** - * TradesApi - factory interface + * TransfersApi - factory interface * @export */ -export const TradesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = TradesApiFp(configuration) +export const TransfersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = TransfersApiFp(configuration) return { /** - * Broadcast a trade - * @summary Broadcast a trade + * Broadcast a transfer + * @summary Broadcast a transfer * @param {string} walletId The ID of the wallet the address belongs to - * @param {string} addressId The ID of the address the trade belongs to - * @param {string} tradeId The ID of the trade to broadcast - * @param {BroadcastTradeRequest} broadcastTradeRequest + * @param {string} addressId The ID of the address the transfer belongs to + * @param {string} transferId The ID of the transfer to broadcast + * @param {BroadcastTransferRequest} broadcastTransferRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - broadcastTrade(walletId: string, addressId: string, tradeId: string, broadcastTradeRequest: BroadcastTradeRequest, options?: any): AxiosPromise { - return localVarFp.broadcastTrade(walletId, addressId, tradeId, broadcastTradeRequest, options).then((request) => request(axios, basePath)); + broadcastTransfer(walletId: string, addressId: string, transferId: string, broadcastTransferRequest: BroadcastTransferRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.broadcastTransfer(walletId, addressId, transferId, broadcastTransferRequest, options).then((request) => request(axios, basePath)); }, /** - * Create a new trade - * @summary Create a new trade for an address + * Create a new transfer + * @summary Create a new transfer for an address * @param {string} walletId The ID of the wallet the source address belongs to - * @param {string} addressId The ID of the address to conduct the trade from - * @param {CreateTradeRequest} createTradeRequest + * @param {string} addressId The ID of the address to transfer from + * @param {CreateTransferRequest} createTransferRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createTrade(walletId: string, addressId: string, createTradeRequest: CreateTradeRequest, options?: any): AxiosPromise { - return localVarFp.createTrade(walletId, addressId, createTradeRequest, options).then((request) => request(axios, basePath)); + createTransfer(walletId: string, addressId: string, createTransferRequest: CreateTransferRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.createTransfer(walletId, addressId, createTransferRequest, options).then((request) => request(axios, basePath)); }, /** - * Get a trade by ID - * @summary Get a trade by ID + * Get a transfer by ID + * @summary Get a transfer by ID * @param {string} walletId The ID of the wallet the address belongs to - * @param {string} addressId The ID of the address the trade belongs to - * @param {string} tradeId The ID of the trade to fetch + * @param {string} addressId The ID of the address the transfer belongs to + * @param {string} transferId The ID of the transfer to fetch * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getTrade(walletId: string, addressId: string, tradeId: string, options?: any): AxiosPromise { - return localVarFp.getTrade(walletId, addressId, tradeId, options).then((request) => request(axios, basePath)); + getTransfer(walletId: string, addressId: string, transferId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getTransfer(walletId, addressId, transferId, options).then((request) => request(axios, basePath)); }, /** - * List trades for an address. - * @summary List trades for an address. + * List transfers for an address. + * @summary List transfers for an address. * @param {string} walletId The ID of the wallet the address belongs to - * @param {string} addressId The ID of the address to list trades for + * @param {string} addressId The ID of the address to list transfers for * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listTrades(walletId: string, addressId: string, limit?: number, page?: string, options?: any): AxiosPromise { - return localVarFp.listTrades(walletId, addressId, limit, page, options).then((request) => request(axios, basePath)); + listTransfers(walletId: string, addressId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listTransfers(walletId, addressId, limit, page, options).then((request) => request(axios, basePath)); }, }; }; /** - * TradesApi - interface + * TransfersApi - interface * @export - * @interface TradesApi + * @interface TransfersApi */ -export interface TradesApiInterface { +export interface TransfersApiInterface { /** - * Broadcast a trade - * @summary Broadcast a trade + * Broadcast a transfer + * @summary Broadcast a transfer * @param {string} walletId The ID of the wallet the address belongs to - * @param {string} addressId The ID of the address the trade belongs to - * @param {string} tradeId The ID of the trade to broadcast - * @param {BroadcastTradeRequest} broadcastTradeRequest + * @param {string} addressId The ID of the address the transfer belongs to + * @param {string} transferId The ID of the transfer to broadcast + * @param {BroadcastTransferRequest} broadcastTransferRequest * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof TradesApiInterface + * @memberof TransfersApiInterface */ - broadcastTrade(walletId: string, addressId: string, tradeId: string, broadcastTradeRequest: BroadcastTradeRequest, options?: RawAxiosRequestConfig): AxiosPromise; + broadcastTransfer(walletId: string, addressId: string, transferId: string, broadcastTransferRequest: BroadcastTransferRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** - * Create a new trade - * @summary Create a new trade for an address + * Create a new transfer + * @summary Create a new transfer for an address * @param {string} walletId The ID of the wallet the source address belongs to - * @param {string} addressId The ID of the address to conduct the trade from - * @param {CreateTradeRequest} createTradeRequest + * @param {string} addressId The ID of the address to transfer from + * @param {CreateTransferRequest} createTransferRequest * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof TradesApiInterface + * @memberof TransfersApiInterface */ - createTrade(walletId: string, addressId: string, createTradeRequest: CreateTradeRequest, options?: RawAxiosRequestConfig): AxiosPromise; + createTransfer(walletId: string, addressId: string, createTransferRequest: CreateTransferRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** - * Get a trade by ID - * @summary Get a trade by ID + * Get a transfer by ID + * @summary Get a transfer by ID * @param {string} walletId The ID of the wallet the address belongs to - * @param {string} addressId The ID of the address the trade belongs to - * @param {string} tradeId The ID of the trade to fetch + * @param {string} addressId The ID of the address the transfer belongs to + * @param {string} transferId The ID of the transfer to fetch * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof TradesApiInterface + * @memberof TransfersApiInterface */ - getTrade(walletId: string, addressId: string, tradeId: string, options?: RawAxiosRequestConfig): AxiosPromise; + getTransfer(walletId: string, addressId: string, transferId: string, options?: RawAxiosRequestConfig): AxiosPromise; /** - * List trades for an address. - * @summary List trades for an address. + * List transfers for an address. + * @summary List transfers for an address. * @param {string} walletId The ID of the wallet the address belongs to - * @param {string} addressId The ID of the address to list trades for + * @param {string} addressId The ID of the address to list transfers for * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof TradesApiInterface + * @memberof TransfersApiInterface */ - listTrades(walletId: string, addressId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise; + listTransfers(walletId: string, addressId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise; } /** - * TradesApi - object-oriented interface + * TransfersApi - object-oriented interface * @export - * @class TradesApi + * @class TransfersApi * @extends {BaseAPI} */ -export class TradesApi extends BaseAPI implements TradesApiInterface { +export class TransfersApi extends BaseAPI implements TransfersApiInterface { /** - * Broadcast a trade - * @summary Broadcast a trade + * Broadcast a transfer + * @summary Broadcast a transfer * @param {string} walletId The ID of the wallet the address belongs to - * @param {string} addressId The ID of the address the trade belongs to - * @param {string} tradeId The ID of the trade to broadcast - * @param {BroadcastTradeRequest} broadcastTradeRequest + * @param {string} addressId The ID of the address the transfer belongs to + * @param {string} transferId The ID of the transfer to broadcast + * @param {BroadcastTransferRequest} broadcastTransferRequest * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof TradesApi + * @memberof TransfersApi */ - public broadcastTrade(walletId: string, addressId: string, tradeId: string, broadcastTradeRequest: BroadcastTradeRequest, options?: RawAxiosRequestConfig) { - return TradesApiFp(this.configuration).broadcastTrade(walletId, addressId, tradeId, broadcastTradeRequest, options).then((request) => request(this.axios, this.basePath)); + public broadcastTransfer(walletId: string, addressId: string, transferId: string, broadcastTransferRequest: BroadcastTransferRequest, options?: RawAxiosRequestConfig) { + return TransfersApiFp(this.configuration).broadcastTransfer(walletId, addressId, transferId, broadcastTransferRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * Create a new trade - * @summary Create a new trade for an address + * Create a new transfer + * @summary Create a new transfer for an address * @param {string} walletId The ID of the wallet the source address belongs to - * @param {string} addressId The ID of the address to conduct the trade from - * @param {CreateTradeRequest} createTradeRequest + * @param {string} addressId The ID of the address to transfer from + * @param {CreateTransferRequest} createTransferRequest * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof TradesApi + * @memberof TransfersApi */ - public createTrade(walletId: string, addressId: string, createTradeRequest: CreateTradeRequest, options?: RawAxiosRequestConfig) { - return TradesApiFp(this.configuration).createTrade(walletId, addressId, createTradeRequest, options).then((request) => request(this.axios, this.basePath)); + public createTransfer(walletId: string, addressId: string, createTransferRequest: CreateTransferRequest, options?: RawAxiosRequestConfig) { + return TransfersApiFp(this.configuration).createTransfer(walletId, addressId, createTransferRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * Get a trade by ID - * @summary Get a trade by ID + * Get a transfer by ID + * @summary Get a transfer by ID * @param {string} walletId The ID of the wallet the address belongs to - * @param {string} addressId The ID of the address the trade belongs to - * @param {string} tradeId The ID of the trade to fetch + * @param {string} addressId The ID of the address the transfer belongs to + * @param {string} transferId The ID of the transfer to fetch * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof TradesApi + * @memberof TransfersApi + */ + public getTransfer(walletId: string, addressId: string, transferId: string, options?: RawAxiosRequestConfig) { + return TransfersApiFp(this.configuration).getTransfer(walletId, addressId, transferId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * List transfers for an address. + * @summary List transfers for an address. + * @param {string} walletId The ID of the wallet the address belongs to + * @param {string} addressId The ID of the address to list transfers for + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransfersApi + */ + public listTransfers(walletId: string, addressId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig) { + return TransfersApiFp(this.configuration).listTransfers(walletId, addressId, limit, page, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * UsersApi - axios parameter creator + * @export + */ +export const UsersApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Get current user + * @summary Get current user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCurrentUser: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/users/me`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * UsersApi - functional programming interface + * @export + */ +export const UsersApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = UsersApiAxiosParamCreator(configuration) + return { + /** + * Get current user + * @summary Get current user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getCurrentUser(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getCurrentUser(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['UsersApi.getCurrentUser']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * UsersApi - factory interface + * @export + */ +export const UsersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = UsersApiFp(configuration) + return { + /** + * Get current user + * @summary Get current user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCurrentUser(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getCurrentUser(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * UsersApi - interface + * @export + * @interface UsersApi + */ +export interface UsersApiInterface { + /** + * Get current user + * @summary Get current user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UsersApiInterface */ - public getTrade(walletId: string, addressId: string, tradeId: string, options?: RawAxiosRequestConfig) { - return TradesApiFp(this.configuration).getTrade(walletId, addressId, tradeId, options).then((request) => request(this.axios, this.basePath)); - } + getCurrentUser(options?: RawAxiosRequestConfig): AxiosPromise; +} + +/** + * UsersApi - object-oriented interface + * @export + * @class UsersApi + * @extends {BaseAPI} + */ +export class UsersApi extends BaseAPI implements UsersApiInterface { /** - * List trades for an address. - * @summary List trades for an address. - * @param {string} walletId The ID of the wallet the address belongs to - * @param {string} addressId The ID of the address to list trades for - * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. - * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * Get current user + * @summary Get current user * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof TradesApi + * @memberof UsersApi */ - public listTrades(walletId: string, addressId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig) { - return TradesApiFp(this.configuration).listTrades(walletId, addressId, limit, page, options).then((request) => request(this.axios, this.basePath)); + public getCurrentUser(options?: RawAxiosRequestConfig) { + return UsersApiFp(this.configuration).getCurrentUser(options).then((request) => request(this.axios, this.basePath)); } } /** - * TransfersApi - axios parameter creator + * WalletsApi - axios parameter creator * @export */ -export const TransfersApiAxiosParamCreator = function (configuration?: Configuration) { +export const WalletsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * Broadcast a transfer - * @summary Broadcast a transfer - * @param {string} walletId The ID of the wallet the address belongs to - * @param {string} addressId The ID of the address the transfer belongs to - * @param {string} transferId The ID of the transfer to broadcast - * @param {BroadcastTransferRequest} broadcastTransferRequest + * Create a new wallet scoped to the user. + * @summary Create a new wallet + * @param {CreateWalletRequest} [createWalletRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - broadcastTransfer: async (walletId: string, addressId: string, transferId: string, broadcastTransferRequest: BroadcastTransferRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'walletId' is not null or undefined - assertParamExists('broadcastTransfer', 'walletId', walletId) - // verify required parameter 'addressId' is not null or undefined - assertParamExists('broadcastTransfer', 'addressId', addressId) - // verify required parameter 'transferId' is not null or undefined - assertParamExists('broadcastTransfer', 'transferId', transferId) - // verify required parameter 'broadcastTransferRequest' is not null or undefined - assertParamExists('broadcastTransfer', 'broadcastTransferRequest', broadcastTransferRequest) - const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/transfers/{transfer_id}/broadcast` - .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) - .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))) - .replace(`{${"transfer_id"}}`, encodeURIComponent(String(transferId))); + createWallet: async (createWalletRequest?: CreateWalletRequest, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/wallets`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -3712,6 +12619,9 @@ export const TransfersApiAxiosParamCreator = function (configuration?: Configura const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -3719,7 +12629,7 @@ export const TransfersApiAxiosParamCreator = function (configuration?: Configura setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(broadcastTransferRequest, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(createWalletRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -3727,24 +12637,17 @@ export const TransfersApiAxiosParamCreator = function (configuration?: Configura }; }, /** - * Create a new transfer - * @summary Create a new transfer for an address - * @param {string} walletId The ID of the wallet the source address belongs to - * @param {string} addressId The ID of the address to transfer from - * @param {CreateTransferRequest} createTransferRequest + * Get wallet + * @summary Get wallet by ID + * @param {string} walletId The ID of the wallet to fetch * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createTransfer: async (walletId: string, addressId: string, createTransferRequest: CreateTransferRequest, options: RawAxiosRequestConfig = {}): Promise => { + getWallet: async (walletId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'walletId' is not null or undefined - assertParamExists('createTransfer', 'walletId', walletId) - // verify required parameter 'addressId' is not null or undefined - assertParamExists('createTransfer', 'addressId', addressId) - // verify required parameter 'createTransferRequest' is not null or undefined - assertParamExists('createTransfer', 'createTransferRequest', createTransferRequest) - const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/transfers` - .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) - .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))); + assertParamExists('getWallet', 'walletId', walletId) + const localVarPath = `/v1/wallets/{wallet_id}` + .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -3752,18 +12655,21 @@ export const TransfersApiAxiosParamCreator = function (configuration?: Configura baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) - - localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(createTransferRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -3771,25 +12677,21 @@ export const TransfersApiAxiosParamCreator = function (configuration?: Configura }; }, /** - * Get a transfer by ID - * @summary Get a transfer by ID - * @param {string} walletId The ID of the wallet the address belongs to - * @param {string} addressId The ID of the address the transfer belongs to - * @param {string} transferId The ID of the transfer to fetch + * Get the aggregated balance of an asset across all of the addresses in the wallet. + * @summary Get the balance of an asset in the wallet + * @param {string} walletId The ID of the wallet to fetch the balance for + * @param {string} assetId The symbol of the asset to fetch the balance for * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getTransfer: async (walletId: string, addressId: string, transferId: string, options: RawAxiosRequestConfig = {}): Promise => { + getWalletBalance: async (walletId: string, assetId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'walletId' is not null or undefined - assertParamExists('getTransfer', 'walletId', walletId) - // verify required parameter 'addressId' is not null or undefined - assertParamExists('getTransfer', 'addressId', addressId) - // verify required parameter 'transferId' is not null or undefined - assertParamExists('getTransfer', 'transferId', transferId) - const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/transfers/{transfer_id}` + assertParamExists('getWalletBalance', 'walletId', walletId) + // verify required parameter 'assetId' is not null or undefined + assertParamExists('getWalletBalance', 'assetId', assetId) + const localVarPath = `/v1/wallets/{wallet_id}/balances/{asset_id}` .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) - .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))) - .replace(`{${"transfer_id"}}`, encodeURIComponent(String(transferId))); + .replace(`{${"asset_id"}}`, encodeURIComponent(String(assetId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -3801,6 +12703,12 @@ export const TransfersApiAxiosParamCreator = function (configuration?: Configura const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -3813,23 +12721,55 @@ export const TransfersApiAxiosParamCreator = function (configuration?: Configura }; }, /** - * List transfers for an address. - * @summary List transfers for an address. - * @param {string} walletId The ID of the wallet the address belongs to - * @param {string} addressId The ID of the address to list transfers for + * List the balances of all of the addresses in the wallet aggregated by asset. + * @summary List wallet balances + * @param {string} walletId The ID of the wallet to fetch the balances for + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listWalletBalances: async (walletId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'walletId' is not null or undefined + assertParamExists('listWalletBalances', 'walletId', walletId) + const localVarPath = `/v1/wallets/{wallet_id}/balances` + .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * List wallets belonging to the user. + * @summary List wallets * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listTransfers: async (walletId: string, addressId: string, limit?: number, page?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'walletId' is not null or undefined - assertParamExists('listTransfers', 'walletId', walletId) - // verify required parameter 'addressId' is not null or undefined - assertParamExists('listTransfers', 'addressId', addressId) - const localVarPath = `/v1/wallets/{wallet_id}/addresses/{address_id}/transfers` - .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) - .replace(`{${"address_id"}}`, encodeURIComponent(String(addressId))); + listWallets: async (limit?: number, page?: string, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/wallets`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -3841,6 +12781,12 @@ export const TransfersApiAxiosParamCreator = function (configuration?: Configura const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } @@ -3864,396 +12810,295 @@ export const TransfersApiAxiosParamCreator = function (configuration?: Configura }; /** - * TransfersApi - functional programming interface + * WalletsApi - functional programming interface * @export */ -export const TransfersApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = TransfersApiAxiosParamCreator(configuration) +export const WalletsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = WalletsApiAxiosParamCreator(configuration) return { /** - * Broadcast a transfer - * @summary Broadcast a transfer - * @param {string} walletId The ID of the wallet the address belongs to - * @param {string} addressId The ID of the address the transfer belongs to - * @param {string} transferId The ID of the transfer to broadcast - * @param {BroadcastTransferRequest} broadcastTransferRequest + * Create a new wallet scoped to the user. + * @summary Create a new wallet + * @param {CreateWalletRequest} [createWalletRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async broadcastTransfer(walletId: string, addressId: string, transferId: string, broadcastTransferRequest: BroadcastTransferRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.broadcastTransfer(walletId, addressId, transferId, broadcastTransferRequest, options); + async createWallet(createWalletRequest?: CreateWalletRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createWallet(createWalletRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['TransfersApi.broadcastTransfer']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['WalletsApi.createWallet']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Create a new transfer - * @summary Create a new transfer for an address - * @param {string} walletId The ID of the wallet the source address belongs to - * @param {string} addressId The ID of the address to transfer from - * @param {CreateTransferRequest} createTransferRequest + * Get wallet + * @summary Get wallet by ID + * @param {string} walletId The ID of the wallet to fetch * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createTransfer(walletId: string, addressId: string, createTransferRequest: CreateTransferRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createTransfer(walletId, addressId, createTransferRequest, options); + async getWallet(walletId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getWallet(walletId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['TransfersApi.createTransfer']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['WalletsApi.getWallet']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Get a transfer by ID - * @summary Get a transfer by ID - * @param {string} walletId The ID of the wallet the address belongs to - * @param {string} addressId The ID of the address the transfer belongs to - * @param {string} transferId The ID of the transfer to fetch + * Get the aggregated balance of an asset across all of the addresses in the wallet. + * @summary Get the balance of an asset in the wallet + * @param {string} walletId The ID of the wallet to fetch the balance for + * @param {string} assetId The symbol of the asset to fetch the balance for * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getTransfer(walletId: string, addressId: string, transferId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getTransfer(walletId, addressId, transferId, options); + async getWalletBalance(walletId: string, assetId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getWalletBalance(walletId, assetId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['TransfersApi.getTransfer']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['WalletsApi.getWalletBalance']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * List transfers for an address. - * @summary List transfers for an address. - * @param {string} walletId The ID of the wallet the address belongs to - * @param {string} addressId The ID of the address to list transfers for + * List the balances of all of the addresses in the wallet aggregated by asset. + * @summary List wallet balances + * @param {string} walletId The ID of the wallet to fetch the balances for + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listWalletBalances(walletId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listWalletBalances(walletId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['WalletsApi.listWalletBalances']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * List wallets belonging to the user. + * @summary List wallets * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listTransfers(walletId: string, addressId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listTransfers(walletId, addressId, limit, page, options); + async listWallets(limit?: number, page?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listWallets(limit, page, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['TransfersApi.listTransfers']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['WalletsApi.listWallets']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** - * TransfersApi - factory interface + * WalletsApi - factory interface * @export */ -export const TransfersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = TransfersApiFp(configuration) +export const WalletsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = WalletsApiFp(configuration) return { /** - * Broadcast a transfer - * @summary Broadcast a transfer - * @param {string} walletId The ID of the wallet the address belongs to - * @param {string} addressId The ID of the address the transfer belongs to - * @param {string} transferId The ID of the transfer to broadcast - * @param {BroadcastTransferRequest} broadcastTransferRequest + * Create a new wallet scoped to the user. + * @summary Create a new wallet + * @param {CreateWalletRequest} [createWalletRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createWallet(createWalletRequest?: CreateWalletRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.createWallet(createWalletRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Get wallet + * @summary Get wallet by ID + * @param {string} walletId The ID of the wallet to fetch * @param {*} [options] Override http request option. * @throws {RequiredError} */ - broadcastTransfer(walletId: string, addressId: string, transferId: string, broadcastTransferRequest: BroadcastTransferRequest, options?: any): AxiosPromise { - return localVarFp.broadcastTransfer(walletId, addressId, transferId, broadcastTransferRequest, options).then((request) => request(axios, basePath)); + getWallet(walletId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getWallet(walletId, options).then((request) => request(axios, basePath)); }, /** - * Create a new transfer - * @summary Create a new transfer for an address - * @param {string} walletId The ID of the wallet the source address belongs to - * @param {string} addressId The ID of the address to transfer from - * @param {CreateTransferRequest} createTransferRequest + * Get the aggregated balance of an asset across all of the addresses in the wallet. + * @summary Get the balance of an asset in the wallet + * @param {string} walletId The ID of the wallet to fetch the balance for + * @param {string} assetId The symbol of the asset to fetch the balance for * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createTransfer(walletId: string, addressId: string, createTransferRequest: CreateTransferRequest, options?: any): AxiosPromise { - return localVarFp.createTransfer(walletId, addressId, createTransferRequest, options).then((request) => request(axios, basePath)); + getWalletBalance(walletId: string, assetId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getWalletBalance(walletId, assetId, options).then((request) => request(axios, basePath)); }, /** - * Get a transfer by ID - * @summary Get a transfer by ID - * @param {string} walletId The ID of the wallet the address belongs to - * @param {string} addressId The ID of the address the transfer belongs to - * @param {string} transferId The ID of the transfer to fetch + * List the balances of all of the addresses in the wallet aggregated by asset. + * @summary List wallet balances + * @param {string} walletId The ID of the wallet to fetch the balances for * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getTransfer(walletId: string, addressId: string, transferId: string, options?: any): AxiosPromise { - return localVarFp.getTransfer(walletId, addressId, transferId, options).then((request) => request(axios, basePath)); + listWalletBalances(walletId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listWalletBalances(walletId, options).then((request) => request(axios, basePath)); }, /** - * List transfers for an address. - * @summary List transfers for an address. - * @param {string} walletId The ID of the wallet the address belongs to - * @param {string} addressId The ID of the address to list transfers for + * List wallets belonging to the user. + * @summary List wallets * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listTransfers(walletId: string, addressId: string, limit?: number, page?: string, options?: any): AxiosPromise { - return localVarFp.listTransfers(walletId, addressId, limit, page, options).then((request) => request(axios, basePath)); + listWallets(limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listWallets(limit, page, options).then((request) => request(axios, basePath)); }, }; }; /** - * TransfersApi - interface + * WalletsApi - interface * @export - * @interface TransfersApi + * @interface WalletsApi */ -export interface TransfersApiInterface { +export interface WalletsApiInterface { /** - * Broadcast a transfer - * @summary Broadcast a transfer - * @param {string} walletId The ID of the wallet the address belongs to - * @param {string} addressId The ID of the address the transfer belongs to - * @param {string} transferId The ID of the transfer to broadcast - * @param {BroadcastTransferRequest} broadcastTransferRequest + * Create a new wallet scoped to the user. + * @summary Create a new wallet + * @param {CreateWalletRequest} [createWalletRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof TransfersApiInterface + * @memberof WalletsApiInterface */ - broadcastTransfer(walletId: string, addressId: string, transferId: string, broadcastTransferRequest: BroadcastTransferRequest, options?: RawAxiosRequestConfig): AxiosPromise; + createWallet(createWalletRequest?: CreateWalletRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** - * Create a new transfer - * @summary Create a new transfer for an address - * @param {string} walletId The ID of the wallet the source address belongs to - * @param {string} addressId The ID of the address to transfer from - * @param {CreateTransferRequest} createTransferRequest + * Get wallet + * @summary Get wallet by ID + * @param {string} walletId The ID of the wallet to fetch * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof TransfersApiInterface + * @memberof WalletsApiInterface */ - createTransfer(walletId: string, addressId: string, createTransferRequest: CreateTransferRequest, options?: RawAxiosRequestConfig): AxiosPromise; + getWallet(walletId: string, options?: RawAxiosRequestConfig): AxiosPromise; /** - * Get a transfer by ID - * @summary Get a transfer by ID - * @param {string} walletId The ID of the wallet the address belongs to - * @param {string} addressId The ID of the address the transfer belongs to - * @param {string} transferId The ID of the transfer to fetch + * Get the aggregated balance of an asset across all of the addresses in the wallet. + * @summary Get the balance of an asset in the wallet + * @param {string} walletId The ID of the wallet to fetch the balance for + * @param {string} assetId The symbol of the asset to fetch the balance for * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof TransfersApiInterface + * @memberof WalletsApiInterface */ - getTransfer(walletId: string, addressId: string, transferId: string, options?: RawAxiosRequestConfig): AxiosPromise; + getWalletBalance(walletId: string, assetId: string, options?: RawAxiosRequestConfig): AxiosPromise; /** - * List transfers for an address. - * @summary List transfers for an address. - * @param {string} walletId The ID of the wallet the address belongs to - * @param {string} addressId The ID of the address to list transfers for + * List the balances of all of the addresses in the wallet aggregated by asset. + * @summary List wallet balances + * @param {string} walletId The ID of the wallet to fetch the balances for + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WalletsApiInterface + */ + listWalletBalances(walletId: string, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * List wallets belonging to the user. + * @summary List wallets * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof TransfersApiInterface + * @memberof WalletsApiInterface */ - listTransfers(walletId: string, addressId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise; + listWallets(limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise; } /** - * TransfersApi - object-oriented interface + * WalletsApi - object-oriented interface * @export - * @class TransfersApi + * @class WalletsApi * @extends {BaseAPI} */ -export class TransfersApi extends BaseAPI implements TransfersApiInterface { - /** - * Broadcast a transfer - * @summary Broadcast a transfer - * @param {string} walletId The ID of the wallet the address belongs to - * @param {string} addressId The ID of the address the transfer belongs to - * @param {string} transferId The ID of the transfer to broadcast - * @param {BroadcastTransferRequest} broadcastTransferRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof TransfersApi - */ - public broadcastTransfer(walletId: string, addressId: string, transferId: string, broadcastTransferRequest: BroadcastTransferRequest, options?: RawAxiosRequestConfig) { - return TransfersApiFp(this.configuration).broadcastTransfer(walletId, addressId, transferId, broadcastTransferRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Create a new transfer - * @summary Create a new transfer for an address - * @param {string} walletId The ID of the wallet the source address belongs to - * @param {string} addressId The ID of the address to transfer from - * @param {CreateTransferRequest} createTransferRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof TransfersApi - */ - public createTransfer(walletId: string, addressId: string, createTransferRequest: CreateTransferRequest, options?: RawAxiosRequestConfig) { - return TransfersApiFp(this.configuration).createTransfer(walletId, addressId, createTransferRequest, options).then((request) => request(this.axios, this.basePath)); - } - +export class WalletsApi extends BaseAPI implements WalletsApiInterface { /** - * Get a transfer by ID - * @summary Get a transfer by ID - * @param {string} walletId The ID of the wallet the address belongs to - * @param {string} addressId The ID of the address the transfer belongs to - * @param {string} transferId The ID of the transfer to fetch + * Create a new wallet scoped to the user. + * @summary Create a new wallet + * @param {CreateWalletRequest} [createWalletRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof TransfersApi + * @memberof WalletsApi */ - public getTransfer(walletId: string, addressId: string, transferId: string, options?: RawAxiosRequestConfig) { - return TransfersApiFp(this.configuration).getTransfer(walletId, addressId, transferId, options).then((request) => request(this.axios, this.basePath)); + public createWallet(createWalletRequest?: CreateWalletRequest, options?: RawAxiosRequestConfig) { + return WalletsApiFp(this.configuration).createWallet(createWalletRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * List transfers for an address. - * @summary List transfers for an address. - * @param {string} walletId The ID of the wallet the address belongs to - * @param {string} addressId The ID of the address to list transfers for - * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. - * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * Get wallet + * @summary Get wallet by ID + * @param {string} walletId The ID of the wallet to fetch * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof TransfersApi + * @memberof WalletsApi */ - public listTransfers(walletId: string, addressId: string, limit?: number, page?: string, options?: RawAxiosRequestConfig) { - return TransfersApiFp(this.configuration).listTransfers(walletId, addressId, limit, page, options).then((request) => request(this.axios, this.basePath)); - } -} - - - -/** - * UsersApi - axios parameter creator - * @export - */ -export const UsersApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Get current user - * @summary Get current user - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getCurrentUser: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/v1/users/me`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * UsersApi - functional programming interface - * @export - */ -export const UsersApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = UsersApiAxiosParamCreator(configuration) - return { - /** - * Get current user - * @summary Get current user - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getCurrentUser(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getCurrentUser(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['UsersApi.getCurrentUser']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * UsersApi - factory interface - * @export - */ -export const UsersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = UsersApiFp(configuration) - return { - /** - * Get current user - * @summary Get current user - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getCurrentUser(options?: any): AxiosPromise { - return localVarFp.getCurrentUser(options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * UsersApi - interface - * @export - * @interface UsersApi - */ -export interface UsersApiInterface { + public getWallet(walletId: string, options?: RawAxiosRequestConfig) { + return WalletsApiFp(this.configuration).getWallet(walletId, options).then((request) => request(this.axios, this.basePath)); + } + /** - * Get current user - * @summary Get current user + * Get the aggregated balance of an asset across all of the addresses in the wallet. + * @summary Get the balance of an asset in the wallet + * @param {string} walletId The ID of the wallet to fetch the balance for + * @param {string} assetId The symbol of the asset to fetch the balance for * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof UsersApiInterface + * @memberof WalletsApi */ - getCurrentUser(options?: RawAxiosRequestConfig): AxiosPromise; + public getWalletBalance(walletId: string, assetId: string, options?: RawAxiosRequestConfig) { + return WalletsApiFp(this.configuration).getWalletBalance(walletId, assetId, options).then((request) => request(this.axios, this.basePath)); + } -} + /** + * List the balances of all of the addresses in the wallet aggregated by asset. + * @summary List wallet balances + * @param {string} walletId The ID of the wallet to fetch the balances for + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WalletsApi + */ + public listWalletBalances(walletId: string, options?: RawAxiosRequestConfig) { + return WalletsApiFp(this.configuration).listWalletBalances(walletId, options).then((request) => request(this.axios, this.basePath)); + } -/** - * UsersApi - object-oriented interface - * @export - * @class UsersApi - * @extends {BaseAPI} - */ -export class UsersApi extends BaseAPI implements UsersApiInterface { /** - * Get current user - * @summary Get current user + * List wallets belonging to the user. + * @summary List wallets + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof UsersApi + * @memberof WalletsApi */ - public getCurrentUser(options?: RawAxiosRequestConfig) { - return UsersApiFp(this.configuration).getCurrentUser(options).then((request) => request(this.axios, this.basePath)); + public listWallets(limit?: number, page?: string, options?: RawAxiosRequestConfig) { + return WalletsApiFp(this.configuration).listWallets(limit, page, options).then((request) => request(this.axios, this.basePath)); } } /** - * WalletsApi - axios parameter creator + * WebhooksApi - axios parameter creator * @export */ -export const WalletsApiAxiosParamCreator = function (configuration?: Configuration) { +export const WebhooksApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * Create a new wallet scoped to the user. - * @summary Create a new wallet - * @param {CreateWalletRequest} [createWalletRequest] + * Create a new webhook scoped to a wallet + * @summary Create a new webhook scoped to a wallet + * @param {string} walletId The ID of the wallet to create the webhook for. + * @param {CreateWalletWebhookRequest} [createWalletWebhookRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createWallet: async (createWalletRequest?: CreateWalletRequest, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/v1/wallets`; + createWalletWebhook: async (walletId: string, createWalletWebhookRequest?: CreateWalletWebhookRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'walletId' is not null or undefined + assertParamExists('createWalletWebhook', 'walletId', walletId) + const localVarPath = `/v1/wallets/{wallet_id}/webhooks` + .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -4265,6 +13110,12 @@ export const WalletsApiAxiosParamCreator = function (configuration?: Configurati const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -4272,7 +13123,7 @@ export const WalletsApiAxiosParamCreator = function (configuration?: Configurati setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(createWalletRequest, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(createWalletWebhookRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -4280,17 +13131,14 @@ export const WalletsApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * Get wallet - * @summary Get wallet by ID - * @param {string} walletId The ID of the wallet to fetch + * Create a new webhook + * @summary Create a new webhook + * @param {CreateWebhookRequest} [createWebhookRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getWallet: async (walletId: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'walletId' is not null or undefined - assertParamExists('getWallet', 'walletId', walletId) - const localVarPath = `/v1/wallets/{wallet_id}` - .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))); + createWebhook: async (createWebhookRequest?: CreateWebhookRequest, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/webhooks`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -4298,15 +13146,24 @@ export const WalletsApiAxiosParamCreator = function (configuration?: Configurati baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createWebhookRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -4314,21 +13171,17 @@ export const WalletsApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * Get the aggregated balance of an asset across all of the addresses in the wallet. - * @summary Get the balance of an asset in the wallet - * @param {string} walletId The ID of the wallet to fetch the balance for - * @param {string} assetId The symbol of the asset to fetch the balance for + * Delete a webhook + * @summary Delete a webhook + * @param {string} webhookId The Webhook uuid that needs to be deleted * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getWalletBalance: async (walletId: string, assetId: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'walletId' is not null or undefined - assertParamExists('getWalletBalance', 'walletId', walletId) - // verify required parameter 'assetId' is not null or undefined - assertParamExists('getWalletBalance', 'assetId', assetId) - const localVarPath = `/v1/wallets/{wallet_id}/balances/{asset_id}` - .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))) - .replace(`{${"asset_id"}}`, encodeURIComponent(String(assetId))); + deleteWebhook: async (webhookId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'webhookId' is not null or undefined + assertParamExists('deleteWebhook', 'webhookId', webhookId) + const localVarPath = `/v1/webhooks/{webhook_id}` + .replace(`{${"webhook_id"}}`, encodeURIComponent(String(webhookId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -4336,10 +13189,16 @@ export const WalletsApiAxiosParamCreator = function (configuration?: Configurati baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -4352,17 +13211,15 @@ export const WalletsApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * List the balances of all of the addresses in the wallet aggregated by asset. - * @summary List wallet balances - * @param {string} walletId The ID of the wallet to fetch the balances for + * List webhooks, optionally filtered by event type. + * @summary List webhooks + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listWalletBalances: async (walletId: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'walletId' is not null or undefined - assertParamExists('listWalletBalances', 'walletId', walletId) - const localVarPath = `/v1/wallets/{wallet_id}/balances` - .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId))); + listWebhooks: async (limit?: number, page?: string, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/webhooks`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -4374,6 +13231,20 @@ export const WalletsApiAxiosParamCreator = function (configuration?: Configurati const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -4386,15 +13257,18 @@ export const WalletsApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * List wallets belonging to the user. - * @summary List wallets - * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. - * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * Update a webhook + * @summary Update a webhook + * @param {string} webhookId The Webhook id that needs to be updated + * @param {UpdateWebhookRequest} [updateWebhookRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listWallets: async (limit?: number, page?: string, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/v1/wallets`; + updateWebhook: async (webhookId: string, updateWebhookRequest?: UpdateWebhookRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'webhookId' is not null or undefined + assertParamExists('updateWebhook', 'webhookId', webhookId) + const localVarPath = `/v1/webhooks/{webhook_id}` + .replace(`{${"webhook_id"}}`, encodeURIComponent(String(webhookId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -4402,23 +13276,24 @@ export const WalletsApiAxiosParamCreator = function (configuration?: Configurati baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } + // authentication apiKey required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } + // authentication session required + await setApiKeyToObject(localVarHeaderParameter, "Jwt", configuration) + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(updateWebhookRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -4429,271 +13304,275 @@ export const WalletsApiAxiosParamCreator = function (configuration?: Configurati }; /** - * WalletsApi - functional programming interface + * WebhooksApi - functional programming interface * @export */ -export const WalletsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = WalletsApiAxiosParamCreator(configuration) +export const WebhooksApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = WebhooksApiAxiosParamCreator(configuration) return { /** - * Create a new wallet scoped to the user. - * @summary Create a new wallet - * @param {CreateWalletRequest} [createWalletRequest] + * Create a new webhook scoped to a wallet + * @summary Create a new webhook scoped to a wallet + * @param {string} walletId The ID of the wallet to create the webhook for. + * @param {CreateWalletWebhookRequest} [createWalletWebhookRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createWallet(createWalletRequest?: CreateWalletRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createWallet(createWalletRequest, options); + async createWalletWebhook(walletId: string, createWalletWebhookRequest?: CreateWalletWebhookRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createWalletWebhook(walletId, createWalletWebhookRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['WalletsApi.createWallet']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['WebhooksApi.createWalletWebhook']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Get wallet - * @summary Get wallet by ID - * @param {string} walletId The ID of the wallet to fetch + * Create a new webhook + * @summary Create a new webhook + * @param {CreateWebhookRequest} [createWebhookRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getWallet(walletId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getWallet(walletId, options); + async createWebhook(createWebhookRequest?: CreateWebhookRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createWebhook(createWebhookRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['WalletsApi.getWallet']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['WebhooksApi.createWebhook']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Get the aggregated balance of an asset across all of the addresses in the wallet. - * @summary Get the balance of an asset in the wallet - * @param {string} walletId The ID of the wallet to fetch the balance for - * @param {string} assetId The symbol of the asset to fetch the balance for + * Delete a webhook + * @summary Delete a webhook + * @param {string} webhookId The Webhook uuid that needs to be deleted * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getWalletBalance(walletId: string, assetId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getWalletBalance(walletId, assetId, options); + async deleteWebhook(webhookId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteWebhook(webhookId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['WalletsApi.getWalletBalance']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['WebhooksApi.deleteWebhook']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * List the balances of all of the addresses in the wallet aggregated by asset. - * @summary List wallet balances - * @param {string} walletId The ID of the wallet to fetch the balances for + * List webhooks, optionally filtered by event type. + * @summary List webhooks + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listWalletBalances(walletId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listWalletBalances(walletId, options); + async listWebhooks(limit?: number, page?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listWebhooks(limit, page, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['WalletsApi.listWalletBalances']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['WebhooksApi.listWebhooks']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * List wallets belonging to the user. - * @summary List wallets - * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. - * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * Update a webhook + * @summary Update a webhook + * @param {string} webhookId The Webhook id that needs to be updated + * @param {UpdateWebhookRequest} [updateWebhookRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listWallets(limit?: number, page?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listWallets(limit, page, options); + async updateWebhook(webhookId: string, updateWebhookRequest?: UpdateWebhookRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateWebhook(webhookId, updateWebhookRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['WalletsApi.listWallets']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['WebhooksApi.updateWebhook']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** - * WalletsApi - factory interface + * WebhooksApi - factory interface * @export */ -export const WalletsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = WalletsApiFp(configuration) +export const WebhooksApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = WebhooksApiFp(configuration) return { /** - * Create a new wallet scoped to the user. - * @summary Create a new wallet - * @param {CreateWalletRequest} [createWalletRequest] + * Create a new webhook scoped to a wallet + * @summary Create a new webhook scoped to a wallet + * @param {string} walletId The ID of the wallet to create the webhook for. + * @param {CreateWalletWebhookRequest} [createWalletWebhookRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createWallet(createWalletRequest?: CreateWalletRequest, options?: any): AxiosPromise { - return localVarFp.createWallet(createWalletRequest, options).then((request) => request(axios, basePath)); + createWalletWebhook(walletId: string, createWalletWebhookRequest?: CreateWalletWebhookRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.createWalletWebhook(walletId, createWalletWebhookRequest, options).then((request) => request(axios, basePath)); }, /** - * Get wallet - * @summary Get wallet by ID - * @param {string} walletId The ID of the wallet to fetch + * Create a new webhook + * @summary Create a new webhook + * @param {CreateWebhookRequest} [createWebhookRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getWallet(walletId: string, options?: any): AxiosPromise { - return localVarFp.getWallet(walletId, options).then((request) => request(axios, basePath)); + createWebhook(createWebhookRequest?: CreateWebhookRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.createWebhook(createWebhookRequest, options).then((request) => request(axios, basePath)); }, /** - * Get the aggregated balance of an asset across all of the addresses in the wallet. - * @summary Get the balance of an asset in the wallet - * @param {string} walletId The ID of the wallet to fetch the balance for - * @param {string} assetId The symbol of the asset to fetch the balance for + * Delete a webhook + * @summary Delete a webhook + * @param {string} webhookId The Webhook uuid that needs to be deleted * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getWalletBalance(walletId: string, assetId: string, options?: any): AxiosPromise { - return localVarFp.getWalletBalance(walletId, assetId, options).then((request) => request(axios, basePath)); + deleteWebhook(webhookId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.deleteWebhook(webhookId, options).then((request) => request(axios, basePath)); }, /** - * List the balances of all of the addresses in the wallet aggregated by asset. - * @summary List wallet balances - * @param {string} walletId The ID of the wallet to fetch the balances for + * List webhooks, optionally filtered by event type. + * @summary List webhooks + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listWalletBalances(walletId: string, options?: any): AxiosPromise { - return localVarFp.listWalletBalances(walletId, options).then((request) => request(axios, basePath)); + listWebhooks(limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listWebhooks(limit, page, options).then((request) => request(axios, basePath)); }, /** - * List wallets belonging to the user. - * @summary List wallets - * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. - * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * Update a webhook + * @summary Update a webhook + * @param {string} webhookId The Webhook id that needs to be updated + * @param {UpdateWebhookRequest} [updateWebhookRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listWallets(limit?: number, page?: string, options?: any): AxiosPromise { - return localVarFp.listWallets(limit, page, options).then((request) => request(axios, basePath)); + updateWebhook(webhookId: string, updateWebhookRequest?: UpdateWebhookRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.updateWebhook(webhookId, updateWebhookRequest, options).then((request) => request(axios, basePath)); }, }; }; /** - * WalletsApi - interface + * WebhooksApi - interface * @export - * @interface WalletsApi + * @interface WebhooksApi */ -export interface WalletsApiInterface { +export interface WebhooksApiInterface { /** - * Create a new wallet scoped to the user. - * @summary Create a new wallet - * @param {CreateWalletRequest} [createWalletRequest] + * Create a new webhook scoped to a wallet + * @summary Create a new webhook scoped to a wallet + * @param {string} walletId The ID of the wallet to create the webhook for. + * @param {CreateWalletWebhookRequest} [createWalletWebhookRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof WalletsApiInterface + * @memberof WebhooksApiInterface */ - createWallet(createWalletRequest?: CreateWalletRequest, options?: RawAxiosRequestConfig): AxiosPromise; + createWalletWebhook(walletId: string, createWalletWebhookRequest?: CreateWalletWebhookRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** - * Get wallet - * @summary Get wallet by ID - * @param {string} walletId The ID of the wallet to fetch + * Create a new webhook + * @summary Create a new webhook + * @param {CreateWebhookRequest} [createWebhookRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof WalletsApiInterface + * @memberof WebhooksApiInterface */ - getWallet(walletId: string, options?: RawAxiosRequestConfig): AxiosPromise; + createWebhook(createWebhookRequest?: CreateWebhookRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** - * Get the aggregated balance of an asset across all of the addresses in the wallet. - * @summary Get the balance of an asset in the wallet - * @param {string} walletId The ID of the wallet to fetch the balance for - * @param {string} assetId The symbol of the asset to fetch the balance for + * Delete a webhook + * @summary Delete a webhook + * @param {string} webhookId The Webhook uuid that needs to be deleted * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof WalletsApiInterface + * @memberof WebhooksApiInterface */ - getWalletBalance(walletId: string, assetId: string, options?: RawAxiosRequestConfig): AxiosPromise; + deleteWebhook(webhookId: string, options?: RawAxiosRequestConfig): AxiosPromise; /** - * List the balances of all of the addresses in the wallet aggregated by asset. - * @summary List wallet balances - * @param {string} walletId The ID of the wallet to fetch the balances for + * List webhooks, optionally filtered by event type. + * @summary List webhooks + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof WalletsApiInterface + * @memberof WebhooksApiInterface */ - listWalletBalances(walletId: string, options?: RawAxiosRequestConfig): AxiosPromise; + listWebhooks(limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise; /** - * List wallets belonging to the user. - * @summary List wallets - * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. - * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * Update a webhook + * @summary Update a webhook + * @param {string} webhookId The Webhook id that needs to be updated + * @param {UpdateWebhookRequest} [updateWebhookRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof WalletsApiInterface + * @memberof WebhooksApiInterface */ - listWallets(limit?: number, page?: string, options?: RawAxiosRequestConfig): AxiosPromise; + updateWebhook(webhookId: string, updateWebhookRequest?: UpdateWebhookRequest, options?: RawAxiosRequestConfig): AxiosPromise; } /** - * WalletsApi - object-oriented interface + * WebhooksApi - object-oriented interface * @export - * @class WalletsApi + * @class WebhooksApi * @extends {BaseAPI} */ -export class WalletsApi extends BaseAPI implements WalletsApiInterface { +export class WebhooksApi extends BaseAPI implements WebhooksApiInterface { /** - * Create a new wallet scoped to the user. - * @summary Create a new wallet - * @param {CreateWalletRequest} [createWalletRequest] + * Create a new webhook scoped to a wallet + * @summary Create a new webhook scoped to a wallet + * @param {string} walletId The ID of the wallet to create the webhook for. + * @param {CreateWalletWebhookRequest} [createWalletWebhookRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof WalletsApi + * @memberof WebhooksApi */ - public createWallet(createWalletRequest?: CreateWalletRequest, options?: RawAxiosRequestConfig) { - return WalletsApiFp(this.configuration).createWallet(createWalletRequest, options).then((request) => request(this.axios, this.basePath)); + public createWalletWebhook(walletId: string, createWalletWebhookRequest?: CreateWalletWebhookRequest, options?: RawAxiosRequestConfig) { + return WebhooksApiFp(this.configuration).createWalletWebhook(walletId, createWalletWebhookRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * Get wallet - * @summary Get wallet by ID - * @param {string} walletId The ID of the wallet to fetch + * Create a new webhook + * @summary Create a new webhook + * @param {CreateWebhookRequest} [createWebhookRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof WalletsApi + * @memberof WebhooksApi */ - public getWallet(walletId: string, options?: RawAxiosRequestConfig) { - return WalletsApiFp(this.configuration).getWallet(walletId, options).then((request) => request(this.axios, this.basePath)); + public createWebhook(createWebhookRequest?: CreateWebhookRequest, options?: RawAxiosRequestConfig) { + return WebhooksApiFp(this.configuration).createWebhook(createWebhookRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * Get the aggregated balance of an asset across all of the addresses in the wallet. - * @summary Get the balance of an asset in the wallet - * @param {string} walletId The ID of the wallet to fetch the balance for - * @param {string} assetId The symbol of the asset to fetch the balance for + * Delete a webhook + * @summary Delete a webhook + * @param {string} webhookId The Webhook uuid that needs to be deleted * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof WalletsApi + * @memberof WebhooksApi */ - public getWalletBalance(walletId: string, assetId: string, options?: RawAxiosRequestConfig) { - return WalletsApiFp(this.configuration).getWalletBalance(walletId, assetId, options).then((request) => request(this.axios, this.basePath)); + public deleteWebhook(webhookId: string, options?: RawAxiosRequestConfig) { + return WebhooksApiFp(this.configuration).deleteWebhook(webhookId, options).then((request) => request(this.axios, this.basePath)); } /** - * List the balances of all of the addresses in the wallet aggregated by asset. - * @summary List wallet balances - * @param {string} walletId The ID of the wallet to fetch the balances for + * List webhooks, optionally filtered by event type. + * @summary List webhooks + * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof WalletsApi + * @memberof WebhooksApi */ - public listWalletBalances(walletId: string, options?: RawAxiosRequestConfig) { - return WalletsApiFp(this.configuration).listWalletBalances(walletId, options).then((request) => request(this.axios, this.basePath)); + public listWebhooks(limit?: number, page?: string, options?: RawAxiosRequestConfig) { + return WebhooksApiFp(this.configuration).listWebhooks(limit, page, options).then((request) => request(this.axios, this.basePath)); } /** - * List wallets belonging to the user. - * @summary List wallets - * @param {number} [limit] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. - * @param {string} [page] A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * Update a webhook + * @summary Update a webhook + * @param {string} webhookId The Webhook id that needs to be updated + * @param {UpdateWebhookRequest} [updateWebhookRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof WalletsApi + * @memberof WebhooksApi */ - public listWallets(limit?: number, page?: string, options?: RawAxiosRequestConfig) { - return WalletsApiFp(this.configuration).listWallets(limit, page, options).then((request) => request(this.axios, this.basePath)); + public updateWebhook(webhookId: string, updateWebhookRequest?: UpdateWebhookRequest, options?: RawAxiosRequestConfig) { + return WebhooksApiFp(this.configuration).updateWebhook(webhookId, updateWebhookRequest, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/src/client/base.ts b/src/client/base.ts index c9d00c23..b8ca5b52 100644 --- a/src/client/base.ts +++ b/src/client/base.ts @@ -5,7 +5,7 @@ * This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. * * The version of the OpenAPI document: 0.0.1-alpha - * Contact: yuga.cohler@coinbase.com + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/client/common.ts b/src/client/common.ts index 61baa899..eb622219 100644 --- a/src/client/common.ts +++ b/src/client/common.ts @@ -5,7 +5,7 @@ * This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. * * The version of the OpenAPI document: 0.0.1-alpha - * Contact: yuga.cohler@coinbase.com + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -126,50 +126,10 @@ export const serializeDataIfNeeded = function (value: any, requestOptions: any, ? configuration.isJsonMime(requestOptions.headers['Content-Type']) : nonString; return needsSerialization - ? JSON.stringify(value !== undefined ? convertMapsAndSetsToPlain(value) : {}) + ? JSON.stringify(value !== undefined ? value : {}) : (value || ""); } -function convertMapsAndSetsToPlain(value: any): any { - if (typeof Set === "undefined") return value; - if (typeof Map === "undefined") return value; - if (typeof value !== "object" || !value) { - return value; - } - if (value instanceof Set) { - return Array.from(value).map(item => convertMapsAndSetsToPlain(item)); - } - if (value instanceof Map) { - const entries: Array<[string, any]> = []; - value.forEach((value: any, key: any) => { - entries.push([key, convertMapsAndSetsToPlain(value)]) - }); - return objectFromEntries(entries); - } - if (Array.isArray(value)) { - return value.map(it => convertMapsAndSetsToPlain(it)); - } - return objectFromEntries(objectEntries(value) - .map(([k, v]) => [k, convertMapsAndSetsToPlain(v)])); -} - -/** - * Ponyfill for Object.entries - */ -function objectEntries(object: Record): Array<[string, any]> { - return Object.keys(object).map(key => [key, object[key]]); -} - -/** - * Ponyfill for Object.fromEntries - */ -function objectFromEntries(entries: any): Record { - return [...entries].reduce((object, [key, val]) => { - object[key] = val; - return object; - }, {}); -} - /** * * @export diff --git a/src/client/configuration.ts b/src/client/configuration.ts index 3b1c5f27..a1a0c93e 100644 --- a/src/client/configuration.ts +++ b/src/client/configuration.ts @@ -5,7 +5,7 @@ * This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. * * The version of the OpenAPI document: 0.0.1-alpha - * Contact: yuga.cohler@coinbase.com + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -89,7 +89,13 @@ export class Configuration { this.accessToken = param.accessToken; this.basePath = param.basePath; this.serverIndex = param.serverIndex; - this.baseOptions = param.baseOptions; + this.baseOptions = { + headers: { + ...param.baseOptions?.headers, + 'User-Agent': "OpenAPI-Generator/typescript-axios" + }, + ...param.baseOptions + }; this.formDataCtor = param.formDataCtor; } diff --git a/src/client/index.ts b/src/client/index.ts index 4cb285eb..814de5aa 100644 --- a/src/client/index.ts +++ b/src/client/index.ts @@ -5,7 +5,7 @@ * This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. * * The version of the OpenAPI document: 0.0.1-alpha - * Contact: yuga.cohler@coinbase.com + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/coinbase/address.ts b/src/coinbase/address.ts index 41c390d4..b3484abe 100644 --- a/src/coinbase/address.ts +++ b/src/coinbase/address.ts @@ -1,9 +1,32 @@ +import Decimal from "decimal.js"; +import { Coinbase } from "./coinbase"; +import { Asset } from "./asset"; +import { Balance } from "./balance"; +import { BalanceMap } from "./balance_map"; +import { FaucetTransaction } from "./faucet_transaction"; +import { HistoricalBalance } from "./historical_balance"; +import { + Amount, + StakeOptionsMode, + StakingRewardFormat, + PaginationOptions, + PaginationResponse, +} from "./types"; +import { formatDate, getWeekBackDate } from "./utils"; +import { StakingReward } from "./staking_reward"; +import { StakingBalance } from "./staking_balance"; +import { Transaction } from "./transaction"; +import { AddressReputation } from "./address_reputation"; + /** * A representation of a blockchain address, which is a user-controlled account on a network. */ export class Address { + private static MAX_HISTORICAL_BALANCE = 1000; + protected networkId: string; protected id: string; + protected _reputation?: AddressReputation; /** * Initializes a new Address instance. @@ -34,6 +57,285 @@ export class Address { return this.id; } + /** + * Returns the list of balances for the address. + * + * @returns The map from asset ID to balance. + */ + public async listBalances(): Promise { + const response = await Coinbase.apiClients.externalAddress!.listExternalAddressBalances( + this.getNetworkId(), + this.getId(), + ); + + return BalanceMap.fromBalances(response.data.data); + } + + /** + * Returns the balance of the provided asset. + * + * @param assetId - The asset ID. + * @returns The balance of the asset. + */ + async getBalance(assetId: string): Promise { + const response = await Coinbase.apiClients.externalAddress!.getExternalAddressBalance( + this.getNetworkId(), + this.getId(), + Asset.primaryDenomination(assetId), + ); + + if (!response.data) { + return new Decimal(0); + } + + return Balance.fromModelAndAssetId(response.data, assetId).amount; + } + + /** + * Returns the historical balances of the provided asset. + * + * @param assetId - The asset ID. + * @param options - The pagination options. + * @param options.limit - The maximum number of Historical Balances to return. Limit can range between 1 and 100. + * @param options.page - The cursor for pagination across multiple pages of Historical Balances. Don\'t include this parameter on the first call. Use the next page value returned in a previous response to request subsequent results. + * + * @returns The paginated list response of Historical Balances for the given Asset ID. + */ + public async listHistoricalBalances( + assetId: string, + { limit = Coinbase.defaultPageLimit, page = undefined }: PaginationOptions = {}, + ): Promise> { + const data: HistoricalBalance[] = []; + let nextPage: string | undefined; + + const response = await Coinbase.apiClients.balanceHistory!.listAddressHistoricalBalance( + this.getNetworkId(), + this.getId(), + Asset.primaryDenomination(assetId), + limit, + page, + ); + + response.data.data.forEach(historicalBalanceModel => { + const historicalBalance = HistoricalBalance.fromModel(historicalBalanceModel); + data.push(historicalBalance); + }); + + const hasMore = response.data.has_more; + + if (hasMore) { + if (response.data.next_page) { + nextPage = response.data.next_page; + } + } + + return { + data, + hasMore, + nextPage, + }; + } + + /** + * Returns the transactions of the address. + * + * @param options - The pagination options. + * @param options.limit - The maximum number of Transactions to return. Limit can range between 1 and 100. + * @param options.page - The cursor for pagination across multiple pages of Transactions. Don\'t include this parameter on the first call. Use the next page value returned in a previous response to request subsequent results. + * + * @returns The paginated list response of Transactions. + */ + public async listTransactions({ + limit = Coinbase.defaultPageLimit, + page = undefined, + }: PaginationOptions = {}): Promise> { + const data: Transaction[] = []; + let nextPage: string | undefined; + + const response = await Coinbase.apiClients.transactionHistory!.listAddressTransactions( + this.getNetworkId(), + this.getId(), + limit, + page, + ); + + response.data.data.forEach(transactionModel => { + const transaction = new Transaction(transactionModel); + data.push(transaction); + }); + + const hasMore = response.data.has_more; + + if (hasMore) { + if (response.data.next_page) { + nextPage = response.data.next_page; + } + } + + return { + data, + hasMore, + nextPage, + }; + } + + /** + * Lists the staking rewards for the address. + * + * @param assetId - The asset ID. + * @param startTime - The start time. + * @param endTime - The end time. + * @param format - The format to return the rewards in. (usd, native). Defaults to usd. + * @returns The staking rewards. + */ + public async stakingRewards( + assetId: string, + startTime = getWeekBackDate(new Date()), + endTime = formatDate(new Date()), + format: StakingRewardFormat = StakingRewardFormat.USD, + ): Promise { + return StakingReward.list( + Coinbase.normalizeNetwork(this.getNetworkId()), + assetId, + [this.getId()], + startTime, + endTime, + format, + ); + } + + /** + * Lists the historical staking balances for the address. + * + * @param assetId - The asset ID. + * @param startTime - The start time. + * @param endTime - The end time. + * @returns The staking balances. + */ + public async historicalStakingBalances( + assetId: string, + startTime = getWeekBackDate(new Date()), + endTime = formatDate(new Date()), + ): Promise { + return StakingBalance.list( + Coinbase.normalizeNetwork(this.getNetworkId()), + assetId, + this.getId(), + startTime, + endTime, + ); + } + + /** + * Get the stakeable balance for the supplied asset. + * + * @param asset_id - The asset to check the stakeable balance for. + * @param mode - The staking mode. Defaults to DEFAULT. + * @param options - Additional options for getting the stakeable balance. + * @returns The stakeable balance. + */ + public async stakeableBalance( + asset_id: string, + mode: StakeOptionsMode = StakeOptionsMode.DEFAULT, + options: { [key: string]: string } = {}, + ): Promise { + const balances = await this.getStakingBalances(asset_id, mode, options); + return balances.stakeableBalance; + } + + /** + * Get the unstakeable balance for the supplied asset. + * + * @param asset_id - The asset to check the unstakeable balance for. + * @param mode - The staking mode. Defaults to DEFAULT. + * @param options - Additional options for getting the unstakeable balance. + * A. Dedicated ETH Staking + * - `validator_pub_keys` (optional): List of comma separated validator public keys to retrieve unstakeable balance for. Defaults to all validators. + * @returns The unstakeable balance. + */ + public async unstakeableBalance( + asset_id: string, + mode: StakeOptionsMode = StakeOptionsMode.DEFAULT, + options: { [key: string]: string } = {}, + ): Promise { + const balances = await this.getStakingBalances(asset_id, mode, options); + return balances.unstakeableBalance; + } + + /** + * Get the claimable balance for the supplied asset. + * + * @param asset_id - The asset to check claimable balance for. + * @param mode - The staking mode. Defaults to DEFAULT. + * @param options - Additional options for getting the claimable balance. + * @returns The claimable balance. + */ + public async claimableBalance( + asset_id: string, + mode: StakeOptionsMode = StakeOptionsMode.DEFAULT, + options: { [key: string]: string } = {}, + ): Promise { + const balances = await this.getStakingBalances(asset_id, mode, options); + return balances.claimableBalance; + } + + /** + * Get the pending claimable balance for the supplied asset. + * + * @param asset_id - The asset to check pending claimable balance for. + * @param mode - The staking mode. Defaults to DEFAULT. + * @param options - Additional options for getting the pending claimable balance. + * @returns The pending claimable balance. + */ + public async pendingClaimableBalance( + asset_id: string, + mode: StakeOptionsMode = StakeOptionsMode.DEFAULT, + options: { [key: string]: string } = {}, + ): Promise { + const balances = await this.getStakingBalances(asset_id, mode, options); + return balances.pendingClaimableBalance; + } + + /** + * Requests faucet funds for the address. + * Only supported on testnet networks. + * + * @param assetId - The ID of the asset to transfer from the faucet. + * @returns The faucet transaction object. + * @throws {Error} If the request does not return a transaction hash. + * @throws {Error} If the request fails. + */ + public async faucet(assetId?: string): Promise { + const response = await Coinbase.apiClients.externalAddress!.requestExternalFaucetFunds( + this.getNetworkId(), + this.getId(), + assetId, + true, // Skip waiting for confirmation server-side. + ); + return new FaucetTransaction(response.data); + } + + /** + * Returns the reputation of the Address. + * + * @returns The reputation of the Address. + * @throws {Error} if the API request to get the Address reputation fails. + * @throws {Error} if the Address reputation is not available. + */ + public async reputation(): Promise { + if (this._reputation) { + return this._reputation; + } + + const response = await Coinbase.apiClients.addressReputation!.getAddressReputation( + this.getNetworkId(), + this.getId(), + ); + + this._reputation = new AddressReputation(response.data); + return this._reputation; + } + /** * Returns a string representation of the address. * @@ -42,4 +344,145 @@ export class Address { public toString(): string { return `Address { addressId: '${this.getId()}', networkId: '${this.getNetworkId()}' }`; } + + /** + * Validate if the operation is able to stake with the supplied input. + * + * @param amount - The amount of the asset to stake. + * @param assetId - The asset to stake. + * @param mode - The staking mode. Defaults to DEFAULT. + * @param options - Additional options for the stake operation. + * @private + * @throws {Error} If the supplied input is not able to create a stake operation. + */ + protected async validateCanStake( + amount: Amount, + assetId: string, + mode: StakeOptionsMode, + options: { [key: string]: string }, + ): Promise { + const stakeableBalance = await this.stakeableBalance(assetId, mode, options); + + if (new Decimal(stakeableBalance).lessThan(amount.toString())) { + throw new Error( + `Insufficient funds ${amount} requested to stake, only ${stakeableBalance} available.`, + ); + } + } + + /** + * Validate if the operation is able to unstake with the supplied input. + * + * @param amount - The amount of the asset to unstake. + * @param assetId - The asset to unstake. + * @param mode - The staking mode. Defaults to DEFAULT. + * @param options - Additional options for the unstake operation. + * @private + * @throws {Error} If the supplied input is not able to create an unstake operation. + */ + protected async validateCanUnstake( + amount: Amount, + assetId: string, + mode: StakeOptionsMode, + options: { [key: string]: string }, + ): Promise { + const unstakeableBalance = new Decimal(await this.unstakeableBalance(assetId, mode, options)); + + if (unstakeableBalance.lessThan(amount.toString())) { + throw new Error( + `Insufficient funds ${amount} requested to unstake, only ${unstakeableBalance} available.`, + ); + } + } + + /** + * Validate if the operation is able to claim stake with the supplied input. + * + * @param amount - The amount of the asset to claim stake. + * @param assetId - The asset to claim stake. + * @param mode - The staking mode. Defaults to DEFAULT. + * @param options - Additional options for the claim stake operation. + * @private + * @throws {Error} If the supplied input is not able to create a claim stake operation. + */ + protected async validateCanClaimStake( + amount: Amount, + assetId: string, + mode: StakeOptionsMode, + options: { [key: string]: string }, + ): Promise { + if (assetId === "eth" && mode === StakeOptionsMode.NATIVE) { + throw new Error(`Claiming stake for ETH is not supported in native mode.`); + } + + const claimableBalance = new Decimal(await this.claimableBalance(assetId, mode, options)); + + if (claimableBalance.lessThan(amount.toString())) { + throw new Error( + `Insufficient funds ${amount} requested to claim stake, only ${claimableBalance} available.`, + ); + } + } + + /** + * Create a shallow copy of given options. + * + * @param options - The supplied options to be copied + * @private + * @returns A copy of the options. + */ + protected copyOptions(options?: { [key: string]: string }): { + [key: string]: string; + } { + return { ...options }; + } + + /** + * Get the different staking balance types for the supplied asset. + * + * @param assetId - The asset to lookup balances for. + * @param mode - The staking mode. Defaults to DEFAULT. + * @param options - Additional options for the balance lookup. + * @private + * @returns The different balance types. + */ + private async getStakingBalances( + assetId: string, + mode?: StakeOptionsMode, + options?: { [key: string]: string }, + ): Promise<{ [key: string]: Decimal }> { + const newOptions = this.copyOptions(options); + + if (mode) { + newOptions.mode = mode; + } + + const request = { + network_id: this.getNetworkId(), + asset_id: Asset.primaryDenomination(assetId), + address_id: this.getId(), + options: newOptions, + }; + + const response = await Coinbase.apiClients.stake!.getStakingContext(request); + + return { + stakeableBalance: Balance.fromModelAndAssetId( + response!.data.context.stakeable_balance, + assetId, + ).amount, + unstakeableBalance: Balance.fromModelAndAssetId( + response!.data.context.unstakeable_balance, + assetId, + ).amount, + pendingClaimableBalance: Balance.fromModelAndAssetId( + response!.data.context.pending_claimable_balance, + assetId, + ).amount, + claimableBalance: Balance.fromModelAndAssetId( + response!.data.context.claimable_balance, + assetId, + ).amount, + }; + } } diff --git a/src/coinbase/address/external_address.ts b/src/coinbase/address/external_address.ts index a6236d40..255072c2 100644 --- a/src/coinbase/address/external_address.ts +++ b/src/coinbase/address/external_address.ts @@ -1,14 +1,9 @@ import { Address } from "../address"; -import { Amount, StakeOptionsMode } from "../types"; +import { Amount, BroadcastExternalTransactionResponse, StakeOptionsMode } from "../types"; import { Coinbase } from "../coinbase"; import Decimal from "decimal.js"; import { Asset } from "../asset"; -import { StakingOperation } from "../staking_operation"; -import { StakingRewardFormat } from "../../client"; -import { StakingReward } from "../staking_reward"; -import { BalanceMap } from "../balance_map"; -import { Balance } from "../balance"; -import { FaucetTransaction } from "../faucet_transaction"; +import { IsDedicatedEthUnstakeV2Operation, StakingOperation } from "../staking_operation"; /** * A representation of a blockchain Address, which is a user-controlled account on a Network. Addresses are used to @@ -23,7 +18,16 @@ export class ExternalAddress extends Address { * @param amount - The amount of the asset to stake. * @param assetId - The asset to stake. * @param mode - The staking mode. Defaults to DEFAULT. - * @param options - Additional options for the stake operation. + * @param options - Additional options for the stake operation: + * + * A. Shared ETH Staking + * - `integrator_contract_address` (optional): The contract address to which the stake operation is directed to. Defaults to the integrator contract address associated with CDP account (if available) or else defaults to a shared integrator contract address for that network. + * + * B. Dedicated ETH Staking + * - `funding_address` (optional): Ethereum address for funding the stake operation. Defaults to the address initiating the stake operation. + * - `withdrawal_address` (optional): Ethereum address for receiving rewards and withdrawal funds. Defaults to the address initiating the stake operation. + * - `fee_recipient_address` (optional): Ethereum address for receiving transaction fees. Defaults to the address initiating the stake operation. + * * @returns The stake operation. */ public async buildStakeOperation( @@ -42,7 +46,15 @@ export class ExternalAddress extends Address { * @param amount - The amount of the asset to unstake. * @param assetId - The asset to unstake. * @param mode - The staking mode. Defaults to DEFAULT. - * @param options - Additional options for the unstake operation. + * @param options - Additional options for the unstake operation: + * + * A. Shared ETH Staking + * - `integrator_contract_address` (optional): The contract address to which the unstake operation is directed to. Defaults to the integrator contract address associated with CDP account (if available) or else defaults to a shared integrator contract address for that network. + * + * B. Dedicated ETH Staking + * - `immediate` (optional): Set this to "true" to unstake immediately i.e. leverage "Coinbase managed unstake" process . Defaults to "false" i.e. "User managed unstake" process. + * - `validator_pub_keys` (optional): List of comma separated validator public keys to unstake. Defaults to validators being picked up on your behalf corresponding to the unstake amount. + * * @returns The unstake operation. */ public async buildUnstakeOperation( @@ -51,7 +63,11 @@ export class ExternalAddress extends Address { mode: StakeOptionsMode = StakeOptionsMode.DEFAULT, options: { [key: string]: string } = {}, ): Promise { - await this.validateCanUnstake(amount, assetId, mode, options); + // If performing a native eth unstake v2, validation is always performed server-side. + if (!IsDedicatedEthUnstakeV2Operation(assetId, "unstake", mode, options)) { + await this.validateCanUnstake(amount, assetId, mode, options); + } + return this.buildStakingOperation(amount, assetId, "unstake", mode, options); } @@ -62,6 +78,10 @@ export class ExternalAddress extends Address { * @param assetId - The asset to claim stake. * @param mode - The staking mode. Defaults to DEFAULT. * @param options - Additional options for the claim stake operation. + * + * A. Shared ETH Staking + * - `integrator_contract_address` (optional): The contract address to which the claim stake operation is directed to. Defaults to the integrator contract address associated with CDP account (if available) or else defaults to a shared integrator contract address for that network. + * * @returns The claim stake operation. */ public async buildClaimStakeOperation( @@ -75,199 +95,16 @@ export class ExternalAddress extends Address { } /** - * Get the stakeable balance for the supplied asset. + * Builds a validator consolidation operation to help consolidate validators post Pectra. * - * @param asset_id - The asset to check the stakeable balance for. - * @param mode - The staking mode. Defaults to DEFAULT. - * @param options - Additional options for getting the stakeable balance. - * @returns The stakeable balance. - */ - public async stakeableBalance( - asset_id: string, - mode: StakeOptionsMode = StakeOptionsMode.DEFAULT, - options: { [key: string]: string } = {}, - ): Promise { - const balances = await this.getStakingBalances(asset_id, mode, options); - return balances.stakeableBalance; - } - - /** - * Get the unstakeable balance for the supplied asset. + * @param options - Additional options for the validator consolidation operation. * - * @param asset_id - The asset to check the unstakeable balance for. - * @param mode - The staking mode. Defaults to DEFAULT. - * @param options - Additional options for getting the unstakeable balance. - * @returns The unstakeable balance. - */ - public async unstakeableBalance( - asset_id: string, - mode: StakeOptionsMode = StakeOptionsMode.DEFAULT, - options: { [key: string]: string } = {}, - ): Promise { - const balances = await this.getStakingBalances(asset_id, mode, options); - return balances.unstakeableBalance; - } - - /** - * Get the claimable balance for the supplied asset. - * - * @param asset_id - The asset to check claimable balance for. - * @param mode - The staking mode. Defaults to DEFAULT. - * @param options - Additional options for getting the claimable balance. - * @returns The claimable balance. + * @returns The validator consolidation operation. */ - public async claimableBalance( - asset_id: string, - mode: StakeOptionsMode = StakeOptionsMode.DEFAULT, + public async buildValidatorConsolidationOperation( options: { [key: string]: string } = {}, - ): Promise { - const balances = await this.getStakingBalances(asset_id, mode, options); - return balances.claimableBalance; - } - - /** - * Lists the staking rewards for the address. - * - * @param assetId - The asset ID. - * @param startTime - The start time. - * @param endTime - The end time. - * @param format - The format to return the rewards in. (usd, native). Defaults to usd. - * @returns The staking rewards. - */ - public async stakingRewards( - assetId: string, - startTime: string, - endTime: string, - format = StakingRewardFormat.Usd, - ): Promise { - return StakingReward.list( - Coinbase.normalizeNetwork(this.getNetworkId()), - assetId, - [this.getId()], - startTime, - endTime, - format, - ); - } - - /** - * Validate if the operation is able to stake with the supplied input. - * - * @param amount - The amount of the asset to stake. - * @param assetId - The asset to stake. - * @param mode - The staking mode. Defaults to DEFAULT. - * @param options - Additional options for the stake operation. - * @private - * @throws {Error} If the supplied input is not able to create a stake operation. - */ - private async validateCanStake( - amount: Amount, - assetId: string, - mode: StakeOptionsMode, - options: { [key: string]: string }, - ): Promise { - const stakeableBalance = await this.stakeableBalance(assetId, mode, options); - - if (new Decimal(stakeableBalance).lessThan(amount.toString())) { - throw new Error( - `Insufficient funds ${amount} requested to stake, only ${stakeableBalance} available.`, - ); - } - } - - /** - * Validate if the operation is able to unstake with the supplied input. - * - * @param amount - The amount of the asset to unstake. - * @param assetId - The asset to unstake. - * @param mode - The staking mode. Defaults to DEFAULT. - * @param options - Additional options for the unstake operation. - * @private - * @throws {Error} If the supplied input is not able to create an unstake operation. - */ - private async validateCanUnstake( - amount: Amount, - assetId: string, - mode: StakeOptionsMode, - options: { [key: string]: string }, - ): Promise { - const unstakeableBalance = new Decimal(await this.unstakeableBalance(assetId, mode, options)); - - if (unstakeableBalance.lessThan(amount.toString())) { - throw new Error( - `Insufficient funds ${amount} requested to unstake, only ${unstakeableBalance} available.`, - ); - } - } - - /** - * Validate if the operation is able to claim stake with the supplied input. - * - * @param amount - The amount of the asset to claim stake. - * @param assetId - The asset to claim stake. - * @param mode - The staking mode. Defaults to DEFAULT. - * @param options - Additional options for the claim stake operation. - * @private - * @throws {Error} If the supplied input is not able to create a claim stake operation. - */ - private async validateCanClaimStake( - amount: Amount, - assetId: string, - mode: StakeOptionsMode, - options: { [key: string]: string }, - ): Promise { - const claimableBalance = new Decimal(await this.claimableBalance(assetId, mode, options)); - - if (claimableBalance.lessThan(amount.toString())) { - throw new Error( - `Insufficient funds ${amount} requested to claim stake, only ${claimableBalance} available.`, - ); - } - } - - /** - * Get the different staking balance types for the supplied asset. - * - * @param assetId - The asset to lookup balances for. - * @param mode - The staking mode. Defaults to DEFAULT. - * @param options - Additional options for the balance lookup. - * @private - * @returns The different balance types. - */ - private async getStakingBalances( - assetId: string, - mode?: StakeOptionsMode, - options?: { [key: string]: string }, - ): Promise<{ [key: string]: Decimal }> { - const newOptions = this.copyOptions(options); - - if (mode) { - newOptions.mode = mode; - } - - const request = { - network_id: this.getNetworkId(), - asset_id: Asset.primaryDenomination(assetId), - address_id: this.getId(), - options: newOptions, - }; - - const response = await Coinbase.apiClients.stake!.getStakingContext(request); - - return { - stakeableBalance: Balance.fromModelAndAssetId( - response!.data.context.stakeable_balance, - assetId, - ).amount, - unstakeableBalance: Balance.fromModelAndAssetId( - response!.data.context.unstakeable_balance, - assetId, - ).amount, - claimableBalance: Balance.fromModelAndAssetId( - response!.data.context.claimable_balance, - assetId, - ).amount, - }; + ): Promise { + return this.buildStakingOperation(0, "eth", "consolidate", StakeOptionsMode.NATIVE, options); } /** @@ -289,15 +126,12 @@ export class ExternalAddress extends Address { mode: StakeOptionsMode, options: { [key: string]: string }, ): Promise { - const stakingAmount = new Decimal(amount.toString()); - if (stakingAmount.lessThanOrEqualTo(0)) { - throw new Error(`Amount required greater than zero.`); - } const asset = await Asset.fetch(this.getNetworkId(), assetId); const newOptions = this.copyOptions(options); newOptions.mode = mode; + newOptions.amount = asset.toAtomicAmount(new Decimal(amount.toString())).toString(); const request = { @@ -314,65 +148,25 @@ export class ExternalAddress extends Address { } /** - * Create a shallow copy of given options. + * Broadcast an external transaction * - * @param options - The supplied options to be copied - * @private - * @returns A copy of the options. + * @param signedPayload - The signed payload of the transaction to broadcast + * @returns The broadcasted transaction */ - private copyOptions(options?: { [key: string]: string }): { - [key: string]: string; - } { - return { ...options }; - } - - /** - * Returns the list of balances for the address. - * - * @returns The map from asset ID to balance. - */ - public async listBalances(): Promise { - const response = await Coinbase.apiClients.externalAddress!.listExternalAddressBalances( + public async broadcastExternalTransaction( + signedPayload: string, + ): Promise { + const response = await Coinbase.apiClients.externalAddress!.broadcastExternalTransaction( this.getNetworkId(), this.getId(), + { + signed_payload: signedPayload, + }, ); - return BalanceMap.fromBalances(response.data.data); - } - - /** - * Returns the balance of the provided asset. - * - * @param assetId - The asset ID. - * @returns The balance of the asset. - */ - async getBalance(assetId: string): Promise { - const response = await Coinbase.apiClients.externalAddress!.getExternalAddressBalance( - this.getNetworkId(), - this.getId(), - Asset.primaryDenomination(assetId), - ); - - if (!response.data) { - return new Decimal(0); - } - - return Balance.fromModelAndAssetId(response.data, assetId).amount; - } - - /** - * Requests faucet funds for the address. - * Only supported on testnet networks. - * - * @returns The faucet transaction object. - * @throws {InternalError} If the request does not return a transaction hash. - * @throws {Error} If the request fails. - */ - public async faucet(): Promise { - const response = await Coinbase.apiClients.externalAddress!.requestExternalFaucetFunds( - this.getNetworkId(), - this.getId(), - ); - return new FaucetTransaction(response.data); + return { + transactionHash: response.data.transaction_hash, + transactionLink: response.data.transaction_link, + }; } } diff --git a/src/coinbase/address/wallet_address.ts b/src/coinbase/address/wallet_address.ts index 4385fae6..29774ce4 100644 --- a/src/coinbase/address/wallet_address.ts +++ b/src/coinbase/address/wallet_address.ts @@ -1,18 +1,36 @@ import { Decimal } from "decimal.js"; import { ethers } from "ethers"; +import { Address as AddressModel, SmartContractType } from "../../client"; import { Address } from "../address"; -import { Address as AddressModel } from "../../client"; import { Asset } from "../asset"; -import { Balance } from "../balance"; -import { BalanceMap } from "../balance_map"; import { Coinbase } from "../coinbase"; -import { ArgumentError, InternalError } from "../errors"; -import { FaucetTransaction } from "../faucet_transaction"; +import { ArgumentError } from "../errors"; import { Trade } from "../trade"; import { Transfer } from "../transfer"; -import { Amount, Destination, TransferStatus, CreateTransferOptions } from "../types"; +import { ContractInvocation } from "../contract_invocation"; +import { + Amount, + CreateContractInvocationOptions, + CreateCustomContractOptions, + CreateERC1155Options, + CreateERC20Options, + CreateERC721Options, + CreateFundOptions, + CreateQuoteOptions, + CreateTradeOptions, + CreateTransferOptions, + Destination, + PaginationOptions, + PaginationResponse, + StakeOptionsMode, +} from "../types"; import { delay } from "../utils"; import { Wallet as WalletClass } from "../wallet"; +import { IsDedicatedEthUnstakeV2Operation, StakingOperation } from "../staking_operation"; +import { PayloadSignature } from "../payload_signature"; +import { SmartContract } from "../smart_contract"; +import { FundOperation } from "../fund_operation"; +import { FundQuote } from "../fund_quote"; /** * A representation of a blockchain address, which is a wallet-controlled account on a network. @@ -26,11 +44,11 @@ export class WalletAddress extends Address { * * @param model - The address model data. * @param key - The ethers.js SigningKey the Address uses to sign data. - * @throws {InternalError} If the address model is empty. + * @throws {Error} If the address model is empty. */ constructor(model: AddressModel, key?: ethers.Wallet) { if (!model) { - throw new InternalError("Address model cannot be empty"); + throw new Error("Address model cannot be empty"); } super(model.network_id, model.address_id); @@ -60,156 +78,150 @@ export class WalletAddress extends Address { * Sets the private key. * * @param key - The ethers.js SigningKey the Address uses to sign data. - * @throws {InternalError} If the private key is already set. + * @throws {Error} If the private key is already set. */ public setKey(key: ethers.Wallet) { if (this.key !== undefined) { - throw new InternalError("Private key is already set"); + throw new Error("Private key is already set"); } this.key = key; } /** - * Returns the list of balances for the address. + * Exports the Address's private key to a hex string. * - * @returns The map from asset ID to balance. + * @returns The Address's private key as a hex string. */ - public async listBalances(): Promise { - const response = await Coinbase.apiClients.address!.listAddressBalances( - this.model.wallet_id, - this.model.address_id, - ); + public export() { + if (this.key === undefined) { + throw new Error("Private key is not set"); + } - return BalanceMap.fromBalances(response.data.data); + return this.key.privateKey; } /** - * Returns the balance of the provided asset. + * Returns whether the Address has a private key backing it to sign transactions. * - * @param assetId - The asset ID. - * @returns The balance of the asset. + * @returns Whether the Address has a private key backing it to sign transactions. */ - async getBalance(assetId: string): Promise { - const response = await Coinbase.apiClients.address!.getAddressBalance( - this.model.wallet_id, - this.model.address_id, - Asset.primaryDenomination(assetId), - ); - - if (!response.data) { - return new Decimal(0); - } - - return Balance.fromModelAndAssetId(response.data, assetId).amount; + public canSign(): boolean { + return !!this.key; } /** - * Requests faucet funds for the address. - * Only supported on testnet networks. + * Returns all the trades associated with the address. + * + * @param options - The pagination options. + * @param options.limit - The maximum number of Trades to return. Limit can range between 1 and 100. + * @param options.page - The cursor for pagination across multiple pages of Trades. Don\'t include this parameter on the first call. Use the next page value returned in a previous response to request subsequent results. * - * @returns The faucet transaction object. - * @throws {InternalError} If the request does not return a transaction hash. - * @throws {Error} If the request fails. + * @returns The paginated list response of trades. */ - public async faucet(): Promise { - const response = await Coinbase.apiClients.address!.requestFaucetFunds( + public async listTrades({ + limit = Coinbase.defaultPageLimit, + page = undefined, + }: PaginationOptions = {}): Promise> { + const data: Trade[] = []; + let nextPage: string | undefined; + + const response = await Coinbase.apiClients.trade!.listTrades( this.model.wallet_id, this.model.address_id, + limit, + page, ); - return new FaucetTransaction(response.data); - } - - /** - * Returns all the transfers associated with the address. - * - * @returns The list of transfers. - */ - public async listTrades(): Promise { - const trades: Trade[] = []; - const queue: string[] = [""]; - while (queue.length > 0) { - const page = queue.shift(); - const response = await Coinbase.apiClients.trade!.listTrades( - this.model.wallet_id, - this.model.address_id, - 100, - page?.length ? page : undefined, - ); + response.data.data.forEach(tradeModel => { + data.push(new Trade(tradeModel)); + }); - response.data.data.forEach(transferModel => { - trades.push(new Trade(transferModel)); - }); + const hasMore = response.data.has_more; - if (response.data.has_more) { - if (response.data.next_page) { - queue.push(response.data.next_page); - } + if (hasMore) { + if (response.data.next_page) { + nextPage = response.data.next_page; } } - return trades; + return { + data, + hasMore, + nextPage, + }; } /** * Returns all the transfers associated with the address. * - * @returns The list of transfers. + * @param options - The pagination options. + * @param options.limit - The maximum number of Transfers to return. Limit can range between 1 and 100. + * @param options.page - The cursor for pagination across multiple pages of Transfers. Don\'t include this parameter on the first call. Use the next page value returned in a previous response to request subsequent results. + * + * @returns The paginated list response of transfers. */ - public async listTransfers(): Promise { - const transfers: Transfer[] = []; - const queue: string[] = [""]; + public async listTransfers({ + limit = Coinbase.defaultPageLimit, + page = undefined, + }: PaginationOptions = {}): Promise> { + const data: Transfer[] = []; + let nextPage: string | undefined; - while (queue.length > 0) { - const page = queue.shift(); - const response = await Coinbase.apiClients.transfer!.listTransfers( - this.model.wallet_id, - this.model.address_id, - 100, - page?.length ? page : undefined, - ); + const response = await Coinbase.apiClients.transfer!.listTransfers( + this.model.wallet_id, + this.model.address_id, + limit, + page, + ); - response.data.data.forEach(transferModel => { - transfers.push(Transfer.fromModel(transferModel)); - }); + response.data.data.forEach(transferModel => { + data.push(Transfer.fromModel(transferModel)); + }); - if (response.data.has_more) { - if (response.data.next_page) { - queue.push(response.data.next_page); - } + const hasMore = response.data.has_more; + + if (hasMore) { + if (response.data.next_page) { + nextPage = response.data.next_page; } } - return transfers; + return { + data, + hasMore, + nextPage, + }; } /** - * Transfers the given amount of the given Asset to the given address. Only same-Network Transfers are supported. + * Transfers the given amount of the given Asset to the given address. + * Only same-Network Transfers are supported. + * This returns a `Transfer` object that has been signed and broadcasted, you + * can wait for this to land on-chain (or fail) by calling `transfer.wait()`. * * @param options - The options to create the Transfer. * @param options.amount - The amount of the Asset to send. * @param options.assetId - The ID of the Asset to send. For Ether, Coinbase.assets.Eth, Coinbase.assets.Gwei, and Coinbase.assets.Wei supported. * @param options.destination - The destination of the transfer. If a Wallet, sends to the Wallet's default address. If a String, interprets it as the address ID. - * @param options.timeoutSeconds - The maximum amount of time to wait for the Transfer to complete, in seconds. - * @param options.intervalSeconds - The interval at which to poll the Network for Transfer status, in seconds. + * @param options.gasless - Whether the Transfer should be gasless. Defaults to false. + * @param options.skipBatching - When true, the Transfer will be submitted immediately. Otherwise, the Transfer will be batched. Defaults to false. Note: requires gasless option to be set to true. * @returns The transfer object. * @throws {APIError} if the API request to create a Transfer fails. * @throws {APIError} if the API request to broadcast a Transfer fails. - * @throws {Error} if the Transfer times out. */ public async createTransfer({ amount, assetId, destination, - timeoutSeconds = 10, - intervalSeconds = 0.2, + gasless = false, + skipBatching = false, }: CreateTransferOptions): Promise { if (!Coinbase.useServerSigner && !this.key) { - throw new InternalError("Cannot transfer from address without private key loaded"); + throw new Error("Cannot transfer from address without private key loaded"); } const asset = await Asset.fetch(this.getNetworkId(), assetId); const [destinationAddress, destinationNetworkId] = - this.getDestinationAddressAndNetwork(destination); + await this.getDestinationAddressAndNetwork(destination); const normalizedAmount = new Decimal(amount.toString()); const currentBalance = await this.getBalance(assetId); @@ -219,103 +231,741 @@ export class WalletAddress extends Address { ); } + if (skipBatching && !gasless) { + throw new ArgumentError("skipBatching requires gasless to be true"); + } + const createTransferRequest = { amount: asset.toAtomicAmount(normalizedAmount).toString(), network_id: destinationNetworkId, asset_id: asset.primaryDenomination(), destination: destinationAddress, + gasless: gasless, + skip_batching: skipBatching, }; - let response = await Coinbase.apiClients.transfer!.createTransfer( + const response = await Coinbase.apiClients.transfer!.createTransfer( this.getWalletId(), this.getId(), createTransferRequest, ); - let transfer = Transfer.fromModel(response.data); - const wallet = new ethers.Wallet(this.key!.privateKey); + const transfer = Transfer.fromModel(response.data); - if (!Coinbase.useServerSigner) { - const transaction = transfer.getTransaction(); - let signedPayload = await wallet!.signTransaction(transaction); - signedPayload = signedPayload.slice(2); - - const broadcastTransferRequest = { - signed_payload: signedPayload, - }; - - response = await Coinbase.apiClients.transfer!.broadcastTransfer( - this.getWalletId(), - this.getId(), - transfer.getId(), - broadcastTransferRequest, - ); + if (Coinbase.useServerSigner) { + return transfer; + } + + await transfer.sign(this.getSigner()); + await transfer.broadcast(); + + return transfer; + } - transfer = Transfer.fromModel(response.data); + /** + * Gets a signer for the private key. + * + * @returns The signer for the private key. + * @throws {Error} If the private key is not loaded. + */ + private getSigner(): ethers.Wallet { + if (!this.key) { + throw new Error("Cannot sign without a private key"); } + return new ethers.Wallet(this.key.privateKey); + } - const startTime = Date.now(); - while (Date.now() - startTime < timeoutSeconds * 1000) { - await transfer.reload(); - const status = transfer.getStatus(); - if (status === TransferStatus.COMPLETE || status === TransferStatus.FAILED) { - return transfer; + /** + * Trades the given amount of the given Asset for another Asset. Only same-network Trades are supported. + * + * @param options - The options to create the Trade. + * @param options.amount - The amount of the From Asset to send. + * @param options.fromAssetId - The ID of the Asset to trade from. + * @param options.toAssetId - The ID of the Asset to trade to. + * @returns The Trade object. + * @throws {APIError} if the API request to create or broadcast a Trade fails. + * @throws {Error} if the Trade times out. + */ + public async createTrade({ amount, fromAssetId, toAssetId }: CreateTradeOptions): Promise { + const fromAsset = await Asset.fetch(this.getNetworkId(), fromAssetId); + const toAsset = await Asset.fetch(this.getNetworkId(), toAssetId); + + await this.validateCanTrade(amount, fromAssetId); + + const trade = await this.createTradeRequest(amount, fromAsset, toAsset); + + if (Coinbase.useServerSigner) { + return trade; + } + + await trade.sign(this.getSigner()); + await trade.broadcast(); + + return trade; + } + + /** + * Invokes a contract with the given data. + * + * @param options - The options to invoke the contract + * @param options.contractAddress - The address of the contract the method will be invoked on. + * @param options.method - The method to invoke on the contract. + * @param options.abi - The ABI of the contract. + * @param options.args - The arguments to pass to the contract method invocation. + * The keys should be the argument names and the values should be the argument values. + * @param options.amount - The amount of the asset to send to a payable contract method. + * @param options.assetId - The ID of the asset to send to a payable contract method. + * The asset must be a denomination of the native asset. (Ex. "wei", "gwei", or "eth"). + * @returns The ContractInvocation object. + * @throws {APIError} if the API request to create a contract invocation fails. + * @throws {Error} if the address cannot sign. + * @throws {ArgumentError} if the address does not have sufficient balance. + */ + public async invokeContract({ + contractAddress, + method, + abi, + args, + amount, + assetId, + }: CreateContractInvocationOptions): Promise { + if (!Coinbase.useServerSigner && !this.key) { + throw new Error("Cannot invoke contract from address without private key loaded"); + } + + if (amount && !assetId) { + throw new ArgumentError( + "Asset ID is required for contract ivocation if an amount is provided", + ); + } + + let atomicAmount: string | undefined; + + if (assetId && amount) { + const asset = await Asset.fetch(this.getNetworkId(), assetId); + const normalizedAmount = new Decimal(amount.toString()); + const currentBalance = await this.getBalance(assetId); + if (currentBalance.lessThan(normalizedAmount)) { + throw new ArgumentError( + `Insufficient funds: ${normalizedAmount} requested, but only ${currentBalance} available`, + ); } - await delay(intervalSeconds); + atomicAmount = asset.toAtomicAmount(normalizedAmount).toString(); + } + + const contractInvocation = await this.createContractInvocation( + contractAddress, + method, + abi!, + args, + atomicAmount, + ); + + if (Coinbase.useServerSigner) { + return contractInvocation; } - throw new Error("Transfer timed out"); + + await contractInvocation.sign(this.getSigner()); + await contractInvocation.broadcast(); + + return contractInvocation; } /** - * Returns the address and network ID of the given destination. + * Deploys an ERC20 token contract. * - * @param destination - The destination to get the address and network ID of. - * @returns The address and network ID of the destination. + * @param options - The options for creating the ERC20 token. + * @param options.name - The name of the ERC20 token. + * @param options.symbol - The symbol of the ERC20 token. + * @param options.totalSupply - The total supply of the ERC20 token. + * @returns A Promise that resolves to the deployed SmartContract object. + * @throws {APIError} If the API request to create a smart contract fails. */ - private getDestinationAddressAndNetwork(destination: Destination): [string, string] { - if (typeof destination !== "string" && destination.getNetworkId() !== this.getNetworkId()) { - throw new ArgumentError("Transfer must be on the same Network"); + public async deployToken({ + name, + symbol, + totalSupply, + }: CreateERC20Options): Promise { + if (!Coinbase.useServerSigner && !this.key) { + throw new Error("Cannot deploy ERC20 without private key loaded"); } - if (destination instanceof WalletClass) { - return [destination.getDefaultAddress()!.getId(), destination.getNetworkId()]; + + const smartContract = await this.createERC20({ name, symbol, totalSupply }); + + if (Coinbase.useServerSigner) { + return smartContract; } - if (destination instanceof Address) { - return [destination.getId(), destination.getNetworkId()]; + + await smartContract.sign(this.getSigner()); + await smartContract.broadcast(); + + return smartContract; + } + + /** + * Deploys an ERC721 token contract. + * + * @param options - The options for creating the ERC721 token. + * @param options.name - The name of the ERC721 token. + * @param options.symbol - The symbol of the ERC721 token. + * @param options.baseURI - The base URI of the ERC721 token. + * @returns A Promise that resolves to the deployed SmartContract object. + * @throws {APIError} If the API request to create a smart contract fails. + */ + public async deployNFT({ name, symbol, baseURI }: CreateERC721Options): Promise { + if (!Coinbase.useServerSigner && !this.key) { + throw new Error("Cannot deploy ERC721 without private key loaded"); } - return [destination, this.getNetworkId()]; + + const smartContract = await this.createERC721({ name, symbol, baseURI }); + + if (Coinbase.useServerSigner) { + return smartContract; + } + + await smartContract.sign(this.getSigner()); + await smartContract.broadcast(); + + return smartContract; } /** - * Returns whether the Address has a private key backing it to sign transactions. + * Deploys an ERC1155 multi-token contract. * - * @returns Whether the Address has a private key backing it to sign transactions. + * @param options - The options for creating the ERC1155 token. + * @param options.uri - The URI for all token metadata. + * @returns A Promise that resolves to the deployed SmartContract object. + * @throws {APIError} If the API request to create a smart contract fails. */ - public canSign(): boolean { - return !!this.key; + public async deployMultiToken({ uri }: CreateERC1155Options): Promise { + if (!Coinbase.useServerSigner && !this.key) { + throw new Error("Cannot deploy ERC1155 without private key loaded"); + } + + const smartContract = await this.createERC1155({ uri }); + + if (Coinbase.useServerSigner) { + return smartContract; + } + + await smartContract.sign(this.getSigner()); + await smartContract.broadcast(); + + return smartContract; } /** - * Trades the given amount of the given Asset for another Asset. Only same-network Trades are supported. + * Deploys a custom contract. * - * @param amount - The amount of the Asset to send. - * @param fromAssetId - The ID of the Asset to trade from. - * @param toAssetId - The ID of the Asset to trade to. - * @returns The Trade object. - * @throws {Error} If the private key is not loaded, or if the asset IDs are unsupported, or if there are insufficient funds. + * @param options - The options for creating the custom contract. + * @param options.solidityVersion - The version of the solidity compiler, must be 0.8.+, such as "0.8.28+commit.7893614a". See https://binaries.soliditylang.org/bin/list.json + * @param options.solidityInputJson - The input json for the solidity compiler. See https://docs.soliditylang.org/en/latest/using-the-compiler.html#input-description for more details. + * @param options.contractName - The name of the contract class to be deployed. + * @param options.constructorArgs - The arguments for the constructor. + * @returns A Promise that resolves to the deployed SmartContract object. + * @throws {APIError} If the API request to create a smart contract fails. */ - public async createTrade(amount: Amount, fromAssetId: string, toAssetId: string): Promise { - const fromAsset = await Asset.fetch(this.getNetworkId(), fromAssetId); - const toAsset = await Asset.fetch(this.getNetworkId(), toAssetId); + public async deployContract({ + solidityVersion, + solidityInputJson, + contractName, + constructorArgs, + }: CreateCustomContractOptions): Promise { + if (!Coinbase.useServerSigner && !this.key) { + throw new Error("Cannot deploy custom contract without private key loaded"); + } - await this.validateCanTrade(amount, fromAssetId); - const trade = await this.createTradeRequest(amount, fromAsset, toAsset); - // NOTE: Trading does not yet support server signers at this point. - const signed_payload = await trade.getTransaction().sign(this.key!); - const approveTransactionSignedPayload = trade.getApproveTransaction() - ? await trade.getApproveTransaction()!.sign(this.key!) - : undefined; + const smartContract = await this.createCustomContract({ + solidityVersion, + solidityInputJson, + contractName, + constructorArgs, + }); + + if (Coinbase.useServerSigner) { + return smartContract; + } - return this.broadcastTradeRequest(trade, signed_payload, approveTransactionSignedPayload); + await smartContract.sign(this.getSigner()); + await smartContract.broadcast(); + + return smartContract; + } + + /** + * Creates an ERC20 token contract. + * + * @private + * @param {CreateERC20Options} options - The options for creating the ERC20 token. + * @param {string} options.name - The name of the ERC20 token. + * @param {string} options.symbol - The symbol of the ERC20 token. + * @param {BigNumber} options.totalSupply - The total supply of the ERC20 token. + * @returns {Promise} A Promise that resolves to the created SmartContract. + * @throws {APIError} If the API request to create a smart contract fails. + */ + private async createERC20({ + name, + symbol, + totalSupply, + }: CreateERC20Options): Promise { + const resp = await Coinbase.apiClients.smartContract!.createSmartContract( + this.getWalletId(), + this.getId(), + { + type: SmartContractType.Erc20, + options: { + name, + symbol, + total_supply: totalSupply.toString(), + }, + }, + ); + return SmartContract.fromModel(resp?.data); + } + + /** + * Creates an ERC721 token contract. + * + * @param options - The options for creating the ERC721 token. + * @param options.name - The name of the ERC721 token. + * @param options.symbol - The symbol of the ERC721 token. + * @param options.baseURI - The base URI of the ERC721 token. + * @returns A Promise that resolves to the deployed SmartContract object. + * @throws {APIError} If the private key is not loaded when not using server signer. + */ + private async createERC721({ + name, + symbol, + baseURI, + }: CreateERC721Options): Promise { + const resp = await Coinbase.apiClients.smartContract!.createSmartContract( + this.getWalletId(), + this.getId(), + { + type: SmartContractType.Erc721, + options: { + name, + symbol, + base_uri: baseURI, + }, + }, + ); + return SmartContract.fromModel(resp?.data); + } + + /** + * Creates an ERC1155 multi-token contract. + * + * @private + * @param {CreateERC1155Options} options - The options for creating the ERC1155 token. + * @param {string} options.uri - The URI for all token metadata. + * @returns {Promise} A Promise that resolves to the created SmartContract. + * @throws {APIError} If the API request to create a smart contract fails. + */ + private async createERC1155({ uri }: CreateERC1155Options): Promise { + const resp = await Coinbase.apiClients.smartContract!.createSmartContract( + this.getWalletId(), + this.getId(), + { + type: SmartContractType.Erc1155, + options: { + uri, + }, + }, + ); + return SmartContract.fromModel(resp?.data); + } + + /** + * Creates a custom contract. + * + * @private + * @param {CreateCustomContractOptions} options - The options for creating the custom contract. + * @param {string} options.solidityVersion - The version of the solidity compiler, must be 0.8.+, such as "0.8.28+commit.7893614a". See https://binaries.soliditylang.org/bin/list.json + * @param {string} options.solidityInputJson - The input json for the solidity compiler. See https://docs.soliditylang.org/en/latest/using-the-compiler.html#input-description for more details. + * @param {string} options.contractName - The name of the contract class. + * @param {Record} options.constructorArgs - The arguments for the constructor. + * @returns {Promise} A Promise that resolves to the created SmartContract. + * @throws {APIError} If the API request to compile or subsequently create a smart contract fails. + */ + private async createCustomContract({ + solidityVersion, + solidityInputJson, + contractName, + constructorArgs, + }: CreateCustomContractOptions): Promise { + const compileContractResp = await Coinbase.apiClients.smartContract!.compileSmartContract({ + solidity_compiler_version: solidityVersion, + solidity_input_json: solidityInputJson, + contract_name: contractName, + }); + + const compiledContract = compileContractResp.data; + const compiledContractId = compiledContract.compiled_smart_contract_id; + + const createContractResp = await Coinbase.apiClients.smartContract!.createSmartContract( + this.getWalletId(), + this.getId(), + { + type: SmartContractType.Custom, + options: JSON.stringify(constructorArgs), + compiled_smart_contract_id: compiledContractId, + }, + ); + return SmartContract.fromModel(createContractResp?.data); + } + + /** + * Creates a contract invocation with the given data. + * + * @param contractAddress - The address of the contract the method will be invoked on. + * @param method - The method to invoke on the contract. + * @param abi - The ABI of the contract. + * @param args - The arguments to pass to the contract method invocation. + * The keys should be the argument names and the values should be the argument values. + * @param atomicAmount - The atomic amount of the native asset to send to a payable contract method. + * @returns The ContractInvocation object. + * @throws {APIError} if the API request to create a contract invocation fails. + */ + private async createContractInvocation( + contractAddress: string, + method: string, + abi: object, + args: object, + atomicAmount?: string, + ): Promise { + const resp = await Coinbase.apiClients.contractInvocation!.createContractInvocation( + this.getWalletId(), + this.getId(), + { + method: method, + abi: JSON.stringify(abi), + contract_address: contractAddress, + args: JSON.stringify(args), + amount: atomicAmount, + }, + ); + + return ContractInvocation.fromModel(resp?.data); + } + + /** + * Creates a staking operation to stake. + * + * @param amount - The amount to stake. + * @param assetId - The asset to stake. + * @param mode - The staking mode. Defaults to DEFAULT. + * @param options - Additional options for the stake operation: + * + * A. Shared ETH Staking + * - `integrator_contract_address` (optional): The contract address to which the stake operation is directed to. Defaults to the integrator contract address associated with CDP account (if available) or else defaults to a shared integrator contract address for that network. + * + * B. Dedicated ETH Staking + * - `funding_address` (optional): Ethereum address for funding the stake operation. Defaults to the address initiating the stake operation. + * - `withdrawal_address` (optional): Ethereum address for receiving rewards and withdrawal funds. Defaults to the address initiating the stake operation. + * - `fee_recipient_address` (optional): Ethereum address for receiving transaction fees. Defaults to the address initiating the stake operation. + * + * @param timeoutSeconds - The amount to wait for the transaction to complete when broadcasted. + * @param intervalSeconds - The amount to check each time for a successful broadcast. + * @returns The staking operation after it's completed successfully. + */ + public async createStake( + amount: Amount, + assetId: string, + mode: StakeOptionsMode = StakeOptionsMode.DEFAULT, + options: { [key: string]: string } = {}, + timeoutSeconds = 600, + intervalSeconds = 0.2, + ): Promise { + await this.validateCanStake(amount, assetId, mode, options); + return this.createStakingOperation( + amount, + assetId, + "stake", + mode, + options, + timeoutSeconds, + intervalSeconds, + ); + } + + /** + * Creates a staking operation to unstake. + * + * @param amount - The amount to unstake. + * @param assetId - The asset to unstake. + * @param mode - The staking mode. Defaults to DEFAULT. + * @param options - Additional options for the unstake operation: + * + * A. Shared ETH Staking + * - `integrator_contract_address` (optional): The contract address to which the unstake operation is directed to. Defaults to the integrator contract address associated with CDP account (if available) or else defaults to a shared integrator contract address for that network. + * + * B. Dedicated ETH Staking + * - `immediate` (optional): Set this to "true" to unstake immediately i.e. leverage "Coinbase managed unstake" process . Defaults to "false" i.e. "User managed unstake" process. + * - `validator_pub_keys` (optional): List of comma separated validator public keys to unstake. Defaults to validators being picked up on your behalf corresponding to the unstake amount. + * + * @param timeoutSeconds - The amount to wait for the transaction to complete when broadcasted. + * @param intervalSeconds - The amount to check each time for a successful broadcast. + * @returns The staking operation after it's completed successfully. + */ + public async createUnstake( + amount: Amount, + assetId: string, + mode: StakeOptionsMode = StakeOptionsMode.DEFAULT, + options: { [key: string]: string } = {}, + timeoutSeconds = 600, + intervalSeconds = 0.2, + ): Promise { + // If performing a native ETH unstake, validation is always performed server-side. + if (!IsDedicatedEthUnstakeV2Operation(assetId, "unstake", mode, options)) { + await this.validateCanUnstake(amount, assetId, mode, options); + } + return this.createStakingOperation( + amount, + assetId, + "unstake", + mode, + options, + timeoutSeconds, + intervalSeconds, + ); + } + + /** + * Creates a staking operation to claim stake. + * + * @param amount - The amount to claim stake. + * @param assetId - The asset to claim stake. + * @param mode - The staking mode. Defaults to DEFAULT. + * @param options - Additional options for the claim stake operation. + * + * A. Shared ETH Staking + * - `integrator_contract_address` (optional): The contract address to which the claim stake operation is directed to. Defaults to the integrator contract address associated with CDP account (if available) or else defaults to a shared integrator contract address for that network. + * + * @param timeoutSeconds - The amount to wait for the transaction to complete when broadcasted. + * @param intervalSeconds - The amount to check each time for a successful broadcast. + * @returns The staking operation after it's completed successfully. + */ + public async createClaimStake( + amount: Amount, + assetId: string, + mode: StakeOptionsMode = StakeOptionsMode.DEFAULT, + options: { [key: string]: string } = {}, + timeoutSeconds = 600, + intervalSeconds = 0.2, + ): Promise { + await this.validateCanClaimStake(amount, assetId, mode, options); + return this.createStakingOperation( + amount, + assetId, + "claim_stake", + mode, + options, + timeoutSeconds, + intervalSeconds, + ); + } + + /** + * Creates a staking operation to consolidate. + * + * @param options - Additional options for the consolidation operation. + * + * @param timeoutSeconds - The amount to wait for the transaction to complete when broadcasted. + * @param intervalSeconds - The amount to check each time for a successful broadcast. + * + * @returns The staking operation after it's completed successfully. + */ + public async createValidatorConsolidation( + options: { [key: string]: string } = {}, + timeoutSeconds = 600, + intervalSeconds = 0.2, + ): Promise { + return this.createStakingOperation( + 0, + "eth", + "consolidate", + StakeOptionsMode.NATIVE, + options, + timeoutSeconds, + intervalSeconds, + ); + } + + /** + * Creates a Payload Signature. + * + * @param unsignedPayload - The Unsigned Payload to sign. + * @returns A promise that resolves to the Payload Signature object. + * @throws {APIError} if the API request to create a Payload Signature fails. + * @throws {Error} if the address does not have a private key loaded or an associated Server-Signer. + */ + public async createPayloadSignature(unsignedPayload: string): Promise { + if (!Coinbase.useServerSigner && !this.key) { + throw new Error("Cannot sign payload with address without private key loaded"); + } + + let signature: undefined | string = undefined; + if (!Coinbase.useServerSigner) { + signature = this.key!.signingKey.sign(unsignedPayload).serialized; + } + + const createPayloadSignatureRequest = { + unsigned_payload: unsignedPayload, + signature, + }; + + const response = await Coinbase.apiClients.address!.createPayloadSignature( + this.getWalletId(), + this.getId(), + createPayloadSignatureRequest, + ); + + const payloadSignature = new PayloadSignature(response.data); + + return payloadSignature; + } + + /** + * Gets a Payload Signature. + * + * @param payloadSignatureId - The ID of the Payload Signature to fetch. + * @returns A promise that resolves to the Payload Signature object. + * @throws {APIError} if the API request to get the Payload Signature fails. + */ + public async getPayloadSignature(payloadSignatureId: string): Promise { + const response = await Coinbase.apiClients.address!.getPayloadSignature( + this.getWalletId(), + this.getId(), + payloadSignatureId, + ); + + const payloadSignature = new PayloadSignature(response.data); + + return payloadSignature; + } + + /** + * Lists all the Payload Signatures associated with the Address. + * + * @param options - The pagination options. + * @param options.limit - The maximum number of Payload Signatures to return. Limit can range between 1 and 100. + * @param options.page - The cursor for pagination across multiple pages of Payload Signatures. Don\'t include this parameter on the first call. Use the next page value returned in a previous response to request subsequent results. + * + * @returns A promise that resolves to the paginated list response of Payload Signatures. + * @throws {APIError} if the API request to list the Payload Signatures fails. + */ + public async listPayloadSignatures({ + limit = Coinbase.defaultPageLimit, + page = undefined, + }: PaginationOptions = {}): Promise> { + const data: PayloadSignature[] = []; + let nextPage: string | undefined; + + const response = await Coinbase.apiClients.address!.listPayloadSignatures( + this.model.wallet_id, + this.model.address_id, + 100, + page?.length ? page : undefined, + ); + + response.data.data.forEach(payloadSignatureModel => { + data.push(new PayloadSignature(payloadSignatureModel)); + }); + + const hasMore = response.data.has_more; + + if (hasMore) { + if (response.data.next_page) { + nextPage = response.data.next_page; + } + } + + return { + data, + hasMore, + nextPage, + }; + } + + /** + * Fund the address from your account on the Coinbase Platform. + * + * @param options - The options to create the fund operation + * @param options.amount - The amount of the Asset to fund the wallet with + * @param options.assetId - The ID of the Asset to fund with. For Ether, eth, gwei, and wei are supported. + * @returns The created fund operation object + */ + public async fund({ amount, assetId }: CreateFundOptions): Promise { + const normalizedAmount = new Decimal(amount.toString()); + + return FundOperation.create( + this.getWalletId(), + this.getId(), + normalizedAmount, + assetId, + this.getNetworkId(), + ); + } + + /** + * Get a quote for funding the address from your Coinbase platform account. + * + * @param options - The options to create the fund quote + * @param options.amount - The amount to fund + * @param options.assetId - The ID of the Asset to fund with. For Ether, eth, gwei, and wei are supported. + * @returns The fund quote object + */ + public async quoteFund({ amount, assetId }: CreateQuoteOptions): Promise { + const normalizedAmount = new Decimal(amount.toString()); + + return FundQuote.create( + this.getWalletId(), + this.getId(), + normalizedAmount, + assetId, + this.getNetworkId(), + ); + } + + /** + * Returns all the fund operations associated with the address. + * + * @param options - The pagination options. + * @param options.limit - The maximum number of Fund Operations to return. Limit can range between 1 and 100. + * @param options.page - The cursor for pagination across multiple pages of Fund Operations. Don't include this parameter on the first call. Use the next page value returned in a previous response to request subsequent results. + * + * @returns The paginated list response of fund operations. + */ + public async listFundOperations({ + limit = Coinbase.defaultPageLimit, + page = undefined, + }: PaginationOptions = {}): Promise> { + return FundOperation.listFundOperations(this.model.wallet_id, this.model.address_id, { + limit, + page, + }); + } + + /** + * Returns the address and network ID of the given destination. + * + * @param destination - The destination to get the address and network ID of. + * @returns The address and network ID of the destination. + */ + private async getDestinationAddressAndNetwork( + destination: Destination, + ): Promise<[string, string]> { + if (typeof destination !== "string" && destination.getNetworkId() !== this.getNetworkId()) { + throw new ArgumentError("Transfer must be on the same Network"); + } + if (destination instanceof WalletClass) { + return [(await destination.getDefaultAddress()).getId(), destination.getNetworkId()]; + } + if (destination instanceof Address) { + return [destination.getId(), destination.getNetworkId()]; + } + return [destination, this.getNetworkId()]; } /** @@ -344,36 +994,6 @@ export class WalletAddress extends Address { return new Trade(tradeModel?.data); } - /** - * Broadcasts a trade using the provided signed payloads. - * - * @param trade - The Trade object representing the trade. - * @param signedPayload - The signed payload of the trade. - * @param approveTransactionPayload - The signed payload of the approval transaction, if any. - * @returns A promise that resolves to a Trade object representing the broadcasted trade. - */ - private async broadcastTradeRequest( - trade: Trade, - signedPayload: string, - approveTransactionPayload?: string, - ): Promise { - const broadcastTradeRequestPayload = { - signed_payload: signedPayload, - approve_transaction_signed_payload: approveTransactionPayload - ? approveTransactionPayload - : undefined, - }; - - const response = await Coinbase.apiClients.trade!.broadcastTrade( - this.getWalletId(), - this.getId(), - trade.getId(), - broadcastTradeRequestPayload, - ); - - return new Trade(response.data); - } - /** * Checks if trading is possible and raises an error if not. * @@ -382,7 +1002,7 @@ export class WalletAddress extends Address { * @throws {Error} If the private key is not loaded, or if the asset IDs are unsupported, or if there are insufficient funds. */ private async validateCanTrade(amount: Amount, fromAssetId: string) { - if (!this.canSign()) { + if (!Coinbase.useServerSigner && !this.key) { throw new Error("Cannot trade from address without private key loaded"); } const currentBalance = await this.getBalance(fromAssetId); @@ -393,4 +1013,136 @@ export class WalletAddress extends Address { ); } } + + /** + * Creates a staking operation to stake, signs it, and broadcasts it on the blockchain. + * + * @param amount - The amount for the staking operation. + * @param assetId - The asset to the staking operation. + * @param action - The type of staking action to perform. + * @param mode - The staking mode. Defaults to DEFAULT. + * @param options - Additional options such as setting the mode for the staking action. + * @param timeoutSeconds - The amount to wait for the transaction to complete when broadcasted. + * @param intervalSeconds - The amount to check each time for a successful broadcast. + * @throws {APIError} if the API request to create or broadcast staking operation fails. + * @throws {Error} if the amount is less than zero. + * @returns The staking operation after it's completed fully. + */ + private async createStakingOperation( + amount: Amount, + assetId: string, + action: string, + mode: StakeOptionsMode, + options: { [key: string]: string }, + timeoutSeconds: number, + intervalSeconds: number, + ): Promise { + let stakingOperation = await this.createStakingOperationRequest( + amount, + assetId, + action, + mode, + options, + ); + + const startTime = Date.now(); + + // Loop until the timeout is reached. + while (Date.now() - startTime < timeoutSeconds * 1000) { + // Loop through any unsigned transactions that are available, sign and broadcast them. + for (let i = 0; i < stakingOperation.getTransactions().length; i++) { + const transaction = stakingOperation.getTransactions()[i]; + + if (!transaction.isSigned()) { + await transaction.sign(this.key!); + + stakingOperation = await this.broadcastStakingOperationRequest( + stakingOperation.getID(), + transaction.getSignedPayload()!.slice(2), + i, + ); + } + } + + await stakingOperation.reload(); + + if (stakingOperation.isTerminalState()) { + return stakingOperation; + } + + await delay(intervalSeconds); + } + + throw new Error("Staking Operation timed out"); + } + + /** + * A helper function that creates the staking operation. + * + * @param amount - The amount for the staking operation. + * @param assetId - The asset for the staking operation. + * @param action - The type of staking action to perform. + * @param mode - The staking mode. Defaults to DEFAULT. + * @param options - Additional options such as setting the mode for the staking action. + * @private + * @throws {APIError} if the API request to create staking operation fails. + * @returns The created staking operation. + */ + private async createStakingOperationRequest( + amount: Amount, + assetId: string, + action: string, + mode: StakeOptionsMode = StakeOptionsMode.DEFAULT, + options: { [key: string]: string } = {}, + ): Promise { + const asset = await Asset.fetch(this.getNetworkId(), assetId); + + options.mode = mode ? mode : StakeOptionsMode.DEFAULT; + + options.amount = asset.toAtomicAmount(new Decimal(amount.toString())).toString(); + + const stakingOperationRequest = { + network_id: this.getNetworkId(), + asset_id: Asset.primaryDenomination(assetId), + action: action, + options: options, + }; + + const response = await Coinbase.apiClients.walletStake!.createStakingOperation( + this.getWalletId(), + this.getId(), + stakingOperationRequest, + ); + + return new StakingOperation(response!.data); + } + + /** + * A helper function that broadcasts the signed payload. + * + * @param stakingOperationID - The staking operation id related to the signed payload. + * @param signedPayload - The payload that's being broadcasted. + * @param transactionIndex - The index of the transaction in the array from the staking operation. + * @private + * @returns An updated staking operation with the broadcasted transaction. + */ + private async broadcastStakingOperationRequest( + stakingOperationID: string, + signedPayload: string, + transactionIndex: number, + ): Promise { + const broadcastStakingOperationRequest = { + signed_payload: signedPayload, + transaction_index: transactionIndex, + }; + + const response = await Coinbase.apiClients.walletStake!.broadcastStakingOperation( + this.getWalletId(), + this.getId(), + stakingOperationID, + broadcastStakingOperationRequest, + ); + + return new StakingOperation(response.data); + } } diff --git a/src/coinbase/address_reputation.ts b/src/coinbase/address_reputation.ts new file mode 100644 index 00000000..d18e9d2c --- /dev/null +++ b/src/coinbase/address_reputation.ts @@ -0,0 +1,60 @@ +import { AddressReputation as AddressReputationModel, AddressReputationMetadata } from "../client"; + +/** + * A representation of the reputation of a blockchain address. + */ +export class AddressReputation { + private model: AddressReputationModel; + /** + * A representation of the reputation of a blockchain address. + * + * @param {AddressReputationModel} model - The reputation model instance. + */ + constructor(model: AddressReputationModel) { + if (!model) { + throw new Error("Address reputation model cannot be empty"); + } + this.model = model; + } + + /** + * Returns the address ID. + * + * @returns {string} The address ID. + */ + public get risky(): boolean { + return this.model.score < 0; + } + + /** + * Returns the score of the address. + * The score is a number between -100 and 100. + * + * @returns {number} The score of the address. + */ + public get score(): number { + return this.model.score; + } + + /** + * Returns the metadata of the address reputation. + * The metadata contains additional information about the address reputation. + * + * @returns {AddressReputationMetadata} The metadata of the address reputation. + */ + public get metadata(): AddressReputationMetadata { + return this.model.metadata; + } + + /** + * Returns the address ID. + * + * @returns {string} The address ID. + */ + toString(): string { + const metadata = Object.entries(this.model.metadata).map(([key, value]) => { + return `${key}: ${value}`; + }); + return `AddressReputation(score: ${this.score}, metadata: {${metadata.join(", ")}})`; + } +} diff --git a/src/coinbase/api_error.ts b/src/coinbase/api_error.ts index 80b9b529..2c98e41f 100644 --- a/src/coinbase/api_error.ts +++ b/src/coinbase/api_error.ts @@ -1,6 +1,5 @@ /* eslint-disable jsdoc/require-jsdoc */ import { AxiosError } from "axios"; -import { InternalError } from "./errors"; /** * The API error response type. @@ -17,6 +16,7 @@ export class APIError extends AxiosError { httpCode: number | null; apiCode: string | null; apiMessage: string | null; + correlationId: string | null; /** * Initializes a new APIError object. @@ -30,11 +30,13 @@ export class APIError extends AxiosError { this.httpCode = error.response ? error.response.status : null; this.apiCode = null; this.apiMessage = null; + this.correlationId = null; if (error.response && error.response.data) { const body = error.response.data; this.apiCode = body.code; this.apiMessage = body.message; + this.correlationId = body.correlation_id; } } @@ -57,7 +59,7 @@ export class APIError extends AxiosError { case "unauthorized": return new UnauthorizedError(error); case "internal": - return new InternalError(error.message); + return new InternalError(error); case "not_found": return new NotFoundError(error); case "invalid_wallet_id": @@ -109,10 +111,20 @@ export class APIError extends AxiosError { * @returns {string} a String representation of the APIError */ toString() { - return `APIError{httpCode: ${this.httpCode}, apiCode: ${this.apiCode}, apiMessage: ${this.apiMessage}}`; + const payload = {} as Record; + + if (this.httpCode) payload.httpCode = this.httpCode; + if (this.apiCode) payload.apiCode = this.apiCode; + if (this.apiMessage) payload.apiMessage = this.apiMessage; + if (this.correlationId) payload.correlationId = this.correlationId; + + return `${this.name}{${Object.entries(payload) + .map(([key, value]) => `${key}: ${value}`) + .join(", ")}}`; } } +export class InternalError extends APIError {} export class UnimplementedError extends APIError {} export class UnauthorizedError extends APIError {} export class NotFoundError extends APIError {} diff --git a/src/coinbase/asset.ts b/src/coinbase/asset.ts index 3a6780dd..5af93d30 100644 --- a/src/coinbase/asset.ts +++ b/src/coinbase/asset.ts @@ -2,7 +2,7 @@ import Decimal from "decimal.js"; import { Asset as AssetModel } from "./../client/api"; import { Coinbase } from "./coinbase"; import { GWEI_DECIMALS } from "./constants"; -import { ArgumentError, InternalError } from "./errors"; +import { ArgumentError } from "./errors"; /** A representation of an Asset. */ export class Asset { @@ -31,15 +31,6 @@ export class Asset { this.decimals = decimals; } - /** - * Returns the Asset ID. - * - * @returns The Asset ID. - */ - getAssetId(): string { - return this.assetId; - } - /** * Creates an Asset from an Asset Model. * @@ -50,30 +41,36 @@ export class Asset { */ public static fromModel(model: AssetModel, assetId?: string) { if (!model) { - throw new InternalError("Invalid asset model"); + throw new Error("Invalid asset model"); } let decimals = model.decimals!; // TODO: Push this logic down to the backend. - if ( - assetId && - model.asset_id && - Coinbase.toAssetId(model.asset_id) !== Coinbase.toAssetId(assetId) - ) { - switch (assetId) { - case "gwei": - decimals = GWEI_DECIMALS; - break; - case "wei": - decimals = 0; - break; - case "eth": - break; - default: - throw new ArgumentError(`Invalid asset ID: ${assetId}`); + if (assetId && model.asset_id) { + const normalizedModelAssetId = model.asset_id.toLowerCase(); + const normalizedAssetId = assetId.toLowerCase(); + + if (Coinbase.toAssetId(normalizedModelAssetId) !== Coinbase.toAssetId(normalizedAssetId)) { + switch (normalizedAssetId) { + case "gwei": + decimals = GWEI_DECIMALS; + break; + case "wei": + decimals = 0; + break; + case "eth": + break; + default: + throw new ArgumentError(`Invalid asset ID: ${assetId}`); + } } } - return new Asset(model.network_id, model.asset_id, model.contract_address!, decimals); + return new Asset( + model.network_id, + assetId ?? model.asset_id, + model.contract_address!, + decimals, + ); } /** @@ -107,31 +104,33 @@ export class Asset { } /** - * Converts the amount of the Asset from whole to atomic units. + * Returns the primary denomination for the Asset. * - * @param wholeAmount - The whole amount to convert to atomic units. - * @returns The amount in atomic units + * @returns The primary denomination for the Asset. */ - toAtomicAmount(wholeAmount: Decimal): Decimal { - return wholeAmount.times(new Decimal(10).pow(this.decimals)); + public primaryDenomination(): string { + return Asset.primaryDenomination(this.assetId); } + /** - * Converts the amount of the Asset from atomic to whole units. + * Converts the amount of the Asset from whole to atomic units. * - * @param wholeAmount - The atomic amount to convert to whole units. + * @param wholeAmount - The whole amount to convert to atomic units. * @returns The amount in atomic units */ - fromAtomicAmount(wholeAmount: Decimal): Decimal { - return wholeAmount.dividedBy(new Decimal(10).pow(this.decimals)); + toAtomicAmount(wholeAmount: Decimal): bigint { + const atomicAmount = wholeAmount.times(new Decimal(10).pow(this.decimals)); + return BigInt(atomicAmount.toFixed()); } /** - * Returns the primary denomination for the Asset. + * Converts the amount of the Asset from atomic to whole units. * - * @returns The primary denomination for the Asset. + * @param atomicAmount - The atomic amount to convert to whole units. + * @returns The amount in atomic units */ - public primaryDenomination(): string { - return Asset.primaryDenomination(this.assetId); + fromAtomicAmount(atomicAmount: Decimal): Decimal { + return atomicAmount.dividedBy(new Decimal(10).pow(this.decimals)); } /** @@ -142,4 +141,13 @@ export class Asset { toString(): string { return `Asset{ networkId: ${this.networkId}, assetId: ${this.assetId}, contractAddress: ${this.contractAddress}, decimals: ${this.decimals} }`; } + + /** + * Returns the Asset ID. + * + * @returns The Asset ID. + */ + getAssetId(): string { + return this.assetId; + } } diff --git a/src/coinbase/authenticator.ts b/src/coinbase/authenticator.ts index fee96025..f104a931 100644 --- a/src/coinbase/authenticator.ts +++ b/src/coinbase/authenticator.ts @@ -1,8 +1,9 @@ +import { createPrivateKey } from "crypto"; import { InternalAxiosRequestConfig } from "axios"; -import { JWK, JWS } from "node-jose"; -import { InvalidAPIKeyFormat } from "./errors"; +import { SignJWT, importPKCS8, importJWK, JWTPayload } from "jose"; +import { InvalidAPIKeyFormatError } from "./errors"; +import { version } from "../../package.json"; -const pemHeader = "-----BEGIN EC PRIVATE KEY-----"; const pemFooter = "-----END EC PRIVATE KEY-----"; /** @@ -11,25 +12,31 @@ const pemFooter = "-----END EC PRIVATE KEY-----"; export class CoinbaseAuthenticator { private apiKey: string; private privateKey: string; + private source: string; + private sourceVersion?: string; /** * Initializes the Authenticator. * * @param {string} apiKey - The API key name. * @param {string} privateKey - The private key associated with the API key. + * @param {string} source - The source of the request. + * @param {string} [sourceVersion] - The version of the source. */ - constructor(apiKey: string, privateKey: string) { + constructor(apiKey: string, privateKey: string, source: string, sourceVersion?: string) { this.apiKey = apiKey; this.privateKey = privateKey; + this.source = source; + this.sourceVersion = sourceVersion; } /** - * Middleware to intercept requests and add JWT to Authorization header. + * Middleware to intercept requests and add JWT to the Authorization header. * * @param {InternalAxiosRequestConfig} config - The request configuration. - * @param {boolean} debugging - Flag to enable debugging. - * @returns {Promise} The request configuration with the Authorization header added. - * @throws {InvalidAPIKeyFormat} If JWT could not be built. + * @param {boolean} [debugging] - Flag to enable debugging. + * @returns {Promise} The modified request configuration with the Authorization header added. + * @throws {InvalidAPIKeyFormatError} If JWT could not be built. */ async authenticateRequest( config: InternalAxiosRequestConfig, @@ -42,6 +49,7 @@ export class CoinbaseAuthenticator { } config.headers["Authorization"] = `Bearer ${token}`; config.headers["Content-Type"] = "application/json"; + config.headers["Correlation-Context"] = this.getCorrelationData(); return config; } @@ -49,68 +57,119 @@ export class CoinbaseAuthenticator { * Builds the JWT for the given API endpoint URL. * * @param {string} url - URL of the API endpoint. - * @param {string} method - HTTP method of the request. - * @returns {Promise} JWT token. - * @throws {InvalidAPIKeyFormat} If the private key is not in the correct format. + * @param {string} [method] - HTTP method of the request. + * @returns {Promise} A JWT token. + * @throws {InvalidAPIKeyFormatError} If the private key is not in the correct format or signing fails. */ async buildJWT(url: string, method = "GET"): Promise { - const pemPrivateKey = this.extractPemKey(this.privateKey); - let privateKey: JWK.Key; - - try { - privateKey = await JWK.asKey(pemPrivateKey, "pem"); - if (privateKey.kty !== "EC") { - throw new InvalidAPIKeyFormat("Invalid key type"); - } - } catch (error) { - throw new InvalidAPIKeyFormat("Could not parse the private key"); - } - - const header = { - alg: "ES256", - kid: this.apiKey, - typ: "JWT", - nonce: this.nonce(), - }; - const urlObject = new URL(url); const uri = `${method} ${urlObject.host}${urlObject.pathname}`; - const claims = { + const now = Math.floor(Date.now() / 1000); + const claims: JWTPayload = { sub: this.apiKey, iss: "cdp", aud: ["cdp_service"], - nbf: Math.floor(Date.now() / 1000), - exp: Math.floor(Date.now() / 1000) + 60, // +1 minute uris: [uri], }; - const payload = Buffer.from(JSON.stringify(claims)).toString("utf8"); + if (this.privateKey.startsWith("-----BEGIN")) { + return this.buildECJWT(claims, now); + } else { + return this.buildEdwardsJWT(claims, now); + } + } + + /** + * Builds a JWT using an EC key. + * + * @param {JWTPayload} claims - The JWT claims. + * @param {number} now - The current timestamp (in seconds). + * @returns {Promise} A JWT token signed with an EC key. + * @throws {InvalidAPIKeyFormatError} If the key conversion, import, or signing fails. + */ + private async buildECJWT(claims: JWTPayload, now: number): Promise { + // Ensure the PEM is valid and let jose import it. + const pemPrivateKey = this.extractPemKey(this.privateKey); + let pkcs8Key: string; try { - const result = await JWS.createSign({ format: "compact", fields: header }, privateKey) - .update(payload) - .final(); + const keyObj = createPrivateKey(pemPrivateKey); + pkcs8Key = keyObj.export({ type: "pkcs8", format: "pem" }).toString(); + } catch (error) { + throw new InvalidAPIKeyFormatError("Could not convert the EC private key to PKCS8 format"); + } + let ecKey; + try { + ecKey = await importPKCS8(pkcs8Key, "ES256"); + } catch (error) { + throw new InvalidAPIKeyFormatError("Could not import the EC private key"); + } + try { + return await new SignJWT(claims) + .setProtectedHeader({ alg: "ES256", kid: this.apiKey, typ: "JWT", nonce: this.nonce() }) + .setIssuedAt(now) + .setNotBefore(now) + .setExpirationTime(now + 60) + .sign(ecKey); + } catch (err) { + throw new InvalidAPIKeyFormatError("Could not sign the JWT with the EC key"); + } + } - return result as unknown as string; + /** + * Builds a JWT using an Ed25519 key. + * + * @param {JWTPayload} claims - The JWT claims. + * @param {number} now - The current timestamp (in seconds). + * @returns {Promise} A JWT token signed with an Ed25519 key. + * @throws {InvalidAPIKeyFormatError} If the key parsing, import, or signing fails. + */ + private async buildEdwardsJWT(claims: JWTPayload, now: number): Promise { + // Expect a base64 encoded 64-byte string (32 bytes seed + 32 bytes public key) + const decoded = Buffer.from(this.privateKey, "base64"); + if (decoded.length !== 64) { + throw new InvalidAPIKeyFormatError("Could not parse the private key"); + } + const seed = decoded.subarray(0, 32); + const publicKey = decoded.subarray(32); + const jwk = { + kty: "OKP", + crv: "Ed25519", + d: seed.toString("base64url"), + x: publicKey.toString("base64url"), + }; + let key; + try { + key = await importJWK(jwk, "EdDSA"); + } catch (error) { + throw new InvalidAPIKeyFormatError("Could not import the Ed25519 private key"); + } + try { + return await new SignJWT(claims) + .setProtectedHeader({ alg: "EdDSA", kid: this.apiKey, typ: "JWT", nonce: this.nonce() }) + .setIssuedAt(now) + .setNotBefore(now) + .setExpirationTime(now + 60) + .sign(key); } catch (err) { - throw new InvalidAPIKeyFormat("Could not sign the JWT"); + throw new InvalidAPIKeyFormatError("Could not sign the JWT with the Ed25519 key"); } } /** - * Extracts the PEM key from the given private key string. + * Extracts and verifies the PEM key from the given private key string. * * @param {string} privateKeyString - The private key string. - * @returns {string} The PEM key. - * @throws {InvalidAPIKeyFormat} If the private key string is not in the correct format. + * @returns {string} The original PEM key string if valid. + * @throws {InvalidAPIKeyFormatError} If the private key string is not in the correct PEM format. */ private extractPemKey(privateKeyString: string): string { - privateKeyString = privateKeyString.replace(/\n/g, ""); - - if (privateKeyString.startsWith(pemHeader) && privateKeyString.endsWith(pemFooter)) { + if ( + privateKeyString.includes("-----BEGIN EC PRIVATE KEY-----") && + privateKeyString.includes(pemFooter) + ) { return privateKeyString; } - - throw new InvalidAPIKeyFormat("Invalid private key format"); + throw new InvalidAPIKeyFormatError("Invalid private key format"); } /** @@ -121,11 +180,28 @@ export class CoinbaseAuthenticator { private nonce(): string { const range = "0123456789"; let result = ""; - for (let i = 0; i < 16; i++) { result += range.charAt(Math.floor(Math.random() * range.length)); } - return result; } + + /** + * Returns encoded correlation data including the SDK version and language. + * + * @returns {string} Encoded correlation data as a query string. + */ + private getCorrelationData(): string { + const data = { + sdk_version: version, + sdk_language: "typescript", + source: this.source, + }; + if (this.sourceVersion) { + data["source_version"] = this.sourceVersion; + } + return Object.keys(data) + .map(key => `${key}=${encodeURIComponent(data[key])}`) + .join(","); + } } diff --git a/src/coinbase/coinbase.ts b/src/coinbase/coinbase.ts index 6c3ec6fc..ba58933e 100644 --- a/src/coinbase/coinbase.ts +++ b/src/coinbase/coinbase.ts @@ -1,8 +1,7 @@ -import globalAxios from "axios"; +import globalAxios, { AxiosError } from "axios"; +import axiosRetry from "axios-retry"; import * as fs from "fs"; import { - User as UserModel, - UsersApiFactory, TransfersApiFactory, AddressesApiFactory, WalletsApiFactory, @@ -11,13 +10,27 @@ import { StakeApiFactory, AssetsApiFactory, ExternalAddressesApiFactory, + WebhooksApiFactory, + NetworkIdentifier, + ContractEventsApiFactory, + ContractInvocationsApiFactory, + BalanceHistoryApiFactory, + SmartContractsApiFactory, + TransactionHistoryApiFactory, + MPCWalletStakeApiFactory, + FundApiFactory, + ReputationApiFactory, + SmartWalletsApiFactory, } from "../client"; import { BASE_PATH } from "./../client/base"; import { Configuration } from "./../client/configuration"; import { CoinbaseAuthenticator } from "./authenticator"; -import { InternalError, InvalidAPIKeyFormat, InvalidConfiguration } from "./errors"; +import { + InvalidAPIKeyFormatError, + InvalidConfigurationError, + UninitializedSDKError, +} from "./errors"; import { ApiClients, CoinbaseConfigureFromJsonOptions, CoinbaseOptions } from "./types"; -import { User } from "./user"; import { logApiResponse, registerAxiosInterceptors } from "./utils"; import * as os from "os"; @@ -26,14 +39,16 @@ import * as os from "os"; */ export class Coinbase { /** - * The list of supported networks. + * The map of supported networks to network ID. Generated from the OpenAPI spec. * * @constant + * + * @example + * ```typescript + * Coinbase.networks.BaseMainnet + * ``` */ - static networks = { - BaseSepolia: "base-sepolia", - BaseMainnet: "base-mainnet", - }; + static networks = NetworkIdentifier; /** * The list of supported assets. @@ -46,9 +61,20 @@ export class Coinbase { Gwei: "gwei", Usdc: "usdc", Weth: "weth", + Sol: "sol", + Lamport: "lamport", + Eurc: "eurc", + Cbbtc: "cbbtc", }; - static apiClients: ApiClients = {}; + static apiClients: ApiClients = new Proxy({} as ApiClients, { + get(target, prop) { + if (!Reflect.has(target, prop)) { + throw new UninitializedSDKError(); + } + return Reflect.get(target, prop); + }, + }); /** * The CDP API key Private Key. @@ -64,9 +90,18 @@ export class Coinbase { */ static useServerSigner: boolean; + /** + * The default page limit for list methods. + * + * @constant + */ + static defaultPageLimit: number = 100; + /** * Initializes the Coinbase SDK. * + * @deprecated as of v0.5.0, use `configure` or `configureFromJson` instead. + * * @class * @param options - The constructor options. * @param options.apiKeyName - The API key name. @@ -74,8 +109,11 @@ export class Coinbase { * @param options.useServerSigner - Whether to use a Server-Signer or not. * @param options.debugging - If true, logs API requests and responses to the console. * @param options.basePath - The base path for the API. - * @throws {InternalError} If the configuration is invalid. - * @throws {InvalidAPIKeyFormat} If not able to create JWT token. + * @param options.maxNetworkRetries - The maximum number of network retries for the API GET requests. + * @param options.source - Optional source string to be sent with the API requests. Defaults to `sdk`. + * @param options.sourceVersion - Optional source version string to be sent with the API requests. + * @throws {InvalidConfigurationError} If the configuration is invalid. + * @throws {InvalidAPIKeyFormatError} If not able to create JWT token. */ constructor({ apiKeyName, @@ -83,18 +121,35 @@ export class Coinbase { useServerSigner = false, debugging = false, basePath = BASE_PATH, + maxNetworkRetries = 3, + source = "sdk", + sourceVersion = undefined, }: CoinbaseOptions) { if (apiKeyName === "") { - throw new InternalError("Invalid configuration: apiKeyName is empty"); + throw new InvalidConfigurationError("Invalid configuration: apiKeyName is empty"); } if (privateKey === "") { - throw new InternalError("Invalid configuration: privateKey is empty"); + throw new InvalidConfigurationError("Invalid configuration: privateKey is empty"); } - const coinbaseAuthenticator = new CoinbaseAuthenticator(apiKeyName, privateKey); + const coinbaseAuthenticator = new CoinbaseAuthenticator( + apiKeyName, + privateKey, + source, + sourceVersion, + ); const config = new Configuration({ basePath: basePath, }); const axiosInstance = globalAxios.create(); + axiosRetry(axiosInstance, { + retries: maxNetworkRetries, + retryCondition: (error: AxiosError) => { + return ( + error.config?.method?.toUpperCase() === "GET" && + (error.response?.status || 0) in [500, 502, 503, 504] + ); + }, + }); registerAxiosInterceptors( axiosInstance, config => coinbaseAuthenticator.authenticateRequest(config, debugging), @@ -102,21 +157,71 @@ export class Coinbase { response => logApiResponse(response, debugging), ); - Coinbase.apiClients.user = UsersApiFactory(config, basePath, axiosInstance); Coinbase.apiClients.wallet = WalletsApiFactory(config, basePath, axiosInstance); + Coinbase.apiClients.smartWallet = SmartWalletsApiFactory(config, basePath, axiosInstance); Coinbase.apiClients.address = AddressesApiFactory(config, basePath, axiosInstance); Coinbase.apiClients.transfer = TransfersApiFactory(config, basePath, axiosInstance); Coinbase.apiClients.trade = TradesApiFactory(config, basePath, axiosInstance); Coinbase.apiClients.serverSigner = ServerSignersApiFactory(config, basePath, axiosInstance); Coinbase.apiClients.stake = StakeApiFactory(config, basePath, axiosInstance); + Coinbase.apiClients.walletStake = MPCWalletStakeApiFactory(config, basePath, axiosInstance); Coinbase.apiClients.asset = AssetsApiFactory(config, basePath, axiosInstance); + Coinbase.apiClients.webhook = WebhooksApiFactory(config, basePath, axiosInstance); + Coinbase.apiClients.contractInvocation = ContractInvocationsApiFactory( + config, + basePath, + axiosInstance, + ); Coinbase.apiClients.externalAddress = ExternalAddressesApiFactory( config, basePath, axiosInstance, ); + Coinbase.apiClients.balanceHistory = BalanceHistoryApiFactory(config, basePath, axiosInstance); + Coinbase.apiClients.contractEvent = ContractEventsApiFactory(config, basePath, axiosInstance); + Coinbase.apiClients.smartContract = SmartContractsApiFactory(config, basePath, axiosInstance); + Coinbase.apiClients.fund = FundApiFactory(config, basePath, axiosInstance); + Coinbase.apiClients.transactionHistory = TransactionHistoryApiFactory( + config, + basePath, + axiosInstance, + ); Coinbase.apiKeyPrivateKey = privateKey; Coinbase.useServerSigner = useServerSigner; + Coinbase.apiClients.addressReputation = ReputationApiFactory(config, basePath, axiosInstance); + } + + /** + * Configures the Coinbase SDK with the provided options. + * + * @param options - The configuration options. + * @param options.apiKeyName - The name of the API key. + * @param options.privateKey - The private key associated with the API key. + * @param options.useServerSigner - Whether to use a Server-Signer or not. Defaults to false. + * @param options.debugging - If true, logs API requests and responses to the console. Defaults to false. + * @param options.basePath - The base path for the API. Defaults to BASE_PATH. + * @param options.source - Optional source string to be sent with the API requests. Defaults to `sdk`. + * @param options.sourceVersion - Optional source version string to be sent with the API requests. + * @returns A new instance of the Coinbase SDK. + */ + static configure({ + apiKeyName, + privateKey, + useServerSigner = false, + debugging = false, + basePath = BASE_PATH, + source = "sdk", + sourceVersion = undefined, + }: CoinbaseOptions) { + return new Coinbase({ + apiKeyName, + privateKey, + useServerSigner, + debugging, + basePath, + source, + sourceVersion, + }); } /** @@ -127,6 +232,8 @@ export class Coinbase { * @param options.useServerSigner - Whether to use a Server-Signer or not. * @param options.debugging - If true, logs API requests and responses to the console. * @param options.basePath - The base path for the API. + * @param options.source - Optional source string to be sent with the API requests. Defaults to `sdk`. + * @param options.sourceVersion - Optional source version string to be sent with the API requests. * @returns A new instance of the Coinbase SDK. * @throws {InvalidAPIKeyFormat} If the file does not exist or the configuration values are missing/invalid. * @throws {InvalidConfiguration} If the configuration is invalid. @@ -137,48 +244,45 @@ export class Coinbase { useServerSigner = false, debugging = false, basePath = BASE_PATH, + source = "sdk", + sourceVersion = undefined, }: CoinbaseConfigureFromJsonOptions = {}): Coinbase { filePath = filePath.startsWith("~") ? filePath.replace("~", os.homedir()) : filePath; if (!fs.existsSync(filePath)) { - throw new InvalidConfiguration(`Invalid configuration: file not found at ${filePath}`); + throw new InvalidConfigurationError(`Invalid configuration: file not found at ${filePath}`); } try { const data = fs.readFileSync(filePath, "utf8"); - const config = JSON.parse(data) as { name: string; privateKey: string }; - if (!config.name || !config.privateKey) { - throw new InvalidAPIKeyFormat("Invalid configuration: missing configuration values"); + // Support both "name" and "id" for the API key identifier. + const config = JSON.parse(data) as { name?: string; id?: string; privateKey: string }; + const apiKeyIdentifier = config.name || config.id; + if (!apiKeyIdentifier || !config.privateKey) { + throw new InvalidAPIKeyFormatError( + "Invalid configuration: missing API key identifier or privateKey", + ); } return new Coinbase({ - apiKeyName: config.name, + apiKeyName: apiKeyIdentifier, privateKey: config.privateKey, useServerSigner: useServerSigner, debugging: debugging, basePath: basePath, + source, + sourceVersion, }); } catch (e) { if (e instanceof SyntaxError) { - throw new InvalidAPIKeyFormat("Not able to parse the configuration file"); + throw new InvalidAPIKeyFormatError("Not able to parse the configuration file"); } else { - throw new InvalidAPIKeyFormat( + throw new InvalidAPIKeyFormatError( `An error occurred while reading the configuration file: ${(e as Error).message}`, ); } } } - /** - * Returns User object for the default user. - * - * @returns The default user. - * @throws {APIError} If the request fails. - */ - async getDefaultUser(): Promise { - const userResponse = await Coinbase.apiClients.user!.getCurrentUser(); - return new User(userResponse.data as UserModel); - } - /** * Converts a network symbol to a string, replacing underscores with hyphens. * diff --git a/src/coinbase/constants.ts b/src/coinbase/constants.ts index d0175d92..c2bff0ad 100644 --- a/src/coinbase/constants.ts +++ b/src/coinbase/constants.ts @@ -1,5 +1 @@ -import { Decimal } from "decimal.js"; - export const GWEI_DECIMALS = 9; -export const WEI_PER_ETHER = new Decimal("1000000000000000000"); -export const ATOMIC_UNITS_PER_USDC = new Decimal("1000000"); diff --git a/src/coinbase/contract_event.ts b/src/coinbase/contract_event.ts new file mode 100644 index 00000000..3f1a19d0 --- /dev/null +++ b/src/coinbase/contract_event.ts @@ -0,0 +1,142 @@ +import { ContractEvent as ContractEventModel } from "../client"; +/** + * A representation of a single contract event. + */ +export class ContractEvent { + private model: ContractEventModel; + + /** + * Creates the ContractEvent object. + * + * @param model - The underlying contract event object. + */ + constructor(model: ContractEventModel) { + this.model = model; + } + + /** + * Returns the network ID of the ContractEvent. + * + * @returns The network ID. + */ + public networkId(): string { + return this.model.network_id; + } + + /** + * Returns the protocol name of the ContractEvent. + * + * @returns The protocol name. + */ + public protocolName(): string { + return this.model.protocol_name; + } + + /** + * Returns the contract name of the ContractEvent. + * + * @returns The contract name. + */ + public contractName(): string { + return this.model.contract_name; + } + + /** + * Returns the event name of the ContractEvent. + * + * @returns The event name. + */ + public eventName(): string { + return this.model.event_name; + } + + /** + * Returns the signature of the ContractEvent. + * + * @returns The event signature. + */ + public sig(): string { + return this.model.sig; + } + + /** + * Returns the four bytes of the Keccak hash of the event signature. + * + * @returns The four bytes of the event signature hash. + */ + public fourBytes(): string { + return this.model.four_bytes; + } + + /** + * Returns the contract address of the ContractEvent. + * + * @returns The contract address. + */ + public contractAddress(): string { + return this.model.contract_address; + } + + /** + * Returns the block time of the ContractEvent. + * + * @returns The block time. + */ + public blockTime(): Date { + return new Date(this.model.block_time); + } + + /** + * Returns the block height of the ContractEvent. + * + * @returns The block height. + */ + public blockHeight(): number { + return this.model.block_height; + } + + /** + * Returns the transaction hash of the ContractEvent. + * + * @returns The transaction hash. + */ + public txHash(): string { + return this.model.tx_hash; + } + + /** + * Returns the transaction index of the ContractEvent. + * + * @returns The transaction index. + */ + public txIndex(): number { + return this.model.tx_index; + } + + /** + * Returns the event index of the ContractEvent. + * + * @returns The event index. + */ + public eventIndex(): number { + return this.model.event_index; + } + + /** + * Returns the event data of the ContractEvent. + * + * @returns The event data. + */ + public data(): string { + return this.model.data; + } + + /** + * Print the ContractEvent as a string. + * + * @returns The string representation of the ContractEvent. + */ + public toString(): string { + return `ContractEvent { networkId: '${this.networkId()}' protocolName: '${this.protocolName()}' contractName: '${this.contractName()}' eventName: '${this.eventName()}' contractAddress: '${this.contractAddress()}' blockHeight: ${this.blockHeight()} txHash: '${this.txHash()}' }`; + } +} diff --git a/src/coinbase/contract_invocation.ts b/src/coinbase/contract_invocation.ts new file mode 100644 index 00000000..1f10b264 --- /dev/null +++ b/src/coinbase/contract_invocation.ts @@ -0,0 +1,266 @@ +import { Decimal } from "decimal.js"; +import { TransactionStatus } from "./types"; +import { Transaction } from "./transaction"; +import { Coinbase } from "./coinbase"; +import { ContractInvocation as ContractInvocationModel } from "../client/api"; +import { ethers } from "ethers"; +import { delay } from "./utils"; +import { TimeoutError } from "./errors"; + +/** + * A representation of a ContractInvocation, which calls a smart contract method + * onchain. The fee is assumed to be paid in the native Asset of the Network. + */ +export class ContractInvocation { + private model: ContractInvocationModel; + + /** + * Private constructor to prevent direct instantiation outside of the factory methods. + * + * @ignore + * @param contractInvocationModel - The ContractInvocation model. + * @hideconstructor + */ + private constructor(contractInvocationModel: ContractInvocationModel) { + if (!contractInvocationModel) { + throw new Error("ContractInvocation model cannot be empty"); + } + this.model = contractInvocationModel; + } + + /** + * Converts a ContractInvocationModel into a ContractInvocation object. + * + * @param contractInvocationModel - The ContractInvocation model object. + * @returns The ContractInvocation object. + */ + public static fromModel(contractInvocationModel: ContractInvocationModel): ContractInvocation { + return new ContractInvocation(contractInvocationModel); + } + + /** + * Returns the ID of the ContractInvocation. + * + * @returns The ContractInvocation ID. + */ + public getId(): string { + return this.model.contract_invocation_id; + } + + /** + * Returns the Network ID of the ContractInvocation. + * + * @returns The Network ID. + */ + public getNetworkId(): string { + return this.model.network_id; + } + + /** + * Returns the Wallet ID of the ContractInvocation. + * + * @returns The Wallet ID. + */ + public getWalletId(): string { + return this.model.wallet_id; + } + + /** + * Returns the From Address ID of the ContractInvocation. + * + * @returns The From Address ID. + */ + public getFromAddressId(): string { + return this.model.address_id; + } + + /** + * Returns the Destination Address ID of the ContractInvocation. + * + * @returns The Destination Address ID. + */ + public getContractAddressId(): string { + return this.model.contract_address; + } + + /** + * Returns the Method of the ContractInvocation. + * + * @returns The Method. + */ + public getMethod(): string { + return this.model.method; + } + + /** + * Returns the Arguments of the ContractInvocation. + * + * @returns {object} The arguments object passed to the contract invocation. + * The key is the argument name and the value is the argument value. + */ + public getArgs(): object { + return JSON.parse(this.model.args); + } + + /** + * Returns the ABI of the ContractInvocation, if specified. + * + * @returns The ABI as an object, or undefined if not available. + */ + public getAbi(): object | undefined { + if (!this.model.abi) return undefined; + + return JSON.parse(this.model.abi); + } + + /** + * Returns the amount of the native asset sent to a payable contract method, if applicable. + * + * @returns The amount in atomic units of the native asset. + */ + public getAmount(): Decimal { + return new Decimal(this.model.amount); + } + + /** + * Returns the Transaction Hash of the ContractInvocation. + * + * @returns The Transaction Hash as a Hex string, or undefined if not yet available. + */ + public getTransactionHash(): string | undefined { + return this.getTransaction().getTransactionHash(); + } + + /** + * Returns the Transaction of the ContractInvocation. + * + * @returns The ethers.js Transaction object. + * @throws (InvalidUnsignedPayload) If the Unsigned Payload is invalid. + */ + public getRawTransaction(): ethers.Transaction { + return this.getTransaction().rawTransaction(); + } + + /** + * Signs the ContractInvocation with the provided key and returns the hex signature + * required for broadcasting the ContractInvocation. + * + * @param key - The key to sign the ContractInvocation with + * @returns The hex-encoded signed payload + */ + async sign(key: ethers.Wallet): Promise { + return this.getTransaction().sign(key); + } + + /** + * Returns the Status of the ContractInvocation. + * + * @returns The Status of the ContractInvocation. + */ + public getStatus(): TransactionStatus | undefined { + return this.getTransaction().getStatus(); + } + + /** + * Returns the Transaction of the ContractInvocation. + * + * @returns The Transaction + */ + public getTransaction(): Transaction { + return new Transaction(this.model.transaction); + } + + /** + * Returns the link to the Transaction on the blockchain explorer. + * + * @returns The link to the Transaction on the blockchain explorer. + */ + public getTransactionLink(): string { + return this.getTransaction().getTransactionLink(); + } + + /** + * Broadcasts the ContractInvocation to the Network. + * + * @returns The ContractInvocation object + * @throws {APIError} if the API request to broadcast a ContractInvocation fails. + */ + public async broadcast(): Promise { + if (!this.getTransaction()?.isSigned()) + throw new Error("Cannot broadcast unsigned ContractInvocation"); + + const broadcastContractInvocationRequest = { + signed_payload: this.getTransaction()!.getSignature()!, + }; + + const response = await Coinbase.apiClients.contractInvocation!.broadcastContractInvocation( + this.getWalletId(), + this.getFromAddressId(), + this.getId(), + broadcastContractInvocationRequest, + ); + + return ContractInvocation.fromModel(response.data); + } + + /** + * Waits for the ContractInvocation to be confirmed on the Network or fail on chain. + * Waits until the ContractInvocation is completed or failed on-chain by polling at the given interval. + * Raises an error if the ContractInvocation takes longer than the given timeout. + * + * @param options - The options to configure the wait function. + * @param options.intervalSeconds - The interval to check the status of the ContractInvocation. + * @param options.timeoutSeconds - The maximum time to wait for the ContractInvocation to be confirmed. + * + * @returns The ContractInvocation object in a terminal state. + * @throws {Error} if the ContractInvocation times out. + */ + public async wait({ + intervalSeconds = 0.2, + timeoutSeconds = 10, + } = {}): Promise { + const startTime = Date.now(); + + while (Date.now() - startTime < timeoutSeconds * 1000) { + await this.reload(); + + // If the ContractInvocation is in a terminal state, return the ContractInvocation. + const status = this.getStatus(); + if (status === TransactionStatus.COMPLETE || status === TransactionStatus.FAILED) { + return this; + } + + await delay(intervalSeconds); + } + + throw new TimeoutError("ContractInvocation timed out"); + } + + /** + * Reloads the ContractInvocation model with the latest data from the server. + * + * @throws {APIError} if the API request to get a ContractInvocation fails. + */ + public async reload(): Promise { + const result = await Coinbase.apiClients.contractInvocation!.getContractInvocation( + this.getWalletId(), + this.getFromAddressId(), + this.getId(), + ); + this.model = result?.data; + } + + /** + * Returns a string representation of the ContractInvocation. + * + * @returns The string representation of the ContractInvocation. + */ + public toString(): string { + return ( + `ContractInvocation{contractInvocationId: '${this.getId()}', networkId: '${this.getNetworkId()}', ` + + `fromAddressId: '${this.getFromAddressId()}', contractAddressId: '${this.getContractAddressId()}', ` + + `method: '${this.getMethod()}', args: '${this.getArgs()}', transactionHash: '${this.getTransactionHash()}', ` + + `transactionLink: '${this.getTransactionLink()}', status: '${this.getStatus()}'}` + ); + } +} diff --git a/src/coinbase/crypto_amount.ts b/src/coinbase/crypto_amount.ts new file mode 100644 index 00000000..7ac1dd39 --- /dev/null +++ b/src/coinbase/crypto_amount.ts @@ -0,0 +1,99 @@ +import Decimal from "decimal.js"; +import { CryptoAmount as CryptoAmountModel } from "../client/api"; +import { Asset } from "./asset"; + +/** + * A representation of a CryptoAmount that includes the amount and asset. + */ +export class CryptoAmount { + private amount: Decimal; + private assetObj: Asset; + private assetId: string; + + /** + * Creates a new CryptoAmount instance. + * + * @param amount - The amount of the Asset + * @param asset - The Asset + * @param assetId - Optional Asset ID override + */ + constructor(amount: Decimal, asset: Asset, assetId?: string) { + this.amount = amount; + this.assetObj = asset; + this.assetId = assetId || asset.getAssetId(); + } + + /** + * Converts a CryptoAmount model to a CryptoAmount. + * + * @param amountModel - The crypto amount from the API + * @returns The converted CryptoAmount object + */ + public static fromModel(amountModel: CryptoAmountModel): CryptoAmount { + const asset = Asset.fromModel(amountModel.asset); + return new CryptoAmount(asset.fromAtomicAmount(new Decimal(amountModel.amount)), asset); + } + + /** + * Converts a CryptoAmount model and asset ID to a CryptoAmount. + * This can be used to specify a non-primary denomination that we want the amount + * to be converted to. + * + * @param amountModel - The crypto amount from the API + * @param assetId - The Asset ID of the denomination we want returned + * @returns The converted CryptoAmount object + */ + public static fromModelAndAssetId(amountModel: CryptoAmountModel, assetId: string): CryptoAmount { + const asset = Asset.fromModel(amountModel.asset, assetId); + return new CryptoAmount( + asset.fromAtomicAmount(new Decimal(amountModel.amount)), + asset, + assetId, + ); + } + + /** + * Gets the amount of the Asset. + * + * @returns The amount of the Asset + */ + public getAmount(): Decimal { + return this.amount; + } + + /** + * Gets the Asset. + * + * @returns The Asset + */ + public getAsset(): Asset { + return this.assetObj; + } + + /** + * Gets the Asset ID. + * + * @returns The Asset ID + */ + public getAssetId(): string { + return this.assetId; + } + + /** + * Converts the amount to atomic units. + * + * @returns The amount in atomic units + */ + public toAtomicAmount(): bigint { + return this.assetObj.toAtomicAmount(this.amount); + } + + /** + * Returns a string representation of the CryptoAmount. + * + * @returns A string representation of the CryptoAmount + */ + public toString(): string { + return `CryptoAmount{amount: '${this.amount}', assetId: '${this.assetId}'}`; + } +} diff --git a/src/coinbase/errors.ts b/src/coinbase/errors.ts index 46ea85b9..c50bb8c0 100644 --- a/src/coinbase/errors.ts +++ b/src/coinbase/errors.ts @@ -1,7 +1,7 @@ /** - * InvalidaAPIKeyFormat error is thrown when the API key format is invalid. + * InvalidAPIKeyFormatError error is thrown when the API key format is invalid. */ -export class InvalidAPIKeyFormat extends Error { +export class InvalidAPIKeyFormatError extends Error { static DEFAULT_MESSAGE = "Invalid API key format"; /** @@ -9,11 +9,29 @@ export class InvalidAPIKeyFormat extends Error { * * @param message - The error message. */ - constructor(message: string = InvalidAPIKeyFormat.DEFAULT_MESSAGE) { + constructor(message: string = InvalidAPIKeyFormatError.DEFAULT_MESSAGE) { super(message); - this.name = "InvalidAPIKeyFormat"; + this.name = "InvalidAPIKeyFormatError"; if (Error.captureStackTrace) { - Error.captureStackTrace(this, InvalidAPIKeyFormat); + Error.captureStackTrace(this, InvalidAPIKeyFormatError); + } + } +} + +/** + * TimeoutError is thrown when an operation times out. + */ +export class TimeoutError extends Error { + /** + * Initializes a new TimeoutError instance. + * + * @param message - The error message. + */ + constructor(message: string = "Timeout Error") { + super(message); + this.name = "TimeoutError"; + if (Error.captureStackTrace) { + Error.captureStackTrace(this, TimeoutError); } } } @@ -39,61 +57,103 @@ export class ArgumentError extends Error { } /** - * InternalError is thrown when there is an internal error in the SDK. + * InvalidConfigurationError error is thrown when apikey/privateKey configuration is invalid. */ -export class InternalError extends Error { - static DEFAULT_MESSAGE = "Internal Error"; +export class InvalidConfigurationError extends Error { + static DEFAULT_MESSAGE = "Invalid configuration"; /** - * Initializes a new InternalError instance. + * Initializes a new InvalidConfiguration instance. * * @param message - The error message. */ - constructor(message: string = InternalError.DEFAULT_MESSAGE) { + constructor(message: string = InvalidConfigurationError.DEFAULT_MESSAGE) { super(message); - this.name = "InternalError"; + this.name = "InvalidConfigurationError"; if (Error.captureStackTrace) { - Error.captureStackTrace(this, InternalError); + Error.captureStackTrace(this, InvalidConfigurationError); } } } /** - * InvalidConfiguration error is thrown when apikey/privateKey configuration is invalid. + * InvalidUnsignedPayload error is thrown when the unsigned payload is invalid. */ -export class InvalidConfiguration extends Error { - static DEFAULT_MESSAGE = "Invalid configuration"; +export class InvalidUnsignedPayloadError extends Error { + static DEFAULT_MESSAGE = "Invalid unsigned payload"; /** - * Initializes a new InvalidConfiguration instance. + * Initializes a new InvalidUnsignedPayload instance. * * @param message - The error message. */ - constructor(message: string = InvalidConfiguration.DEFAULT_MESSAGE) { + constructor(message: string = InvalidUnsignedPayloadError.DEFAULT_MESSAGE) { super(message); - this.name = "InvalidConfiguration"; + this.name = "InvalidUnsignedPayloadError"; if (Error.captureStackTrace) { - Error.captureStackTrace(this, InvalidConfiguration); + Error.captureStackTrace(this, InvalidUnsignedPayloadError); } } } /** - * InvalidUnsignedPayload error is thrown when the unsigned payload is invalid. + * NotSignedError is thrown when a resource is not signed. */ -export class InvalidUnsignedPayload extends Error { - static DEFAULT_MESSAGE = "Invalid unsigned payload"; +export class NotSignedError extends Error { + /** + * Initializes a new NotSignedError instance. + * + * @param message - The error message. + */ + constructor(message: string = "Resource not signed") { + super(message); + this.name = "NotSignedError"; + if (Error.captureStackTrace) { + Error.captureStackTrace(this, NotSignedError); + } + } +} + +/** + * AlreadySignedError is thrown when a resource is already signed. + */ +export class AlreadySignedError extends Error { + static DEFAULT_MESSAGE = "Resource already signed"; /** - * Initializes a new InvalidUnsignedPayload instance. + * Initializes a new AlreadySignedError instance. + * + * @param message - The error message. + */ + constructor(message: string = AlreadySignedError.DEFAULT_MESSAGE) { + super(message); + this.name = "AlreadySignedError"; + if (Error.captureStackTrace) { + Error.captureStackTrace(this, AlreadySignedError); + } + } +} + +/** + * UninitializedSDKError is thrown when the Coinbase instance is not initialized. + */ +export class UninitializedSDKError extends Error { + static DEFAULT_MESSAGE = + "Coinbase SDK has not been initialized. Please initialize by calling either:\n\n" + + "- Coinbase.configure({apiKeyName: '...', privateKey: '...'})\n" + + "- Coinbase.configureFromJson({filePath: '/path/to/api_keys.json'})\n\n" + + "If needed, register for API keys at https://portal.cdp.coinbase.com/ or view the docs at https://docs.cdp.coinbase.com/wallet-api/docs/welcome"; + + /** + * Initializes a new UninitializedSDKError instance. * * @param message - The error message. */ - constructor(message: string = InvalidUnsignedPayload.DEFAULT_MESSAGE) { + constructor(message: string = UninitializedSDKError.DEFAULT_MESSAGE) { super(message); - this.name = "InvalidUnsignedPayload"; + this.name = "UninitializedSDKError"; if (Error.captureStackTrace) { - Error.captureStackTrace(this, InvalidUnsignedPayload); + Error.captureStackTrace(this, UninitializedSDKError); } } } diff --git a/src/coinbase/faucet_transaction.ts b/src/coinbase/faucet_transaction.ts index 98a68c2e..740febc4 100644 --- a/src/coinbase/faucet_transaction.ts +++ b/src/coinbase/faucet_transaction.ts @@ -1,11 +1,16 @@ import { FaucetTransaction as FaucetTransactionModel } from "../client"; -import { InternalError } from "./errors"; +import { TransactionStatus } from "./types"; +import { Coinbase } from "./coinbase"; +import { Transaction } from "./transaction"; +import { delay } from "./utils"; +import { TimeoutError } from "./errors"; /** * Represents a transaction from a faucet. */ export class FaucetTransaction { private model: FaucetTransactionModel; + private _transaction: Transaction; /** * Creates a new FaucetTransaction instance. @@ -13,13 +18,24 @@ export class FaucetTransaction { * * @class * @param {FaucetTransactionModel} model - The FaucetTransaction model. - * @throws {InternalError} If the model does not exist. + * @throws {Error} If the model does not exist. */ constructor(model: FaucetTransactionModel) { - if (!model?.transaction_hash) { - throw new InternalError("FaucetTransaction model cannot be empty"); + if (!model?.transaction) { + throw new Error("FaucetTransaction model cannot be empty"); } + this.model = model; + this._transaction = new Transaction(this.model.transaction!); + } + + /** + * Returns the Transaction of the FaucetTransaction. + * + * @returns The Faucet Transaction + */ + public get transaction(): Transaction { + return this._transaction; } /** @@ -28,7 +44,7 @@ export class FaucetTransaction { * @returns {string} The transaction hash. */ public getTransactionHash(): string { - return this.model.transaction_hash; + return this.transaction.getTransactionHash()!; } /** @@ -37,7 +53,90 @@ export class FaucetTransaction { * @returns {string} The link to the transaction on the blockchain explorer */ public getTransactionLink(): string { - return this.model.transaction_link; + return this.transaction.getTransactionLink()!; + } + + /** + * Returns the Status of the FaucetTransaction. + * + * @returns The Status of the FaucetTransaction. + */ + public getStatus(): TransactionStatus { + return this.transaction.getStatus(); + } + + /** + * Returns the network ID of the FaucetTransaction. + * + * @returns {string} The network ID. + */ + public getNetworkId(): string { + return this.transaction.getNetworkId(); + } + + /** + * Returns the address that is being funded by the faucet. + * + * @returns {string} The address ID. + */ + public getAddressId(): string { + return this.transaction.toAddressId()!; + } + + /** + * Waits for the FaucetTransaction to be confirmed on the Network or fail on chain. + * Waits until the FaucetTransaction is completed or failed on-chain by polling at the given interval. + * Raises an error if the FaucetTransaction takes longer than the given timeout. + * + * @param options - The options to configure the wait function. + * @param options.intervalSeconds - The interval to check the status of the FaucetTransaction. + * @param options.timeoutSeconds - The maximum time to wait for the FaucetTransaction to be confirmed. + * + * @returns The FaucetTransaction object in a terminal state. + * @throws {Error} if the FaucetTransaction times out. + */ + public async wait({ + intervalSeconds = 0.2, + timeoutSeconds = 10, + } = {}): Promise { + const startTime = Date.now(); + + while (Date.now() - startTime < timeoutSeconds * 1000) { + await this.reload(); + + // If the FaucetTransaction is in a terminal state, return the FaucetTransaction. + if (this.transaction.isTerminalState()) { + return this; + } + + await delay(intervalSeconds); + } + + throw new TimeoutError("FaucetTransaction timed out"); + } + + /** + * Reloads the FaucetTransaction model with the latest data from the server. + * + * @returns {FaucetTransaction} The reloaded FaucetTransaction object. + * @throws {APIError} if the API request to get a FaucetTransaction fails. + */ + public async reload(): Promise { + const result = await Coinbase.apiClients.externalAddress!.getFaucetTransaction( + this.transaction.getNetworkId(), + this.getAddressId(), + this.getTransactionHash(), + ); + + this.model = result?.data; + + if (!this.model?.transaction) { + throw new Error("FaucetTransaction model cannot be empty"); + } + + this._transaction = new Transaction(this.model.transaction!); + + return this; } /** diff --git a/src/coinbase/fiat_amount.ts b/src/coinbase/fiat_amount.ts new file mode 100644 index 00000000..165c8612 --- /dev/null +++ b/src/coinbase/fiat_amount.ts @@ -0,0 +1,57 @@ +import { FiatAmount as FiatAmountModel } from "../client/api"; + +/** + * A representation of a FiatAmount that includes the amount and currency. + */ +export class FiatAmount { + private amount: string; + private currency: string; + + /** + * Initialize a new FiatAmount. Do not use this directly, use the fromModel method instead. + * + * @param amount - The amount in the fiat currency + * @param currency - The currency code (e.g. 'USD') + */ + constructor(amount: string, currency: string) { + this.amount = amount; + this.currency = currency; + } + + /** + * Convert a FiatAmount model to a FiatAmount. + * + * @param fiatAmountModel - The fiat amount from the API. + * @returns The converted FiatAmount object. + */ + public static fromModel(fiatAmountModel: FiatAmountModel): FiatAmount { + return new FiatAmount(fiatAmountModel.amount, fiatAmountModel.currency); + } + + /** + * Get the amount in the fiat currency. + * + * @returns The amount in the fiat currency. + */ + public getAmount(): string { + return this.amount; + } + + /** + * Get the currency code. + * + * @returns The currency code. + */ + public getCurrency(): string { + return this.currency; + } + + /** + * Get a string representation of the FiatAmount. + * + * @returns A string representation of the FiatAmount. + */ + public toString(): string { + return `FiatAmount(amount: '${this.amount}', currency: '${this.currency}')`; + } +} diff --git a/src/coinbase/fund_operation.ts b/src/coinbase/fund_operation.ts new file mode 100644 index 00000000..73edf3d9 --- /dev/null +++ b/src/coinbase/fund_operation.ts @@ -0,0 +1,268 @@ +import { Decimal } from "decimal.js"; +import { FundOperation as FundOperationModel } from "../client/api"; +import { Asset } from "./asset"; +import { Coinbase } from "./coinbase"; +import { delay } from "./utils"; +import { TimeoutError } from "./errors"; +import { FundQuote } from "./fund_quote"; +import { FundOperationStatus, PaginationOptions, PaginationResponse } from "./types"; +import { CryptoAmount } from "./crypto_amount"; + +/** + * A representation of a Fund Operation. + */ +export class FundOperation { + /** + * Fund Operation status constants. + */ + public static readonly Status = { + TERMINAL_STATES: new Set(["complete", "failed"]), + } as const; + + private model: FundOperationModel; + private asset: Asset | null = null; + + /** + * Creates a new FundOperation instance. + * + * @param model - The model representing the fund operation + */ + constructor(model: FundOperationModel) { + this.model = model; + } + + /** + * Converts a FundOperationModel into a FundOperation object. + * + * @param fundOperationModel - The FundOperation model object. + * @returns The FundOperation object. + */ + public static fromModel(fundOperationModel: FundOperationModel): FundOperation { + return new FundOperation(fundOperationModel); + } + + /** + * Create a new Fund Operation. + * + * @param walletId - The Wallet ID + * @param addressId - The Address ID + * @param amount - The amount of the Asset + * @param assetId - The Asset ID + * @param networkId - The Network ID + * @param quote - Optional Fund Quote + * @returns The new FundOperation object + */ + public static async create( + walletId: string, + addressId: string, + amount: Decimal, + assetId: string, + networkId: string, + quote?: FundQuote, + ): Promise { + const asset = await Asset.fetch(networkId, assetId); + + const createRequest = { + amount: asset.toAtomicAmount(amount).toString(), + asset_id: Asset.primaryDenomination(assetId), + }; + + if (quote) { + Object.assign(createRequest, { fund_quote_id: quote.getId() }); + } + + const response = await Coinbase.apiClients.fund!.createFundOperation( + walletId, + addressId, + createRequest, + ); + + return FundOperation.fromModel(response.data); + } + + /** + * List fund operations. + * + * @param walletId - The wallet ID + * @param addressId - The address ID + * @param options - The pagination options + * @param options.limit - The maximum number of Fund Operations to return. Limit can range between 1 and 100. + * @param options.page - The cursor for pagination across multiple pages of Fund Operations. Don't include this parameter on the first call. Use the next page value returned in a previous response to request subsequent results. + * @returns The paginated list response of fund operations + */ + public static async listFundOperations( + walletId: string, + addressId: string, + { limit = Coinbase.defaultPageLimit, page = undefined }: PaginationOptions = {}, + ): Promise> { + const data: FundOperation[] = []; + let nextPage: string | undefined; + + const response = await Coinbase.apiClients.fund!.listFundOperations( + walletId, + addressId, + limit, + page, + ); + + response.data.data.forEach(operationModel => { + data.push(FundOperation.fromModel(operationModel)); + }); + + const hasMore = response.data.has_more; + + if (hasMore) { + if (response.data.next_page) { + nextPage = response.data.next_page; + } + } + + return { + data, + hasMore, + nextPage, + }; + } + + /** + * Gets the Fund Operation ID. + * + * @returns {string} The unique identifier of the fund operation + */ + public getId(): string { + return this.model.fund_operation_id; + } + + /** + * Gets the Network ID. + * + * @returns {string} The network identifier + */ + public getNetworkId(): string { + return this.model.network_id; + } + + /** + * Gets the Wallet ID. + * + * @returns {string} The wallet identifier + */ + public getWalletId(): string { + return this.model.wallet_id; + } + + /** + * Gets the Address ID. + * + * @returns {string} The address identifier + */ + public getAddressId(): string { + return this.model.address_id; + } + + /** + * Gets the Asset. + * + * @returns {Asset} The asset associated with this operation + */ + public getAsset(): Asset { + if (!this.asset) { + this.asset = Asset.fromModel(this.model.crypto_amount.asset); + } + return this.asset; + } + + /** + * Gets the amount. + * + * @returns {CryptoAmount} The crypto amount + */ + public getAmount(): CryptoAmount { + return CryptoAmount.fromModel(this.model.crypto_amount); + } + + /** + * Gets the fiat amount. + * + * @returns {Decimal} The fiat amount in decimal format + */ + public getFiatAmount(): Decimal { + return new Decimal(this.model.fiat_amount.amount); + } + + /** + * Gets the fiat currency. + * + * @returns {string} The fiat currency code + */ + public getFiatCurrency(): string { + return this.model.fiat_amount.currency; + } + + /** + * Returns the Status of the Transfer. + * + * @returns The Status of the Transfer. + */ + public getStatus(): FundOperationStatus { + switch (this.model.status) { + case FundOperationStatus.PENDING: + return FundOperationStatus.PENDING; + case FundOperationStatus.COMPLETE: + return FundOperationStatus.COMPLETE; + case FundOperationStatus.FAILED: + return FundOperationStatus.FAILED; + default: + throw new Error(`Unknown fund operation status: ${this.model.status}`); + } + } + + /** + * Reloads the fund operation from the server. + * + * @returns {Promise} A promise that resolves to the updated fund operation + */ + public async reload(): Promise { + const response = await Coinbase.apiClients.fund!.getFundOperation( + this.getWalletId(), + this.getAddressId(), + this.getId(), + ); + this.model = response.data; + return this; + } + + /** + * Wait for the fund operation to complete. + * + * @param options - Options for waiting + * @param options.intervalSeconds - The interval between checks in seconds + * @param options.timeoutSeconds - The timeout in seconds + * @returns The completed fund operation + * @throws {TimeoutError} If the operation takes too long + */ + public async wait({ intervalSeconds = 0.2, timeoutSeconds = 20 } = {}): Promise { + const startTime = Date.now(); + + while (Date.now() - startTime < timeoutSeconds * 1000) { + await this.reload(); + + if (this.isTerminalState()) { + return this; + } + + await delay(intervalSeconds); + } + + throw new TimeoutError("Fund operation timed out"); + } + + /** + * Check if the operation is in a terminal state. + * + * @returns {boolean} True if the operation is in a terminal state, false otherwise + */ + private isTerminalState(): boolean { + return FundOperation.Status.TERMINAL_STATES.has(this.getStatus()); + } +} diff --git a/src/coinbase/fund_quote.ts b/src/coinbase/fund_quote.ts new file mode 100644 index 00000000..e82f8128 --- /dev/null +++ b/src/coinbase/fund_quote.ts @@ -0,0 +1,172 @@ +import { Decimal } from "decimal.js"; +import { FundQuote as FundQuoteModel } from "../client/api"; +import { Asset } from "./asset"; +import { CryptoAmount } from "./crypto_amount"; +import { Coinbase } from "./coinbase"; +import { FundOperation } from "./fund_operation"; + +/** + * A representation of a Fund Operation Quote. + */ +export class FundQuote { + private model: FundQuoteModel; + private asset: Asset | null = null; + + /** + * Creates a new FundQuote instance. + * + * @param model - The model representing the fund quote + */ + constructor(model: FundQuoteModel) { + this.model = model; + } + + /** + * Converts a FundQuoteModel into a FundQuote object. + * + * @param fundQuoteModel - The FundQuote model object. + * @returns The FundQuote object. + */ + public static fromModel(fundQuoteModel: FundQuoteModel): FundQuote { + return new FundQuote(fundQuoteModel); + } + + /** + * Create a new Fund Operation Quote. + * + * @param walletId - The Wallet ID + * @param addressId - The Address ID + * @param amount - The amount of the Asset + * @param assetId - The Asset ID + * @param networkId - The Network ID + * @returns The new FundQuote object + */ + public static async create( + walletId: string, + addressId: string, + amount: Decimal, + assetId: string, + networkId: string, + ): Promise { + const asset = await Asset.fetch(networkId, assetId); + + const response = await Coinbase.apiClients.fund!.createFundQuote(walletId, addressId, { + asset_id: Asset.primaryDenomination(assetId), + amount: asset.toAtomicAmount(amount).toString(), + }); + + return FundQuote.fromModel(response.data); + } + + /** + * Gets the Fund Quote ID. + * + * @returns {string} The unique identifier of the fund quote + */ + public getId(): string { + return this.model.fund_quote_id; + } + + /** + * Gets the Network ID. + * + * @returns {string} The network identifier + */ + public getNetworkId(): string { + return this.model.network_id; + } + + /** + * Gets the Wallet ID. + * + * @returns {string} The wallet identifier + */ + public getWalletId(): string { + return this.model.wallet_id; + } + + /** + * Gets the Address ID. + * + * @returns {string} The address identifier + */ + public getAddressId(): string { + return this.model.address_id; + } + + /** + * Gets the Asset. + * + * @returns {Asset} The asset associated with this quote + */ + public getAsset(): Asset { + if (!this.asset) { + this.asset = Asset.fromModel(this.model.crypto_amount.asset); + } + return this.asset; + } + + /** + * Gets the crypto amount. + * + * @returns {CryptoAmount} The cryptocurrency amount + */ + public getAmount(): CryptoAmount { + return CryptoAmount.fromModel(this.model.crypto_amount); + } + + /** + * Gets the fiat amount. + * + * @returns {Decimal} The fiat amount in decimal format + */ + public getFiatAmount(): Decimal { + return new Decimal(this.model.fiat_amount.amount); + } + + /** + * Gets the fiat currency. + * + * @returns {string} The fiat currency code + */ + public getFiatCurrency(): string { + return this.model.fiat_amount.currency; + } + + /** + * Gets the buy fee. + * + * @returns {{ amount: string; currency: string }} The buy fee amount and currency + */ + public getBuyFee(): { amount: string; currency: string } { + return { + amount: this.model.fees.buy_fee.amount, + currency: this.model.fees.buy_fee.currency, + }; + } + + /** + * Gets the transfer fee. + * + * @returns {CryptoAmount} The transfer fee as a crypto amount + */ + public getTransferFee(): CryptoAmount { + return CryptoAmount.fromModel(this.model.fees.transfer_fee); + } + + /** + * Execute the fund quote to create a fund operation. + * + * @returns {Promise} A promise that resolves to the created fund operation + */ + public async execute(): Promise { + return FundOperation.create( + this.getWalletId(), + this.getAddressId(), + this.getAmount().getAmount(), + this.getAsset().getAssetId(), + this.getNetworkId(), + this, + ); + } +} diff --git a/src/coinbase/hash.ts b/src/coinbase/hash.ts new file mode 100644 index 00000000..f11afdbe --- /dev/null +++ b/src/coinbase/hash.ts @@ -0,0 +1,32 @@ +import { ethers } from "ethers"; +import { TypedDataDomain, TypedDataField } from "./types"; + +/** + * Computes the EIP-191 personal-sign message digest to sign. + * + * @returns The EIP-191 hash of the message as a string. + * @throws {Error} if the message cannot be hashed. + * @param message - The message to hash. + */ +export const hashMessage = (message: Uint8Array | string): string => { + return ethers.hashMessage(message); +}; + +/** + * Computes the hash of the EIP-712 compliant typed data message. + * + * @param domain - The domain parameters for the EIP-712 message, including the name, version, chainId, and verifying contract. + * @param types - The types definitions for the EIP-712 message, represented as a record of type names to their fields. + * @param value - The actual data object to hash, conforming to the types defined. + * + * @returns The EIP-712 hash of the typed data as a hex-encoded string. + * @throws {Error} if the typed data cannot be hashed. + */ +export const hashTypedDataMessage = ( + domain: TypedDataDomain, + types: Record>, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + value: Record, +): string => { + return ethers.TypedDataEncoder.hash(domain, types, value); +}; diff --git a/src/coinbase/historical_balance.ts b/src/coinbase/historical_balance.ts new file mode 100644 index 00000000..13c4b25f --- /dev/null +++ b/src/coinbase/historical_balance.ts @@ -0,0 +1,44 @@ +import Decimal from "decimal.js"; +import { HistoricalBalance as HistoricalBalanceModel } from "../client"; +import { Asset } from "./asset"; + +/** A representation of historical balance. */ +export class HistoricalBalance { + public readonly amount: Decimal; + public readonly blockHash: string; + public readonly blockHeight: Decimal; + public readonly asset: Asset; + + /** + * Private constructor to prevent direct instantiation outside of the factory methods. + * + * @ignore + * @param {Decimal} amount - The amount of the balance. + * @param {Decimal} blockHeight - The block height at which the balance was recorded. + * @param {string} blockHash - The block hash at which the balance was recorded + * @param {string} asset - The asset we want to fetch. + * @hideconstructor + */ + private constructor(amount: Decimal, blockHeight: Decimal, blockHash: string, asset: Asset) { + this.amount = amount; + this.blockHeight = blockHeight; + this.blockHash = blockHash; + this.asset = asset; + } + + /** + * Converts a HistoricalBalanceModel into a HistoricalBalance object. + * + * @param {HistoricalBalanceModel} model - The historical balance model object. + * @returns {HistoricalBalance} The HistoricalBalance object. + */ + public static fromModel(model: HistoricalBalanceModel): HistoricalBalance { + const asset = Asset.fromModel(model.asset); + return new HistoricalBalance( + asset.fromAtomicAmount(new Decimal(model.amount)), + new Decimal(model.block_height), + model.block_hash, + asset, + ); + } +} diff --git a/src/coinbase/payload_signature.ts b/src/coinbase/payload_signature.ts new file mode 100644 index 00000000..9556d045 --- /dev/null +++ b/src/coinbase/payload_signature.ts @@ -0,0 +1,154 @@ +import { PayloadSignature as PayloadSignatureModel } from "../client"; +import { PayloadSignatureStatus } from "./types"; +import { delay } from "./utils"; +import { TimeoutError } from "./errors"; +import { Coinbase } from "./coinbase"; + +/** + * A representation of a Payload Signature. + */ +export class PayloadSignature { + private model: PayloadSignatureModel; + + /** + * Constructs a Payload Signature. + * + * @class + * @param model - The underlying Payload Signature object. + */ + constructor(model: PayloadSignatureModel) { + if (!model) { + throw new Error("Invalid model type"); + } + this.model = model; + } + + /** + * Returns the ID of the Payload Signature. + * + * @returns The ID of the Payload Signature + */ + getId(): string { + return this.model.payload_signature_id; + } + + /** + * Returns the Wallet ID of the Payload Signature. + * + * @returns The Wallet ID + */ + getWalletId(): string { + return this.model.wallet_id; + } + + /** + * Returns the Address ID of the Payload Signature. + * + * @returns The Address ID + */ + getAddressId(): string { + return this.model.address_id; + } + + /** + * Returns the Unsigned Payload of the Payload Signature. + * + * @returns The Unsigned Payload + */ + getUnsignedPayload(): string { + return this.model.unsigned_payload; + } + + /** + * Returns the Signature of the Payload Signature. + * + * @returns The Signature + */ + getSignature(): string | undefined { + return this.model.signature; + } + + /** + * Returns the Status of the Payload Signature. + * + * @returns The Status + */ + getStatus(): PayloadSignatureStatus | undefined { + switch (this.model.status) { + case PayloadSignatureStatus.PENDING: + return PayloadSignatureStatus.PENDING; + case PayloadSignatureStatus.SIGNED: + return PayloadSignatureStatus.SIGNED; + case PayloadSignatureStatus.FAILED: + return PayloadSignatureStatus.FAILED; + default: + return undefined; + } + } + + /** + * Returns whether the Payload Signature is in a terminal State. + * + * @returns Whether the Payload Signature is in a terminal State + */ + isTerminalState(): boolean { + const status = this.getStatus(); + + if (!status) return false; + + return [PayloadSignatureStatus.SIGNED, PayloadSignatureStatus.FAILED].includes(status); + } + + /** + * Waits for the Payload Signature to be signed or for the signature operation to fail. + * + * @param options - The options to configure the wait function. + * @param options.intervalSeconds - The interval to check the status of the Payload Signature. + * @param options.timeoutSeconds - The maximum time to wait for the Payload Signature to be confirmed. + * + * @returns The Payload Signature object in a terminal state. + * @throws {Error} if the Payload Signature times out. + */ + public async wait({ + intervalSeconds = 0.2, + timeoutSeconds = 10, + } = {}): Promise { + const startTime = Date.now(); + + while (Date.now() - startTime < timeoutSeconds * 1000) { + await this.reload(); + + // If the Payload Signature is in a terminal state, return the Payload Signature. + if (this.isTerminalState()) { + return this; + } + + await delay(intervalSeconds); + } + + throw new TimeoutError("Payload Signature timed out"); + } + + /** + * Reloads the Payload Signature model with the latest data from the server. + * + * @throws {APIError} if the API request to get a Payload Signature fails. + */ + public async reload(): Promise { + const result = await Coinbase.apiClients.address!.getPayloadSignature( + this.getWalletId(), + this.getAddressId(), + this.getId(), + ); + this.model = result?.data; + } + + /** + * Returns a string representation of the Payload Signature. + * + * @returns A string representation of the Payload Signature. + */ + toString(): string { + return `PayloadSignature { status: '${this.getStatus()}', unsignedPayload: '${this.getUnsignedPayload()}', signature: ${this.getSignature()} }`; + } +} diff --git a/src/coinbase/read_contract.ts b/src/coinbase/read_contract.ts new file mode 100644 index 00000000..6e5691cb --- /dev/null +++ b/src/coinbase/read_contract.ts @@ -0,0 +1,153 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import type { Abi } from "abitype"; +import { Coinbase } from "./coinbase"; +import { ContractFunctionName } from "viem"; +import { SolidityValue } from "../client"; +import { ContractFunctionReturnType } from "./types/contract"; + +/** + * Converts a SolidityValue to its corresponding JavaScript type. + * + * @param {SolidityValue} solidityValue - The Solidity value to convert. + * @returns {unknown} The converted JavaScript value. + */ +function convertSolidityValue(solidityValue: SolidityValue): unknown { + const { type, value, values } = solidityValue; + + switch (type) { + case "uint8": + case "uint16": + case "uint32": + case "int8": + case "int16": + case "int32": + return Number(value); + case "uint64": + case "uint128": + case "uint256": + case "int64": + case "int128": + case "int256": + return BigInt(value!); + case "address": + return value as `0x${string}`; + case "bool": + return value === "true"; + case "string": + return value; + case "bytes": + case "bytes1": + case "bytes2": + case "bytes3": + case "bytes4": + case "bytes5": + case "bytes6": + case "bytes7": + case "bytes8": + case "bytes9": + case "bytes10": + case "bytes11": + case "bytes12": + case "bytes13": + case "bytes14": + case "bytes15": + case "bytes16": + case "bytes17": + case "bytes18": + case "bytes19": + case "bytes20": + case "bytes21": + case "bytes22": + case "bytes23": + case "bytes24": + case "bytes25": + case "bytes26": + case "bytes27": + case "bytes28": + case "bytes29": + case "bytes30": + case "bytes31": + case "bytes32": + return value as `0x${string}`; + case "array": + return values!.map(convertSolidityValue); + case "tuple": + return values!.reduce( + (acc, val) => { + if (!val.name) { + throw new Error("Tuple field missing name"); + } + acc[val.name] = convertSolidityValue(val); + return acc; + }, + {} as Record, + ); + default: + throw new Error(`Unsupported Solidity type: ${type}`); + } +} + +/** + * Parses a SolidityValue to a specific type T. + * + * @template T + * @param {SolidityValue} solidityValue - The Solidity value to parse. + * @returns {T} The parsed value of type T. + */ +function parseSolidityValue(solidityValue: SolidityValue): T { + return convertSolidityValue(solidityValue) as T; +} + +/** + * Reads data from a smart contract using the Coinbase API. + * + * @template TAbi - The ABI type. + * @template TFunctionName - The contract function name type. + * @template TArgs - The function arguments type. + * @param {object} params - The parameters for reading the contract. + * @param {string} params.networkId - The network ID. + * @param {string} params.contractAddress - The contract address (as a hexadecimal string). + * @param {TFunctionName} params.method - The contract method to call. + * @param {TArgs} params.args - The arguments for the contract method. + * @param {TAbi} [params.abi] - The contract ABI (optional). + * @returns {Promise} The result of the contract call. + */ +export async function readContract< + TAbi extends Abi | undefined, + TFunctionName extends TAbi extends Abi ? ContractFunctionName : string, + TArgs extends Record, +>(params: { + networkId: string; + contractAddress: `0x${string}`; + method: TFunctionName; + args: TArgs; + abi?: TAbi; +}): Promise< + TAbi extends Abi + ? ContractFunctionReturnType< + TAbi, + Extract>, + TArgs + > + : any +> { + const response = await Coinbase.apiClients.smartContract!.readContract( + params.networkId, + params.contractAddress, + { + method: params.method, + args: JSON.stringify(params.args || {}), + abi: params.abi ? JSON.stringify(params.abi) : undefined, + }, + ); + + return parseSolidityValue< + TAbi extends Abi + ? ContractFunctionReturnType< + TAbi, + Extract>, + TArgs + > + : any + >(response.data); +} diff --git a/src/coinbase/smart_contract.ts b/src/coinbase/smart_contract.ts new file mode 100644 index 00000000..f7022aa5 --- /dev/null +++ b/src/coinbase/smart_contract.ts @@ -0,0 +1,471 @@ +import { ethers } from "ethers"; +import { + DeploySmartContractRequest, + SmartContract as SmartContractModel, + SmartContractType as SmartContractTypeModel, + SmartContractOptions as SmartContractOptionsModel, + TokenContractOptions as TokenContractOptionsModel, + NFTContractOptions as NFTContractOptionsModel, + MultiTokenContractOptions as MultiTokenContractOptionsModel, +} from "../client/api"; +import { Transaction } from "./transaction"; +import { + SmartContractOptions, + SmartContractType, + NFTContractOptions, + TokenContractOptions, + MultiTokenContractOptions, + RegisterContractOptions, + TransactionStatus, + PaginationOptions, + PaginationResponse, + UpdateContractOptions, +} from "./types"; +import { Coinbase } from "./coinbase"; +import { delay } from "./utils"; +import { TimeoutError } from "./errors"; +import { ContractEvent } from "./contract_event"; + +/** + * A representation of a SmartContract on the blockchain. + */ +export class SmartContract { + private model: SmartContractModel; + + /** + * Creates a new SmartContract instance. + * + * @param contractModel - The SmartContract model from the API. + */ + constructor(contractModel: SmartContractModel) { + if (!contractModel) { + throw new Error("SmartContract model cannot be empty"); + } + this.model = contractModel; + } + + /** + * Returns whether the SmartContract is external. + * + * @returns True if the SmartContract is external, false otherwise. + */ + public get isExternal(): boolean { + return this.model.is_external; + } + + /** + * Returns a list of ContractEvents for the provided network, contract, and event details. + * + * @param networkId - The network ID. + * @param protocolName - The protocol name. + * @param contractAddress - The contract address. + * @param contractName - The contract name. + * @param eventName - The event name. + * @param fromBlockHeight - The start block height. + * @param toBlockHeight - The end block height. + * @returns The contract events. + */ + public static async listEvents( + networkId: string, + protocolName: string, + contractAddress: string, + contractName: string, + eventName: string, + fromBlockHeight: number, + toBlockHeight: number, + ): Promise { + const contractEvents: ContractEvent[] = []; + const queue: string[] = [""]; + + while (queue.length > 0) { + const page = queue.shift(); + + const response = await Coinbase.apiClients.contractEvent!.listContractEvents( + networkId, + protocolName, + contractAddress, + contractName, + eventName, + fromBlockHeight, + toBlockHeight, + page?.length ? page : undefined, + ); + + response.data.data.forEach(contractEvent => { + contractEvents.push(new ContractEvent(contractEvent)); + }); + + if (response.data.has_more) { + if (response.data.next_page) { + queue.push(response.data.next_page); + } + } + } + + return contractEvents; + } + + /** + * Register a smart contract. + * + * @param options - The options to register a smart contract. + * @param options.networkId - The network ID. + * @param options.contractAddress - The contract address. + * @param options.abi - The ABI of the contract. + * @param options.contractName - The contract name. + * @returns The smart contract. + */ + public static async register({ + networkId, + contractAddress, + abi, + contractName, + }: RegisterContractOptions): Promise { + const response = await Coinbase.apiClients.smartContract!.registerSmartContract( + networkId, + contractAddress, + { + abi: JSON.stringify(abi), + contract_name: contractName, + }, + ); + return SmartContract.fromModel(response.data); + } + + /** + * Lists Smart Contracts. + * + * @param options - The pagination options. + * @param options.page - The cursor for pagination across multiple pages of Smart Contract. Don\'t include this parameter on the first call. Use the next page value returned in a previous response to request subsequent results. + * + * @returns The paginated list response of Smart Contracts. + */ + public static async list({ page = undefined }: PaginationOptions = {}): Promise< + PaginationResponse + > { + const data: SmartContract[] = []; + let nextPage: string | undefined; + + const response = await Coinbase.apiClients.smartContract!.listSmartContracts(page); + const smartContracts = response.data.data; + for (const sc of smartContracts) { + data.push(new SmartContract(sc)); + } + + const hasMore: boolean = response.data.has_more ? response.data.has_more : false; + + if (hasMore) { + if (response.data.next_page) { + nextPage = response.data.next_page; + } + } + + return { + data, + hasMore, + nextPage, + }; + } + + /** + * Converts a SmartContractModel into a SmartContract object. + * + * @param contractModel - The SmartContract model object. + * @returns The SmartContract object. + */ + public static fromModel(contractModel: SmartContractModel): SmartContract { + return new SmartContract(contractModel); + } + + /** + * Returns the ID of the SmartContract. + * + * @returns The SmartContract ID. + */ + public getId(): string { + return this.model.smart_contract_id; + } + + /** + * Returns the Network ID of the SmartContract. + * + * @returns The Network ID. + */ + public getNetworkId(): string { + return this.model.network_id; + } + + /** + * Returns the Wallet ID that deployed the smart contract. + * + * @returns The Wallet ID. + */ + public getWalletId(): string | undefined { + if (!this.model.wallet_id) return undefined; + + return this.model.wallet_id!; + } + + /** + * Returns the name of the smart contract. + * + * @returns The contract name. + */ + public getContractName(): string { + return this.model.contract_name; + } + + /** + * Returns the Contract Address of the smart contract. + * + * @returns The Contract Address. + */ + public getContractAddress(): string { + return this.model.contract_address; + } + + /** + * Returns the Deployer Address of the smart contract. + * + * @returns The Deployer Address. + */ + public getDeployerAddress(): string | undefined { + if (!this.model.deployer_address) return undefined; + + return this.model.deployer_address!; + } + + /** + * Returns the Type of the smart contract. + * + * @returns The Smart Contract Type. + */ + public getType(): SmartContractType { + switch (this.model.type) { + case SmartContractTypeModel.Erc20: + return SmartContractType.ERC20; + case SmartContractTypeModel.Erc721: + return SmartContractType.ERC721; + case SmartContractTypeModel.Erc1155: + return SmartContractType.ERC1155; + case SmartContractTypeModel.Custom: + return SmartContractType.CUSTOM; + default: + throw new Error(`Unknown smart contract type: ${this.model.type}`); + } + } + + /** + * Returns the Options of the smart contract. + * + * @returns The Smart Contract Options. + */ + public getOptions(): SmartContractOptions { + if (this.isExternal) + throw new Error("SmartContract options cannot be returned for external SmartContract"); + + const options = this.model.options!; + + if (this.isERC20(this.getType(), options)) { + return { + name: options.name, + symbol: options.symbol, + totalSupply: options.total_supply, + } as TokenContractOptions; + } else if (this.isERC721(this.getType(), options)) { + return { + name: options.name, + symbol: options.symbol, + baseURI: options.base_uri, + } as NFTContractOptions; + } else if (this.isERC1155(this.getType(), options)) { + return { + uri: options.uri, + } as MultiTokenContractOptions; + } else { + return options as string; + } + } + + /** + * Returns the ABI of the smart contract. + * + * @returns The ABI as a JSON-encoded string. + */ + public getAbi(): object { + return JSON.parse(this.model.abi); + } + + /** + * Returns the Transaction of the smart contract deployment. + * + * @returns The Transaction. + */ + public getTransaction(): Transaction | undefined { + if (this.isExternal) return undefined; + + return new Transaction(this.model.transaction!); + } + + /** + * Signs the SmartContract deployment with the provided key and returns the hex signature + * required for broadcasting the SmartContract deployment. + * + * @param key - The key to sign the SmartContract deployment with + * @returns The hex-encoded signed payload + */ + async sign(key: ethers.Wallet): Promise { + if (this.isExternal) throw new Error("Cannot sign an external SmartContract"); + + return this.getTransaction()!.sign(key); + } + + /** + * Update a smart contract. + * + * @param options - The options to update a smart contract. + * @param options.abi - The new ABI of the contract. + * @param options.contractName - The new contract name. + * @returns The smart contract. + */ + public async update({ abi, contractName }: UpdateContractOptions): Promise { + const response = await Coinbase.apiClients.smartContract!.updateSmartContract( + this.getNetworkId(), + this.getContractAddress(), + { + abi: JSON.stringify(abi), + contract_name: contractName, + }, + ); + return SmartContract.fromModel(response.data); + } + + /** + * Broadcasts the SmartContract deployment to the Network. + * + * @returns The SmartContract object + * @throws {APIError} if the API request to broadcast a SmartContract deployment fails. + */ + public async broadcast(): Promise { + if (this.isExternal) throw new Error("Cannot broadcast an external SmartContract"); + + if (!this.getTransaction()!.isSigned()) + throw new Error("Cannot broadcast unsigned SmartContract deployment"); + + const deploySmartContractRequest: DeploySmartContractRequest = { + signed_payload: this.getTransaction()!.getSignature()!, + }; + + const response = await Coinbase.apiClients.smartContract!.deploySmartContract( + this.getWalletId()!, + this.getDeployerAddress()!, + this.getId(), + deploySmartContractRequest, + ); + + return SmartContract.fromModel(response.data); + } + + /** + * Waits for the SmartContract deployment to be confirmed on the Network or fail on chain. + * Waits until the SmartContract deployment is completed or failed on-chain by polling at the given interval. + * Raises an error if the SmartContract deployment takes longer than the given timeout. + * + * @param options - The options to configure the wait function. + * @param options.intervalSeconds - The interval to check the status of the SmartContract deployment. + * @param options.timeoutSeconds - The maximum time to wait for the SmartContract deployment to be confirmed. + * + * @returns The SmartContract object in a terminal state. + * @throws {Error} if the SmartContract deployment times out. + */ + public async wait({ intervalSeconds = 0.2, timeoutSeconds = 10 } = {}): Promise { + if (this.isExternal) throw new Error("Cannot wait for an external SmartContract"); + + const startTime = Date.now(); + + while (Date.now() - startTime < timeoutSeconds * 1000) { + await this.reload(); + + // If the SmartContract deployment is in a terminal state, return the SmartContract. + const status = this.getTransaction()!.getStatus(); + if (status === TransactionStatus.COMPLETE || status === TransactionStatus.FAILED) { + return this; + } + + await delay(intervalSeconds); + } + + throw new TimeoutError("SmartContract deployment timed out"); + } + + /** + * Reloads the SmartContract model with the latest data from the server. + * + * @throws {APIError} if the API request to get a SmartContract fails. + */ + public async reload(): Promise { + if (this.isExternal) throw new Error("Cannot reload an external SmartContract"); + + const result = await Coinbase.apiClients.smartContract!.getSmartContract( + this.getWalletId()!, + this.getDeployerAddress()!, + this.getId(), + ); + this.model = result?.data; + } + + /** + * Returns a string representation of the SmartContract. + * + * @returns The string representation of the SmartContract. + */ + public toString(): string { + return ( + `SmartContract{id: '${this.getId()}', networkId: '${this.getNetworkId()}', ` + + `contractAddress: '${this.getContractAddress()}', deployerAddress: '${this.getDeployerAddress()}', ` + + `type: '${this.getType()}'}` + ); + } + + /** + * Type guard for checking if the smart contract is an ERC20. + * + * @param type - The type of the smart contract. + * @param options - The options of the smart contract. + * @returns True if the smart contract is an ERC20, false otherwise. + */ + private isERC20( + type: SmartContractType, + options: SmartContractOptionsModel, + ): options is TokenContractOptionsModel { + return type === SmartContractType.ERC20; + } + + /** + * Type guard for checking if the smart contract is an ERC721. + * + * @param type - The type of the smart contract. + * @param options - The options of the smart contract. + * @returns True if the smart contract is an ERC721, false otherwise. + */ + private isERC721( + type: SmartContractType, + options: SmartContractOptionsModel, + ): options is NFTContractOptionsModel { + return type === SmartContractType.ERC721; + } + + /** + * Type guard for checking if the smart contract is an ERC1155. + * + * @param type - The type of the smart contract. + * @param options - The options of the smart contract. + * @returns True if the smart contract is an ERC1155, false otherwise. + */ + private isERC1155( + type: SmartContractType, + options: SmartContractOptionsModel, + ): options is MultiTokenContractOptionsModel { + return type === SmartContractType.ERC1155; + } +} diff --git a/src/coinbase/sponsored_send.ts b/src/coinbase/sponsored_send.ts new file mode 100644 index 00000000..8b1c2b9a --- /dev/null +++ b/src/coinbase/sponsored_send.ts @@ -0,0 +1,126 @@ +import { ethers } from "ethers"; +import { SponsoredSend as SponsoredSendModel } from "../client/api"; +import { SponsoredSendStatus } from "./types"; + +/** + * A representation of an onchain Sponsored Send. + */ +export class SponsoredSend { + private model: SponsoredSendModel; + + /** + * Sponsored Sends should be constructed via higher level abstractions like Transfer. + * + * @class + * @param model - The underlying Sponsored Send object. + */ + constructor(model: SponsoredSendModel) { + if (!model) { + throw new Error("Invalid model type"); + } + this.model = model; + } + + /** + * Returns the Keccak256 hash of the typed data. This payload must be signed + * by the sender to be used as an approval in the EIP-3009 transaction. + * + * @returns The Keccak256 hash of the typed data. + */ + getTypedDataHash(): string { + return this.model.typed_data_hash; + } + + /** + * Returns the signature of the typed data. + * + * @returns The hash of the typed data signature. + */ + getSignature(): string | undefined { + return this.model.signature; + } + + /** + * Signs the Sponsored Send with the provided key and returns the hex signature. + * + * @param key - The key to sign the Sponsored Send with + * @returns The hex-encoded signature + */ + async sign(key: ethers.Wallet) { + ethers.toBeArray; + const signature = key.signingKey.sign(ethers.getBytes(this.getTypedDataHash())).serialized; + this.model.signature = signature; + return signature; + } + + /** + * Returns whether the Sponsored Send has been signed. + * + * @returns if the Sponsored Send has been signed. + */ + isSigned(): boolean { + return !!this.getSignature(); + } + + /** + * Returns the Status of the Sponsored Send. + * + * @returns the Status of the Sponsored Send + */ + getStatus(): SponsoredSendStatus | undefined { + switch (this.model.status) { + case SponsoredSendStatus.PENDING: + return SponsoredSendStatus.PENDING; + case SponsoredSendStatus.SIGNED: + return SponsoredSendStatus.SIGNED; + case SponsoredSendStatus.SUBMITTED: + return SponsoredSendStatus.SUBMITTED; + case SponsoredSendStatus.COMPLETE: + return SponsoredSendStatus.COMPLETE; + case SponsoredSendStatus.FAILED: + return SponsoredSendStatus.FAILED; + default: + undefined; + } + } + + /** + * Returns whether the Sponsored Send is in a terminal State. + * + * @returns Whether the Sponsored Send is in a terminal State + */ + isTerminalState(): boolean { + const status = this.getStatus(); + + if (!status) return false; + + return [SponsoredSendStatus.COMPLETE, SponsoredSendStatus.FAILED].includes(status); + } + + /** + * Returns the Transaction Hash of the Sponsored Send. + * + * @returns The Transaction Hash + */ + getTransactionHash(): string | undefined { + return this.model.transaction_hash; + } + + /** + * Returns the link to the Sponsored Send on the blockchain explorer. + * + * @returns The link to the Sponsored Send on the blockchain explorer + */ + getTransactionLink(): string | undefined { + return this.model.transaction_link; + } + + /** + * Returns a string representation of the Sponsored Send. + * + * @returns A string representation of the Sponsored Send + */ + toString(): string { + return `SponsoredSend { transactionHash: '${this.getTransactionHash()}', status: '${this.getStatus()}', typedDataHash: '${this.getTypedDataHash()}', signature: ${this.getSignature()}, transactionLink: ${this.getTransactionLink()} }`; + } +} diff --git a/src/coinbase/staking_balance.ts b/src/coinbase/staking_balance.ts new file mode 100644 index 00000000..e56367be --- /dev/null +++ b/src/coinbase/staking_balance.ts @@ -0,0 +1,120 @@ +import { StakingBalance as StakingBalanceModel } from "../client"; +import { Balance } from "./balance"; +import { Coinbase } from "./coinbase"; + +/** + * A representation of the staking balance for a given asset on a specific date. + */ +export class StakingBalance { + private model: StakingBalanceModel; + + /** + * Creates the StakingBalance object. + * + * @param model - The underlying staking balance object. + */ + constructor(model: StakingBalanceModel) { + this.model = model; + } + + /** + * Returns a list of StakingBalances for the provided network, asset, and address. + * + * @param networkId - The network ID. + * @param assetId - The asset ID. + * @param addressId - The address ID. + * @param startTime - The start time. + * @param endTime - The end time. + * @returns The staking balances. + */ + public static async list( + networkId: string, + assetId: string, + addressId: string, + startTime: string, + endTime: string, + ): Promise { + const stakingBalances: StakingBalance[] = []; + const queue: string[] = [""]; + + while (queue.length > 0) { + const page = queue.shift(); + + const response = await Coinbase.apiClients.stake!.fetchHistoricalStakingBalances( + networkId, + assetId, + addressId, + startTime, + endTime, + 100, + page?.length ? page : undefined, + ); + + response.data.data.forEach(stakingBalance => { + stakingBalances.push(new StakingBalance(stakingBalance)); + }); + + if (response.data.has_more) { + if (response.data.next_page) { + queue.push(response.data.next_page); + } + } + } + + return stakingBalances; + } + + /** + * Returns the bonded stake amount of the StakingBalance. + * + * @returns The Balance. + */ + public bondedStake(): Balance { + return Balance.fromModel(this.model.bonded_stake); + } + + /** + * Returns the unbonded stake amount of the StakingBalance. + * + * @returns The Balance. + */ + public unbondedBalance(): Balance { + return Balance.fromModel(this.model.unbonded_balance); + } + + /** + * Returns the participant type of the address. + * + * @returns The participant type. + */ + public participantType(): string { + return this.model.participant_type; + } + + /** + * Returns the date of the StakingBalance. + * + * @returns The date. + */ + public date(): Date { + return new Date(this.model.date); + } + + /** + * Returns the onchain address of the StakingBalance. + * + * @returns The onchain address. + */ + public address(): string { + return this.model.address; + } + + /** + * Print the Staking Balance as a string. + * + * @returns The string representation of the Staking Balance. + */ + public toString(): string { + return `StakingBalance { date: '${this.date().toISOString()}' address: '${this.address()}' bondedStake: '${this.bondedStake().amount} ${this.bondedStake().asset?.assetId?.toUpperCase()}' unbondedBalance: '${this.unbondedBalance().amount} ${this.unbondedBalance().asset?.assetId?.toUpperCase()}' participantType: '${this.participantType()}' }`; + } +} diff --git a/src/coinbase/staking_operation.ts b/src/coinbase/staking_operation.ts index e0b75e6c..fefac629 100644 --- a/src/coinbase/staking_operation.ts +++ b/src/coinbase/staking_operation.ts @@ -1,14 +1,61 @@ import { ethers } from "ethers"; -import { StakingOperation as StakingOperationModel } from "../client/api"; +import { + StakingOperation as StakingOperationModel, + StakingOperationStatusEnum, +} from "../client/api"; import { Transaction } from "./transaction"; +import { Coinbase } from "./coinbase"; +import { delay } from "./utils"; +import { Amount, StakeOptionsMode } from "./types"; +import { Asset } from "./asset"; +import Decimal from "decimal.js"; + +export const UnstakeTypeExecution = "execution"; +export const UnstakeTypeConsensus = "consensus"; + +/** + * Checks if the given options contains the unstake type option. + * + * @param options - An object containing various options. + * @returns True if the unstake type is consensus or execution, false otherwise. + */ +export function HasUnstakeTypeOption(options: { [key: string]: string }): boolean { + return ( + options["unstake_type"] === UnstakeTypeConsensus || + options["unstake_type"] === UnstakeTypeExecution + ); +} + +/** + * Determines if the given parameters represent a native ETH unstake operation (version 2). + * + * @param assetId - The ID of the asset. + * @param action - The action being performed. + * @param mode - The mode of the stake options. + * @param options - An object containing various options. + * @returns True if the parameters represent a native ETH unstake operation (version 2), false otherwise. + */ +export function IsDedicatedEthUnstakeV2Operation( + assetId: string, + action: string, + mode: string, + options: { [key: string]: string }, +): boolean { + return ( + assetId === Coinbase.assets.Eth && + action == "unstake" && + mode === StakeOptionsMode.NATIVE && + HasUnstakeTypeOption(options) + ); +} /** - * A representation of a staking operation (stake, unstake, claim rewards, etc). It + * A representation of a staking operation (stake, unstake, claim stake, etc.). It * may have multiple steps with some being transactions to sign, and others to wait. */ export class StakingOperation { private model: StakingOperationModel; - private transactions: Transaction[]; + private readonly transactions: Transaction[]; /** * Creates a StakingOperation object. @@ -20,11 +67,129 @@ export class StakingOperation { if (!model) { throw new Error("Invalid model type"); } + this.model = model; this.transactions = []; - model.transactions.forEach(transaction => { - this.transactions.push(new Transaction(transaction)); - }); + this.loadTransactionsFromModel(); + } + + /** + * Get the staking operation for the given ID. + * + * @param networkId - The network ID. + * @param addressId - The address ID. + * @param id - The staking operation ID. + * @param walletId - The wallet ID of the staking operation. + * @throws {Error} If the wallet id is defined but empty. + * + * @returns The staking operation object. + */ + public static async fetch( + networkId: string, + addressId: string, + id: string, + walletId?: string, + ): Promise { + if (walletId === undefined) { + const result = await Coinbase.apiClients.stake!.getExternalStakingOperation( + networkId, + addressId, + id, + ); + + return new StakingOperation(result.data); + } else if (walletId != undefined && walletId != "") { + const result = await Coinbase.apiClients.walletStake!.getStakingOperation( + walletId!, + addressId, + id, + ); + + return new StakingOperation(result.data); + } else { + throw new Error("Invalid wallet ID"); + } + } + + /** + * Returns the Staking Operation ID. + * + * @returns The Staking Operation ID. + */ + public getID(): string { + return this.model.id; + } + + /** + * Get the status of the staking operation. + * + * @returns The status of the staking operation. + */ + public getStatus(): StakingOperationStatusEnum { + return this.model.status; + } + + /** + * Returns the Wallet ID if it exists. + * + * @returns The Wallet ID. + */ + public getWalletID(): string | undefined { + return this.model.wallet_id; + } + + /** + * Returns the Address ID. + * + * @returns The Address ID. + */ + public getAddressID(): string { + return this.model.address_id; + } + + /** + * Returns the Network ID. + * + * @returns The Network ID. + */ + public getNetworkID(): string { + return this.model.network_id; + } + + /** + * Return a human-readable string representation of the StakingOperation object. + * + * @returns The string representation of the StakingOperation object. + */ + public toString(): string { + return `StakingOperation { id: ${this.getID()} status: ${this.getStatus()} network_id: ${this.getNetworkID()} address_id: ${this.getAddressID()} }`; + } + + /** + * Returns whether the Staking operation is in a terminal State. + * + * @returns Whether the Staking operation is in a terminal State + */ + isTerminalState(): boolean { + return this.isCompleteState() || this.isFailedState(); + } + + /** + * Returns whether the Staking operation is in a failed state. + * + * @returns Whether the Staking operation is in a failed state. + */ + isFailedState(): boolean { + return this.getStatus() === StakingOperationStatusEnum.Failed; + } + + /** + * Returns whether the Staking operation is in a complete state. + * + * @returns Whether the Staking operation is in a complete state. + */ + isCompleteState(): boolean { + return this.getStatus() === StakingOperationStatusEnum.Complete; } /** @@ -36,16 +201,209 @@ export class StakingOperation { return this.transactions; } + /** + * Get signed voluntary exit messages for native eth unstaking + * + * @returns The signed voluntary exit messages for a native eth unstaking operation. + */ + public getSignedVoluntaryExitMessages(): string[] { + const signedVoluntaryExitMessages: string[] = []; + + if (this.model.metadata) { + this.model.metadata.forEach(metadata => { + const decodedSignedVoluntaryExitMessage = atob(metadata.signed_voluntary_exit); + + signedVoluntaryExitMessages.push(decodedSignedVoluntaryExitMessage); + }); + } + + return signedVoluntaryExitMessages; + } + + /** + * Reloads the StakingOperation model with the latest data from the server. + * If the StakingOperation object was created by an ExternalAddress then it will + * not have a wallet ID. + * + * @throws {APIError} if the API request to get the StakingOperation fails. + * @throws {Error} if this function is called on a StakingOperation without a wallet ID. + */ + public async reload(): Promise { + if (this.getWalletID() === undefined) { + const result = await Coinbase.apiClients.stake!.getExternalStakingOperation( + this.getNetworkID(), + this.getAddressID(), + this.getID(), + ); + + this.model = result.data; + } else if (this.getWalletID() != undefined && this.getWalletID() != "") { + const result = await Coinbase.apiClients.walletStake!.getStakingOperation( + this.getWalletID()!, + this.getAddressID(), + this.getID(), + ); + + this.model = result.data; + } + + this.loadTransactionsFromModel(); + } + + /** + * Waits until the Staking Operation is completed or failed by polling its status at the given interval. + * + * @param options - The options to configure the wait function. + * @param options.intervalSeconds - The interval at which to poll, in seconds + * @param options.timeoutSeconds - The maximum amount of time to wait for the StakingOperation to complete, in seconds + * @throws {Error} If the StakingOperation takes longer than the given timeout. + * @returns The completed StakingOperation object. + */ + public async wait({ + intervalSeconds = 5, + timeoutSeconds = 3600, + } = {}): Promise { + if (this.getWalletID() != undefined) { + throw new Error("cannot wait on staking operation for wallet address."); + } + + const startTime = Date.now(); + while (Date.now() - startTime < timeoutSeconds * 1000) { + await this.reload(); + if (this.isTerminalState()) { + return this.model; + } + + if (Date.now() - startTime > timeoutSeconds * 1000) { + throw new Error("Staking operation timed out"); + } + + await delay(intervalSeconds); + } + + throw new Error("Staking operation timed out"); + } + /** * Sign the transactions in the StakingOperation object. * * @param key - The key used to sign the transactions. */ public async sign(key: ethers.Wallet): Promise { - this.transactions.forEach(tx => { + for (const tx of this.transactions) { if (!tx.isSigned()) { - tx.sign(key); + await tx.sign(key); } - }); + } + } + + /** + * loadTransactionsFromModel loads new unsigned transactions from the model into the transactions array. + * Note: For External Address model since tx signing and broadcast status happens by the end user and not our backend + * we need to be careful to not overwrite the transactions array with the response from the API. Ex: End user could have used + * stakingOperation.sign() method to sign the transactions, and we should not overwrite them with the response from the API. + * This however is ok to do so for the Wallet Address model since the transactions states are maintained by our backend. + * This method attempts to be safe for both address models, and only adds newly created unsigned transactions that are not + * already in the transactions array. + */ + private loadTransactionsFromModel() { + // Only overwrite the transactions if the response is populated. + if (this.model.transactions && this.model.transactions.length > 0) { + // Create a set of existing unsigned payloads to avoid duplicates. + const existingUnsignedPayloads = new Set( + this.transactions.map(tx => tx.getUnsignedPayload()), + ); + + // Add transactions that are not already in the transactions array. + this.model.transactions.forEach(transaction => { + if (!existingUnsignedPayloads.has(transaction.unsigned_payload)) { + this.transactions.push(new Transaction(transaction)); + } + }); + } + } +} + +/** + * A builder class for creating execution layer withdrawal options. + */ +export class ExecutionLayerWithdrawalOptionsBuilder { + private readonly networkId: string; + private validatorAmounts: { [key: string]: Amount } = {}; + + /** + * Creates an instance of ExecutionLayerWithdrawalOptionsBuilder. + * + * @param networkId - The network ID. + */ + constructor(networkId: string) { + this.networkId = networkId; + } + + /** + * Adds a validator withdrawal with the specified public key and amount. + * + * @param pubKey - The public key of the validator. + * @param amount - The amount to withdraw. + */ + addValidatorWithdrawal(pubKey: string, amount: Amount) { + this.validatorAmounts[pubKey] = amount; + } + + /** + * Builds the execution layer withdrawal options. + * + * @param options - Existing options to merge with the built options. + * @returns A promise that resolves to an object containing the execution layer withdrawal options merged with any provided options. + */ + async build(options: { [key: string]: string } = {}): Promise<{ [key: string]: string }> { + const asset = await Asset.fetch(this.networkId, Coinbase.assets.Eth); + + const validatorAmounts: { [key: string]: string } = {}; + + for (const pubKey in this.validatorAmounts) { + const amount = this.validatorAmounts[pubKey]; + validatorAmounts[pubKey] = asset.toAtomicAmount(new Decimal(amount.toString())).toString(); + } + + const executionLayerWithdrawalOptions = { + unstake_type: UnstakeTypeExecution, + validator_unstake_amounts: JSON.stringify(validatorAmounts), + }; + + return Object.assign({}, options, executionLayerWithdrawalOptions); + } +} + +/** + * A builder class for creating consensus layer exit options. + */ +export class ConsensusLayerExitOptionBuilder { + private validatorPubKeys: string[] = []; + + /** + * Adds a validator public key to the list of validators. + * + * @param pubKey - The public key of the validator. + */ + addValidator(pubKey: string) { + if (!this.validatorPubKeys.includes(pubKey)) { + this.validatorPubKeys.push(pubKey); + } + } + + /** + * Builds the consensus layer exit options. + * + * @param options - Existing options to merge with the built options. + * @returns A promise that resolves to an object containing the consensus layer exit options merged with any provided options. + */ + async build(options: { [key: string]: string } = {}): Promise<{ [key: string]: string }> { + const consensusLayerExitOptions = { + unstake_type: UnstakeTypeConsensus, + validator_pub_keys: this.validatorPubKeys.join(","), + }; + + return Object.assign({}, options, consensusLayerExitOptions); } } diff --git a/src/coinbase/staking_reward.ts b/src/coinbase/staking_reward.ts index 99fe6dc6..db2e0800 100644 --- a/src/coinbase/staking_reward.ts +++ b/src/coinbase/staking_reward.ts @@ -1,8 +1,8 @@ -import { StakingRewardFormat, StakingReward as StakingRewardModel } from "../client"; +import { StakingReward as StakingRewardModel } from "../client"; import Decimal from "decimal.js"; import { Coinbase } from "./coinbase"; import { Asset } from "./asset"; -import { Amount } from "./types"; +import { Amount, StakingRewardFormat } from "./types"; /** * A representation of a staking reward earned on a network for a given asset. @@ -10,7 +10,7 @@ import { Amount } from "./types"; export class StakingReward { private model: StakingRewardModel; private asset: Asset; - private format: StakingRewardFormat; + private readonly format: StakingRewardFormat; /** * Creates the StakingReward object. @@ -42,7 +42,7 @@ export class StakingReward { addressIds: Array, startTime: string, endTime: string, - format = StakingRewardFormat.Usd, + format: StakingRewardFormat = StakingRewardFormat.USD, ): Promise { const stakingRewards: StakingReward[] = []; const queue: string[] = [""]; @@ -85,7 +85,8 @@ export class StakingReward { * @returns The amount. */ public amount(): Amount { - if (this.format == StakingRewardFormat.Usd) { + if (this.model.amount == "") return 0; + if (this.format == StakingRewardFormat.USD) { return new Decimal(this.model.amount).div(new Decimal("100")); } return this.asset.fromAtomicAmount(new Decimal(this.model.amount)).toNumber(); @@ -100,12 +101,48 @@ export class StakingReward { return new Date(this.model.date); } + /** + * Returns the onchain address of the StakingReward. + * + * @returns The onchain address. + */ + public addressId(): string { + return this.model.address_id; + } + + /** + * Returns the USD value of the StakingReward. + * + * @returns The USD value. + */ + public usdValue(): Amount { + return new Decimal(this.model.usd_value.amount).div(new Decimal("100")); + } + + /** + * Returns the conversion price of the StakingReward in USD. + * + * @returns The conversion price. + */ + public conversionPrice(): Amount { + return new Decimal(this.model.usd_value.conversion_price); + } + + /** + * Returns the time of calculating the conversion price. + * + * @returns The conversion time. + */ + public conversionTime(): Date { + return new Date(this.model.usd_value.conversion_time); + } + /** * Print the Staking Reward as a string. * * @returns The string representation of the Staking Reward. */ public toString(): string { - return `StakingReward { amount: '${this.amount().toString()}' }`; + return `StakingReward { date: '${this.date().toISOString()}' address: '${this.addressId()}' amount: '${this.amount().toString()}' usd_value: '${this.usdValue().toString()}' conversion_price: '${this.conversionPrice().toString()}' conversion_time: '${this.conversionTime().toISOString()}' }`; } } diff --git a/src/coinbase/trade.ts b/src/coinbase/trade.ts index 74e1bbd2..e2833da9 100644 --- a/src/coinbase/trade.ts +++ b/src/coinbase/trade.ts @@ -1,7 +1,8 @@ import { Decimal } from "decimal.js"; +import { ethers } from "ethers"; import { Trade as CoinbaseTrade } from "../client/api"; import { Coinbase } from "./coinbase"; -import { InternalError } from "./errors"; +import { NotSignedError, TimeoutError } from "./errors"; import { Transaction } from "./transaction"; import { TransactionStatus } from "./types"; import { delay } from "./utils"; @@ -20,11 +21,11 @@ export class Trade { * * @class * @param model - The underlying Trade object. - * @throws {InternalError} - If the Trade model is empty. + * @throws {Error} - If the Trade model is empty. */ constructor(model: CoinbaseTrade) { if (!model) { - throw new InternalError("Trade model cannot be empty"); + throw new Error("Trade model cannot be empty"); } this.model = model; } @@ -125,6 +126,53 @@ export class Trade { return this.approveTransaction; } + /** + * Signs the Trade with the provided key. + * This signs the transfer transaction and will sign the approval transaction if present. + * + * @param key - The key to sign the Transfer with + */ + public async sign(key: ethers.Wallet): Promise { + if (this.getApproveTransaction()) { + await this.getApproveTransaction()!.sign(key); + } + + await this.getTransaction().sign(key); + } + + /** + * Broadcasts the Trade to the Network. + * + * @returns The Trade object + * @throws {APIError} if the API request to broadcast a Trade fails. + */ + public async broadcast(): Promise { + const tx = this.getTransaction(); + const approveTx = this.getApproveTransaction(); + + if (!tx.isSigned()) { + throw new NotSignedError("Cannot broadcast Trade with unsigned transaction"); + } + + if (approveTx && !approveTx.isSigned()) { + throw new NotSignedError("Cannot broadcast Trade with unsigned approve transaction"); + } + + const response = await Coinbase.apiClients.trade!.broadcastTrade( + this.getWalletId(), + tx.fromAddressId(), + this.getId(), + { + signed_payload: tx.getSignature()!, + approve_transaction_signed_payload: approveTx ? approveTx.getSignature() : undefined, + }, + ); + + this.resetModel(response.data); + + return this; + } + /** * Returns the status of the Trade. * @@ -135,8 +183,8 @@ export class Trade { } /** - * Waits until the Trade is completed or failed by polling the Network at the given interval. Raises a - * Error if the Trade takes longer than the given timeout. + * Waits until the Trade is completed or failed by polling the Network at the given interval. + * Raises an error if the Trade takes longer than the given timeout. * * @param options - The options to configure the wait function. * @param options.intervalSeconds - The interval at which to poll the Network, in seconds @@ -147,17 +195,18 @@ export class Trade { */ public async wait({ intervalSeconds = 0.2, timeoutSeconds = 10 } = {}): Promise { const startTime = Date.now(); + while (Date.now() - startTime < timeoutSeconds * 1000) { await this.reload(); + if (this.getTransaction().isTerminalState()) { return this; } - if (Date.now() - startTime > timeoutSeconds * 1000) { - throw new Error("Trade timed out"); - } + await delay(intervalSeconds); } - throw new Error("Trade timed out"); + + throw new TimeoutError("Trade timed out"); } /** @@ -171,14 +220,8 @@ export class Trade { this.getAddressId(), this.getId(), ); - this.model = result?.data; - - this.transaction = new Transaction(this.model.transaction); - this.approveTransaction = this.model.approve_transaction - ? new Transaction(this.model.approve_transaction) - : undefined; - return this; + return this.resetModel(result?.data); } /** @@ -194,4 +237,21 @@ export class Trade { `to_amount: '${this.getToAmount()}', status: '${this.getStatus()}' }` ); } + + /** + * Resets the trade model with the specified data from the server. + * + * @param model - The Trade model + * @returns The updated Trade object + */ + private resetModel(model: CoinbaseTrade): Trade { + this.model = model; + + this.transaction = new Transaction(this.model.transaction); + this.approveTransaction = this.model.approve_transaction + ? new Transaction(this.model.approve_transaction) + : undefined; + + return this; + } } diff --git a/src/coinbase/transaction.ts b/src/coinbase/transaction.ts index 72d7632c..50476e15 100644 --- a/src/coinbase/transaction.ts +++ b/src/coinbase/transaction.ts @@ -1,5 +1,5 @@ import { ethers } from "ethers"; -import { Transaction as TransactionModel } from "../client/api"; +import { Transaction as TransactionModel, EthereumTransaction } from "../client/api"; import { TransactionStatus } from "./types"; import { parseUnsignedPayload } from "./utils"; @@ -9,7 +9,6 @@ import { parseUnsignedPayload } from "./utils"; export class Transaction { private model: TransactionModel; private raw?: ethers.Transaction; - private signed: boolean | undefined; /** * Transactions should be constructed via higher level abstractions like Trade or Transfer. @@ -56,21 +55,34 @@ export class Transaction { * * @returns The Status */ - getStatus(): TransactionStatus | undefined { + getStatus(): TransactionStatus { switch (this.model.status) { case TransactionStatus.PENDING: return TransactionStatus.PENDING; case TransactionStatus.BROADCAST: return TransactionStatus.BROADCAST; + case TransactionStatus.SIGNED: + return TransactionStatus.SIGNED; case TransactionStatus.COMPLETE: return TransactionStatus.COMPLETE; case TransactionStatus.FAILED: return TransactionStatus.FAILED; default: - return undefined; + return TransactionStatus.UNSPECIFIED; } } + /** + * Returns whether the Transaction is in a terminal State. + * + * @returns Whether the Transaction is in a terminal State + */ + isTerminalState(): boolean { + const status = this.getStatus(); + + return [TransactionStatus.COMPLETE, TransactionStatus.FAILED].includes(status); + } + /** * Returns the From Address ID for the Transaction. * @@ -81,15 +93,39 @@ export class Transaction { } /** - * Returns whether the Transaction is in a terminal State. + * Returns the To Address ID for the Transaction if it's available. * - * @returns Whether the Transaction is in a terminal State + * @returns The To Address ID */ - isTerminalState(): boolean { - const status = this.getStatus(); - return !status - ? false - : [TransactionStatus.COMPLETE, TransactionStatus.FAILED].includes(status); + toAddressId(): string | undefined { + return this.model.to_address_id; + } + + /** + * Returns the Block Height where the Transaction is recorded. + * + * @returns The Block Height + */ + blockHeight(): string | undefined { + return this.model.block_height; + } + + /** + * Returns the Block Hash where the Transaction is recorded. + * + * @returns The Block Hash + */ + blockHash(): string | undefined { + return this.model.block_hash; + } + + /** + * Returns the Content of the Transaction. + * + * @returns The transaction content + */ + content(): EthereumTransaction | undefined { + return this.model.content; } /** @@ -101,6 +137,15 @@ export class Transaction { return this.model.transaction_link!; } + /** + * Returns the Network ID of the Transaction. + * + * @returns The Network ID. + */ + public getNetworkId(): string { + return this.model.network_id; + } + /** * Returns the underlying raw transaction. * @@ -136,18 +181,26 @@ export class Transaction { async sign(key: ethers.Wallet) { const signedPayload = await key!.signTransaction(this.rawTransaction()); this.model.signed_payload = signedPayload; - this.signed = true; // Removes the '0x' prefix as required by the API. return signedPayload.slice(2); } + /** + * Returns the Signed Payload of the Transaction. + * + * @returns The Signed Payload + */ + getSignature(): string | undefined { + return this.getSignedPayload()?.slice(2); + } + /** * Returns whether the transaction has been signed. * * @returns if the transaction has been signed. */ - isSigned(): boolean | undefined { - return this.signed; + isSigned(): boolean { + return !!this.getSignature(); } /** @@ -156,6 +209,6 @@ export class Transaction { * @returns A string representation of the Transaction. */ toString(): string { - return `Transaction { transactionHash: '${this.getTransactionHash()}', status: '${this.getStatus()}' }`; + return `Transaction { transactionHash: '${this.getTransactionHash()}', status: '${this.getStatus()}', unsignedPayload: '${this.getUnsignedPayload()}', signedPayload: ${this.getSignedPayload()}, transactionLink: ${this.getTransactionLink()} }`; } } diff --git a/src/coinbase/transfer.ts b/src/coinbase/transfer.ts index 6c5eebad..80b9cbab 100644 --- a/src/coinbase/transfer.ts +++ b/src/coinbase/transfer.ts @@ -1,10 +1,12 @@ import { Decimal } from "decimal.js"; -import { TransferStatus } from "./types"; +import { TransactionStatus, SponsoredSendStatus, TransferStatus } from "./types"; +import { Transaction } from "./transaction"; +import { SponsoredSend } from "./sponsored_send"; import { Coinbase } from "./coinbase"; import { Transfer as TransferModel } from "../client/api"; import { ethers } from "ethers"; -import { InternalError } from "./errors"; -import { parseUnsignedPayload } from "./utils"; +import { delay } from "./utils"; +import { TimeoutError } from "./errors"; /** * A representation of a Transfer, which moves an Amount of an Asset from @@ -13,7 +15,6 @@ import { parseUnsignedPayload } from "./utils"; */ export class Transfer { private model: TransferModel; - private transaction?: ethers.Transaction; /** * Private constructor to prevent direct instantiation outside of the factory methods. @@ -24,7 +25,7 @@ export class Transfer { */ private constructor(transferModel: TransferModel) { if (!transferModel) { - throw new InternalError("Transfer model cannot be empty"); + throw new Error("Transfer model cannot be empty"); } this.model = transferModel; } @@ -103,31 +104,13 @@ export class Transfer { return amount.dividedBy(new Decimal(10).pow(this.model.asset.decimals!)); } - /** - * Returns the Unsigned Payload of the Transfer. - * - * @returns The Unsigned Payload as a Hex string. - */ - public getUnsignedPayload(): string { - return this.model.unsigned_payload; - } - - /** - * Returns the Signed Payload of the Transfer. - * - * @returns The Signed Payload as a Hex string, or undefined if not yet available. - */ - public getSignedPayload(): string | undefined { - return this.model.signed_payload; - } - /** * Returns the Transaction Hash of the Transfer. * * @returns The Transaction Hash as a Hex string, or undefined if not yet available. */ public getTransactionHash(): string | undefined { - return this.model.transaction_hash; + return this.getSendTransactionDelegate()?.getTransactionHash(); } /** @@ -136,33 +119,20 @@ export class Transfer { * @returns The ethers.js Transaction object. * @throws (InvalidUnsignedPayload) If the Unsigned Payload is invalid. */ - public getTransaction(): ethers.Transaction { - if (this.transaction) return this.transaction; - - const transaction = new ethers.Transaction(); - - const parsedPayload = parseUnsignedPayload(this.getUnsignedPayload()); - - transaction.chainId = BigInt(parsedPayload.chainId); - transaction.nonce = BigInt(parsedPayload.nonce); - transaction.maxPriorityFeePerGas = BigInt(parsedPayload.maxPriorityFeePerGas); - transaction.maxFeePerGas = BigInt(parsedPayload.maxFeePerGas); - transaction.gasLimit = BigInt(parsedPayload.gas); - transaction.to = parsedPayload.to; - transaction.value = BigInt(parsedPayload.value); - transaction.data = parsedPayload.input; - - this.transaction = transaction; - return transaction; + public getRawTransaction(): ethers.Transaction | undefined { + if (!this.getTransaction()) return undefined; + return this.getTransaction()!.rawTransaction(); } /** - * Sets the Signed Transaction of the Transfer. + * Signs the Transfer with the provided key and returns the hex signature + * required for broadcasting the Transfer. * - * @param transaction - The Signed Transaction. + * @param key - The key to sign the Transfer with + * @returns The hex-encoded signed payload */ - public setSignedTransaction(transaction: ethers.Transaction): void { - this.transaction = transaction; + async sign(key: ethers.Wallet): Promise { + return this.getSendTransactionDelegate()!.sign(key); } /** @@ -171,27 +141,120 @@ export class Transfer { * @returns The Status of the Transfer. */ public getStatus(): TransferStatus | undefined { - switch (this.model.status) { - case TransferStatus.PENDING: + switch (this.getSendTransactionDelegate()!.getStatus()!) { + case TransactionStatus.PENDING: + return TransferStatus.PENDING; + case SponsoredSendStatus.PENDING: return TransferStatus.PENDING; - case TransferStatus.BROADCAST: + case SponsoredSendStatus.SIGNED: + return TransferStatus.PENDING; + case TransactionStatus.BROADCAST: + return TransferStatus.BROADCAST; + case SponsoredSendStatus.SUBMITTED: return TransferStatus.BROADCAST; - case TransferStatus.COMPLETE: + case TransactionStatus.COMPLETE: return TransferStatus.COMPLETE; - case TransferStatus.FAILED: + case SponsoredSendStatus.COMPLETE: + return TransferStatus.COMPLETE; + case TransactionStatus.FAILED: + return TransferStatus.FAILED; + case SponsoredSendStatus.FAILED: return TransferStatus.FAILED; default: return undefined; } } + /** + * Returns the Transaction of the Transfer. + * + * @returns The Transaction + */ + public getTransaction(): Transaction | undefined { + if (!this.model.transaction) return undefined; + return new Transaction(this.model.transaction!); + } + + /** + * Returns the Sponsored Send of the Transfer. + * + * @returns The Sponsored Send + */ + public getSponsoredSend(): SponsoredSend | undefined { + if (!this.model.sponsored_send) return undefined; + return new SponsoredSend(this.model.sponsored_send!); + } + + /** + * Returns the Send Transaction Delegate of the Transfer. + * + * @returns Either the Transaction or the Sponsored Send + */ + public getSendTransactionDelegate(): Transaction | SponsoredSend | undefined { + return !this.getTransaction() ? this.getSponsoredSend() : this.getTransaction(); + } + /** * Returns the link to the Transaction on the blockchain explorer. * * @returns The link to the Transaction on the blockchain explorer. */ - public getTransactionLink(): string { - return `https://sepolia.basescan.org/tx/${this.getTransactionHash()}`; + public getTransactionLink(): string | undefined { + return this.getSendTransactionDelegate()?.getTransactionLink(); + } + + /** + * Broadcasts the Transfer to the Network. + * + * @returns The Transfer object + * @throws {APIError} if the API request to broadcast a Transfer fails. + */ + public async broadcast(): Promise { + if (!this.getSendTransactionDelegate()?.isSigned()) + throw new Error("Cannot broadcast unsigned Transfer"); + + const broadcastTransferRequest = { + signed_payload: this.getSendTransactionDelegate()!.getSignature()!, + }; + + const response = await Coinbase.apiClients.transfer!.broadcastTransfer( + this.getWalletId(), + this.getFromAddressId(), + this.getId(), + broadcastTransferRequest, + ); + + return Transfer.fromModel(response.data); + } + + /** + * Waits for the Transfer to be confirmed on the Network or fail on chain. + * Waits until the Transfer is completed or failed on-chain by polling at the given interval. + * Raises an error if the Trade takes longer than the given timeout. + * + * @param options - The options to configure the wait function. + * @param options.intervalSeconds - The interval to check the status of the Transfer. + * @param options.timeoutSeconds - The maximum time to wait for the Transfer to be confirmed. + * + * @returns The Transfer object in a terminal state. + * @throws {Error} if the Transfer times out. + */ + public async wait({ intervalSeconds = 0.2, timeoutSeconds = 10 } = {}): Promise { + const startTime = Date.now(); + + while (Date.now() - startTime < timeoutSeconds * 1000) { + await this.reload(); + + // If the Transfer is in a terminal state, return the Transfer. + const status = this.getStatus(); + if (status === TransferStatus.COMPLETE || status === TransferStatus.FAILED) { + return this; + } + + await delay(intervalSeconds); + } + + throw new TimeoutError("Transfer timed out"); } /** diff --git a/src/coinbase/types.ts b/src/coinbase/types.ts index ea07a3a1..72670dc2 100644 --- a/src/coinbase/types.ts +++ b/src/coinbase/types.ts @@ -4,14 +4,15 @@ import { Address as AddressModel, AddressList, AddressBalanceList, + AddressHistoricalBalanceList, Balance, CreateAddressRequest, CreateWalletRequest, BroadcastTransferRequest, CreateTransferRequest, TransferList, - User as UserModel, Wallet as WalletModel, + SmartWallet as SmartWalletModel, Transfer as TransferModel, Trade as TradeModel, Asset as AssetModel, @@ -26,10 +27,57 @@ import { StakingContext as StakingContextModel, FetchStakingRewardsRequest, FetchStakingRewards200Response, + FetchHistoricalStakingBalances200Response, FaucetTransaction, + BroadcastStakingOperationRequest, + CreateStakingOperationRequest, + ValidatorList, + Validator, + ValidatorStatus as APIValidatorStatus, + Webhook as WebhookModel, + WebhookList, + CreateWebhookRequest, + UpdateWebhookRequest, + ContractEventList, + CreatePayloadSignatureRequest, + PayloadSignature as PayloadSignatureModel, + PayloadSignatureList, + WebhookEventType, + WebhookEventFilter, + AddressTransactionList, + BroadcastContractInvocationRequest, + CreateContractInvocationRequest, + ContractInvocationList, + ContractInvocation as ContractInvocationModel, + SmartContractList, + CreateSmartContractRequest, + SmartContract as SmartContractModel, + FundOperation as FundOperationModel, + FundQuote as FundQuoteModel, + DeploySmartContractRequest, + WebhookEventTypeFilter, + CreateWalletWebhookRequest, + ReadContractRequest, + SolidityValue, + FundOperationList, + CreateFundOperationRequest, + CreateFundQuoteRequest, + AddressReputation, + RegisterSmartContractRequest, + UpdateSmartContractRequest, + CompileSmartContractRequest, + CompiledSmartContract, + BroadcastExternalTransactionRequest, + BroadcastExternalTransaction200Response, + CreateSmartWalletRequest, + CreateUserOperationRequest, + UserOperation as UserOperationModel, + BroadcastUserOperationRequest, } from "./../client/api"; import { Address } from "./address"; import { Wallet } from "./wallet"; +import { HistoricalBalance } from "./historical_balance"; +import { Transaction } from "./transaction"; export type AssetAPIClient = { /** @@ -189,7 +237,7 @@ export type WalletAPIClient = { * List wallets belonging to the user. * * @param limit - A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. - * @param page - A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param page - A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param options - Override http request option. * @throws {APIError} If the request fails. * @throws {RequiredError} If the required parameter is not provided. @@ -202,19 +250,80 @@ export type WalletAPIClient = { }; /** - * AddressAPI client type definition. + * SmartWalletAPI client type definition. */ -export type AddressAPIClient = { +export type SmartWalletAPIClient = { /** - * Requests faucet funds for the address. + * Create a new smart wallet scoped to the user. * - * @param walletId - The wallet ID. - * @param addressId - The address ID. - * @returns The transaction hash. + * @class + * @param createdSmartWalletRequest - The smart wallet creation request. + * @param options - Axios request options. * @throws {APIError} If the request fails. */ - requestFaucetFunds(walletId: string, addressId: string): AxiosPromise; + createSmartWallet: ( + createSmartWalletRequest?: CreateSmartWalletRequest, + options?: RawAxiosRequestConfig, + ) => AxiosPromise; + + /* + *Get the smart wallet by address + * + *@param smartWalletAddress - The address of the smart wallet to fetch. + *@param options - Override http request option. + *@throws {APIError} If the request fails. + */ + getSmartWallet: ( + smartWalletAddress: string, + options?: RawAxiosRequestConfig, + ) => AxiosPromise; + + /* + *Create a user operation + * + *@param createUserOperationRequest - The user operation creation request. + *@param options - Override http request option. + *@throws {APIError} If the request fails. + */ + createUserOperation: ( + smartWalletAddress: string, + networkId: string, + createUserOperationRequest: CreateUserOperationRequest, + options?: RawAxiosRequestConfig, + ) => AxiosPromise; + + /* + *Broadcast a user operation + * + *@param broadcastUserOperationRequest - The user operation broadcast request. + *@param options - Override http request option. + *@throws {APIError} If the request fails. + */ + broadcastUserOperation: ( + smartWalletAddress: string, + userOperationId: string, + broadcastUserOperationRequest: BroadcastUserOperationRequest, + options?: RawAxiosRequestConfig, + ) => AxiosPromise; + + /* + *Get a user operation by ID + * + *@param userOperationId - The ID of the user operation to fetch. + *@param options - Override http request option. + *@throws {APIError} If the request fails. + */ + getUserOperation: ( + smartWalletAddress: string, + userOpHash: string, + options?: RawAxiosRequestConfig, + ) => AxiosPromise; +}; +/** + * AddressAPI client type definition. + */ +export type AddressAPIClient = { /** * Get address by onchain address. * @@ -292,6 +401,56 @@ export type AddressAPIClient = { createAddressRequest?: CreateAddressRequest, options?: AxiosRequestConfig, ): AxiosPromise; + + /** + * Create a new payload signature with an address. + * + * @param walletId - The ID of the wallet the address belongs to. + * @param addressId - The onchain address of the address to sign the payload with. + * @param createPayloadSignatureRequest - The payload signature creation request. + * @param options - Axios request options. + * @throws {APIError} If the request fails. + */ + createPayloadSignature( + walletId: string, + addressId: string, + createPayloadSignatureRequest?: CreatePayloadSignatureRequest, + options?: AxiosRequestConfig, + ): AxiosPromise; + + /** + * Get payload signature by the specified payload signature ID. + * + * @param walletId - The ID of the wallet the address belongs to. + * @param addressId - The onchain address of the address to sign the payload with. + * @param payloadSignatureId - The ID of the payload signature to fetch. + * @param options - Axios request options. + * @throws {APIError} If the request fails. + */ + getPayloadSignature( + walletId: string, + addressId: string, + payloadSignatureId: string, + options?: AxiosRequestConfig, + ): AxiosPromise; + + /** + * List payload signatures for the specified address. + * + * @param walletId - The ID of the wallet the address belongs to. + * @param addressId - The onchain address of the address to sign the payload with. + * @param limit - A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param page - A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param options - Axios request options. + * @throws {APIError} If the request fails. + */ + listPayloadSignatures( + walletId: string, + addressId: string, + limit?: number, + page?: string, + options?: AxiosRequestConfig, + ): AxiosPromise; }; /** @@ -303,7 +462,7 @@ export type ExternalAddressAPIClient = { * * @param networkId - The ID of the blockchain network * @param addressId - The ID of the address to fetch the balance for - * @param page - A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param page - A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. * @param options - Override http request option. * @throws {APIError} If the request fails. */ @@ -335,28 +494,75 @@ export type ExternalAddressAPIClient = { * * @param networkId - The ID of the blockchain network * @param addressId - The onchain address of the address that is being fetched. + * @param assetId - The Optional ID of the asset to request funds for. Defaults to native asset. + * @param skipWait - The Optional flag to skip waiting for the transaction to be mined. Defaults to false. * @param options - Override http request option. * @throws {APIError} If the request fails. */ requestExternalFaucetFunds( networkId: string, addressId: string, + assetId?: string, + skipWait?: boolean, options?: RawAxiosRequestConfig, ): AxiosPromise; -}; -/** - * UserAPI client type definition. - */ -export type UserAPIClient = { /** - * Retrieves the current user. + * Get the faucet transaction for an external address. * - * @param options - Axios request options. - * @returns - A promise resolvindg to the User model. + * @param networkId - The ID of the blockchain network + * @param addressId - The onchain address of the address that is being fetched. + * @param transactionHash - The transaction hash of the faucet transaction. + * @param options - Override http request option. + * @throws {APIError} If the request fails. + * @returns The faucet transaction. + */ + getFaucetTransaction( + networkId: string, + addressId: string, + transactionHash: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise; + + /** + * Broadcast an external transaction + * + * @param networkId - The ID of the blockchain network + * @param addressId - The ID of the address to broadcast the transaction for + * @param broadcastExternalTransactionRequest - The request body + * @param options - Override http request option. * @throws {APIError} If the request fails. */ - getCurrentUser(options?: AxiosRequestConfig): AxiosPromise; + broadcastExternalTransaction( + networkId: string, + addressId: string, + broadcastExternalTransactionRequest: BroadcastExternalTransactionRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise; +}; + +export type WalletStakeAPIClient = { + broadcastStakingOperation( + walletId: string, + addressId: string, + stakingOperationId: string, + broadcastStakingOperationRequest: BroadcastStakingOperationRequest, + options?: AxiosRequestConfig, + ): AxiosPromise; + + createStakingOperation( + walletId: string, + addressId: string, + createStakingOperationRequest: CreateStakingOperationRequest, + options?: AxiosRequestConfig, + ): AxiosPromise; + + getStakingOperation( + walletId: string, + addressId: string, + stakingOperationId: string, + options?: AxiosRequestConfig, + ): AxiosPromise; }; export type StakeAPIClient = { @@ -372,6 +578,22 @@ export type StakeAPIClient = { options?: AxiosRequestConfig, ): AxiosPromise; + /** + * Get a staking operation. + * + * @param networkId - The ID of the blockchain network + * @param addressId - The ID of the address the staking operation corresponds to. + * @param stakingOperationID - The ID of the staking operation to fetch. + * @param options - Axios request options. + * @throws {APIError} If the request fails. + */ + getExternalStakingOperation( + networkId: string, + addressId: string, + stakingOperationID: string, + options?: AxiosRequestConfig, + ): AxiosPromise; + /** * Get staking context for an address. * @@ -398,6 +620,63 @@ export type StakeAPIClient = { page?: string, options?: AxiosRequestConfig, ): AxiosPromise; + + /** + * Get the staking balances for an address. + * + * @param networkId - The ID of the blockchain network. + * @param assetId - The ID of the asset to fetch the staking balances for. + * @param addressId - The onchain address to fetch the staking balances for. + * @param startTime - The start time of the staking balances. + * @param endTime - The end time of the staking balances. + * @param limit - The amount of records to return in a single call. + * @param page - The batch of records for a given section in the response. + * @param options - Axios request options. + */ + fetchHistoricalStakingBalances( + networkId: string, + assetId: string, + addressId: string, + startTime: string, + endTime: string, + limit?: number, + page?: string, + options?: AxiosRequestConfig, + ): AxiosPromise; + + /** + * List the validators for a given network and asset. + * + * @param networkId - The ID of the blockchain network. + * @param assetId - The ID of the asset to fetch the validator for. + * @param status - The status to filter by. + * @param limit - The amount of records to return in a single call. + * @param page - The batch of records for a given section in the response. + * @param options - Axios request options. + */ + listValidators( + networkId: string, + assetId: string, + status?: APIValidatorStatus, + limit?: number, + page?: string, + options?: AxiosRequestConfig, + ): AxiosPromise; + + /** + * Get the validator for a given network, asset, and address. + * + * @param networkId - The ID of the blockchain network. + * @param assetId - The ID of the asset to fetch the validator for. + * @param id - The unique publicly identifiable id of the validator for which to fetch the data. + * @param options - Axios request options. + */ + getValidator( + networkId: string, + assetId: string, + id: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise; }; /** @@ -497,20 +776,58 @@ export type ServerSignerAPIClient = { ): AxiosPromise; }; +/** + * ExternalSmartContractAPIClient client type definition. + */ +export type ExternalSmartContractAPIClient = { + /** + * List events for a specific contract + * + * @param networkId - Unique identifier for the blockchain network + * @param protocolName - Case-sensitive name of the blockchain protocol + * @param contractAddress - EVM address of the smart contract (42 characters, including '0x', in lowercase) + * @param contractName - Case-sensitive name of the specific contract within the project + * @param eventName - Case-sensitive name of the event to filter for in the contract's logs + * @param fromBlockHeight - Lower bound of the block range to query (inclusive) + * @param toBlockHeight - Upper bound of the block range to query (inclusive) + * @param nextPage - Pagination token for retrieving the next set of results + * @throws {APIError} If the request fails. + */ + listContractEvents( + networkId: string, + protocolName: string, + contractAddress: string, + contractName: string, + eventName: string, + fromBlockHeight: number, + toBlockHeight: number, + nextPage?: string, + ): AxiosPromise; +}; + /** * API clients type definition for the Coinbase SDK. * Represents the set of API clients available in the SDK. */ export type ApiClients = { - user?: UserAPIClient; wallet?: WalletAPIClient; address?: AddressAPIClient; transfer?: TransferAPIClient; trade?: TradeApiClients; serverSigner?: ServerSignerAPIClient; stake?: StakeAPIClient; + walletStake?: WalletStakeAPIClient; asset?: AssetAPIClient; externalAddress?: ExternalAddressAPIClient; + webhook?: WebhookApiClient; + contractEvent?: ExternalSmartContractAPIClient; + contractInvocation?: ContractInvocationAPIClient; + balanceHistory?: BalanceHistoryApiClient; + transactionHistory?: TransactionHistoryApiClient; + smartContract?: SmartContractAPIClient; + fund?: FundOperationApiClient; + addressReputation?: AddressReputationApiClient; + smartWallet?: SmartWalletAPIClient; }; /** @@ -528,19 +845,153 @@ export enum TransferStatus { */ export enum TransactionStatus { PENDING = "pending", + SIGNED = "signed", BROADCAST = "broadcast", COMPLETE = "complete", FAILED = "failed", + UNSPECIFIED = "unspecified", +} + +/** + * Sponsored Send status type definition. + */ +export enum SponsoredSendStatus { + PENDING = "pending", + SIGNED = "signed", + SUBMITTED = "submitted", + COMPLETE = "complete", + FAILED = "failed", +} + +/** + * Validator status type definition. + * Represents the various states a validator can be in. + */ +export enum ValidatorStatus { + UNKNOWN = "unknown", + PROVISIONING = "provisioning", + PROVISIONED = "provisioned", + DEPOSITED = "deposited", + PENDING_ACTIVATION = "pending_activation", + ACTIVE = "active", + EXITING = "exiting", + EXITED = "exited", + WITHDRAWAL_AVAILABLE = "withdrawal_available", + WITHDRAWAL_COMPLETE = "withdrawal_complete", + ACTIVE_SLASHED = "active_slashed", + EXITED_SLASHED = "exited_slashed", + REAPED = "reaped", +} + +/** + * Staking reward format type definition. + * Represents the format in which staking rewards can be queried. + */ +export enum StakingRewardFormat { + USD = "usd", + NATIVE = "native", +} + +/** + * Payload Signature status type definition. + */ +export enum PayloadSignatureStatus { + PENDING = "pending", + SIGNED = "signed", + FAILED = "failed", +} + +/** + * Fund Operation status type definition. + */ +export enum FundOperationStatus { + PENDING = "pending", + COMPLETE = "complete", + FAILED = "failed", } /** - * The Wallet Data type definition. - * The data required to recreate a Wallet. + * Interface representing wallet data, with support for both camelCase and snake_case + * property names for compatibility with older versions of the Python SDK. */ -export type WalletData = { - walletId: string; +export interface WalletData { + /** + * The CDP wallet ID in either camelCase or snake_case format, but not both. + */ + walletId?: string; + wallet_id?: string; + + /** + * The wallet seed + */ seed: string; -}; + + /** + * The network ID in either camelCase or snake_case format, but not both. + */ + networkId?: string; + network_id?: string; +} + +/** + * Type guard to check if data matches the appropriate WalletData format. + * WalletData must have: + * - exactly one of (walletId or wallet_id) + * - at most one of (networkId or network_id) + * - a seed + * + * @param data - The data to check + * @returns True if data matches the appropriate WalletData format + */ +export function isWalletData(data: unknown): data is WalletData { + if (typeof data !== "object" || data === null) { + return false; + } + + const { walletId, wallet_id, networkId, network_id, seed } = data as WalletData; + + // Check that exactly one of walletId or wallet_id is present (but not both) + const hasWalletId = typeof walletId === "string"; + const hasWalletSnakeId = typeof wallet_id === "string"; + if (!(hasWalletId !== hasWalletSnakeId)) { + return false; + } + + // Check that at most one of networkId or network_id is present (but not both) + const hasNetworkId = typeof networkId === "string"; + const hasNetworkSnakeId = typeof network_id === "string"; + if (hasNetworkId && hasNetworkSnakeId) { + return false; + } + + // Check that seed is present and is a string + return typeof seed === "string"; +} + +/** + * Interface representing a BIP-39 mnemonic seed phrase. + */ +export interface MnemonicSeedPhrase { + /** + * The BIP-39 mnemonic seed phrase (12, 15, 18, 21, or 24 words) + */ + mnemonicPhrase: string; +} + +/** + * Type guard to check if data matches the MnemonicSeedPhrase format. + * + * @param data - The data to check + * @returns True if data matches the MnemonicSeedPhrase format + */ +export function isMnemonicSeedPhrase(data: unknown): data is MnemonicSeedPhrase { + if (typeof data !== "object" || data === null) { + return false; + } + + const { mnemonicPhrase } = data as MnemonicSeedPhrase; + return typeof mnemonicPhrase === "string"; +} /** * The Seed Data type definition. @@ -550,6 +1001,7 @@ export type SeedData = { encrypted: boolean; authTag: string; iv: string; + networkId: string; }; /** @@ -574,6 +1026,7 @@ export enum ServerSignerStatus { * Options for creating a Wallet. */ export type WalletCreateOptions = { + seed?: string; networkId?: string; timeoutSeconds?: number; intervalSeconds?: number; @@ -607,6 +1060,21 @@ export type CoinbaseOptions = { * The base path for the API. */ basePath?: string; + + /** + * The maximum number of network retries for the API GET requests. + */ + maxNetworkRetries?: number; + + /** + * The source for the API request, used for analytics. Defaults to `sdk`. + */ + source?: string; + + /** + * The version of the source for the API request, used for analytics. + */ + sourceVersion?: string; }; /** @@ -632,6 +1100,16 @@ export type CoinbaseConfigureFromJsonOptions = { * The base path for the API. */ basePath?: string; + + /** + * The source for the API request, used for analytics. Defaults to `sdk`. + */ + source?: string; + + /** + * The version of the source for the API request, used for analytics. + */ + sourceVersion?: string; }; /** @@ -646,8 +1124,57 @@ export enum StakeOptionsMode { * Partial represents Partial Ethereum Staking mode. */ PARTIAL = "partial", + + /** + * Native represents Native Ethereum Staking mode. + */ + NATIVE = "native", +} + +/** + * Smart Contract Type + */ +export enum SmartContractType { + ERC20 = "erc20", + ERC721 = "erc721", + ERC1155 = "erc1155", + CUSTOM = "custom", } +/** + * NFT Contract Options + */ +export type NFTContractOptions = { + name: string; + symbol: string; + baseURI: string; +}; + +/** + * Token Contract Options + */ +export type TokenContractOptions = { + name: string; + symbol: string; + totalSupply: string; +}; + +/** + * Multi-Token Contract Options + */ +export type MultiTokenContractOptions = { + uri: string; +}; + +/** + * Smart Contract Options + */ +export type SmartContractOptions = + | NFTContractOptions + | TokenContractOptions + | MultiTokenContractOptions + | string; + /** * Options for creating a Transfer. */ @@ -655,6 +1182,625 @@ export type CreateTransferOptions = { amount: Amount; assetId: string; destination: Destination; - timeoutSeconds?: number; - intervalSeconds?: number; + gasless?: boolean; + skipBatching?: boolean; }; + +/** + * Options for creating a Trade. + */ +export type CreateTradeOptions = { + amount: Amount; + fromAssetId: string; + toAssetId: string; +}; + +/** + * Options for creating a Contract Invocation. + */ +export type CreateContractInvocationOptions = { + contractAddress: string; + abi?: object; + method: string; + args: object; + amount?: Amount; + assetId?: string; +}; + +/** + * Options for creating a ERC20. + */ +export type CreateERC20Options = { + name: string; + symbol: string; + totalSupply: Amount; +}; + +/** + * Options for creating a ERC721. + */ +export type CreateERC721Options = { + name: string; + symbol: string; + baseURI: string; +}; + +/** + * Options for creating a ERC1155. + */ +export type CreateERC1155Options = { + uri: string; +}; + +/** + * Options for creating an arbitrary contract. + */ +export type CreateCustomContractOptions = { + /** The version of the solidity compiler, must be 0.8.+, such as "0.8.28+commit.7893614a". See https://binaries.soliditylang.org/bin/list.json */ + solidityVersion: string; + /** The input json for the solidity compiler. See https://docs.soliditylang.org/en/latest/using-the-compiler.html#input-description for more details. */ + solidityInputJson: string; + /** The name of the contract class to be deployed. */ + contractName: string; + /** The arguments for the constructor. */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + constructorArgs: Record; +}; + +/** + * Options for creating a fund operation. + */ +export type CreateFundOptions = { + amount: Amount; + assetId: string; +}; + +/** + * Options for creating a quote for a fund operation. + */ +export type CreateQuoteOptions = CreateFundOptions; + +/** + * Options for listing historical balances of an address. + */ +export type ListHistoricalBalancesOptions = { + assetId: string; + limit?: number; + page?: string; +}; + +/** + * Options for listing transactions of an address. + */ +export type ListTransactionsOptions = { + limit?: number; + page?: string; +}; + +/** + * Result of ListTransactions. + */ +export type ListTransactionsResult = { + transactions: Transaction[]; + nextPageToken: string; +}; + +/** + * Result of ListHistoricalBalances. + */ +export type ListHistoricalBalancesResult = { + historicalBalances: HistoricalBalance[]; + nextPageToken: string; +}; + +export interface WebhookApiClient { + /** + * Create a new webhook for a wallet + * + * @summary Create a new webhook for a wallet + * @param {string} [walletId] + * @param {CreateWalletWebhookRequest} [createWalletWebhookRequest] + * @param {*} [options] - Override http request option. + * @throws {RequiredError} + */ + createWalletWebhook( + walletId?: string, + createWalletWebhookRequest?: CreateWalletWebhookRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise; + + /** + * Create a new webhook + * + * @summary Create a new webhook + * @param {CreateWebhookRequest} [createWebhookRequest] + * @param {*} [options] - Override http request option. + * @throws {RequiredError} + */ + createWebhook( + createWebhookRequest?: CreateWebhookRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise; + + /** + * Delete a webhook + * + * @summary Delete a webhook + * @param {string} webhookId - The Webhook uuid that needs to be deleted + * @param {*} [options] - Override http request option. + * @throws {RequiredError} + */ + deleteWebhook(webhookId: string, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * List webhooks, optionally filtered by event type. + * + * @summary List webhooks + * @param {number} [limit] - A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param {string} [page] - A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param {*} [options] - Override http request option. + * @throws {RequiredError} + */ + listWebhooks( + limit?: number, + page?: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise; + + /** + * Update a webhook + * + * @summary Update a webhook + * @param {string} webhookId - The Webhook id that needs to be updated + * @param {UpdateWebhookRequest} [updateWebhookRequest] + * @param {*} [options] - Override http request option. + * @throws {RequiredError} + */ + updateWebhook( + webhookId: string, + updateWebhookRequest?: UpdateWebhookRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise; +} + +export interface BalanceHistoryApiClient { + /** + * List the historical balance of an asset in a specific address. + * + * @summary Get address balance history for asset + * @param networkId - The ID of the blockchain network + * @param addressId - The ID of the address to fetch the historical balance for. + * @param assetId - The symbol of the asset to fetch the historical balance for. + * @param limit - A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param page - A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param options - Override http request option. + * @throws {RequiredError} + */ + listAddressHistoricalBalance( + networkId: string, + addressId: string, + assetId: string, + limit?: number, + page?: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise; +} + +export interface TransactionHistoryApiClient { + /** + * List the transactions of a specific address. + * + * @summary Get address transactions + * @param networkId - The ID of the blockchain network + * @param addressId - The ID of the address to fetch transactions for. + * @param limit - A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param page - A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param options - Override http request option. + * @throws {RequiredError} + */ + listAddressTransactions( + networkId: string, + addressId: string, + limit?: number, + page?: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise; +} +/** + * The domain for an EIP-712 typed data message payload. + */ +export type TypedDataDomain = { + /** + * The human-readable name of the signing domain. + */ + name?: string; + + /** + * The major version of the signing domain. + */ + version?: string; + + /** + * The chain ID of the signing domain. + */ + chainId?: number; + + /** + * The the address of the contract that will verify the signature. + */ + verifyingContract?: string; + + /** + * A salt used for purposes decided by the specific domain as a data hex string. + */ + salt?: string; +}; + +/** + * A specific field of a structured EIP-712 type. + */ +export type TypedDataField = { + /** + * The field name. + */ + name: string; + + /** + * The type of the field. + */ + type: string; +}; + +/** + * Options for creating a Webhook. + */ +export type CreateWebhookOptions = { + networkId: string; + notificationUri: string; + eventType: WebhookEventType; + eventTypeFilter?: WebhookEventTypeFilter; + eventFilters?: Array; + signatureHeader?: string; +}; + +/** + * Options for updating a Webhook. + */ +export type UpdateWebhookOptions = { + notificationUri?: string; + eventFilters?: Array; + eventTypeFilter?: WebhookEventTypeFilter; +}; + +/** + * Options for registering a smart contract. + */ +export type RegisterContractOptions = { + networkId: string; + contractAddress: string; + abi: object; + contractName?: string; +}; + +/** + * Options for updating a smart contract. + */ +export type UpdateContractOptions = { + abi?: object; + contractName?: string; +}; + +/** + * ContractInvocationAPI client type definition. + */ +export type ContractInvocationAPIClient = { + /** + * Broadcasts a contract invocation. + * + * @param walletId - The ID of the wallet the address belongs to. + * @param addressId - The ID of the address the contract invocation belongs to. + * @param contractInvocationId - The ID of the contract invocation to broadcast. + * @param broadcastContractInvocationRequest - The request body. + * @param options - Axios request options. + * @returns - A promise resolving to the ContractInvocation model. + * @throws {APIError} If the request fails. + */ + broadcastContractInvocation( + walletId: string, + addressId: string, + contractInvocationId: string, + broadcastContractInvocationRequest: BroadcastContractInvocationRequest, + options?: AxiosRequestConfig, + ): AxiosPromise; + + /** + * Creates a Contract Invocation. + * + * @param walletId - The ID of the wallet the address belongs to. + * @param addressId - The ID of the address the contract invocation belongs to. + * @param createContractInvocationRequest - The request body. + * @param options - Axios request options. + * @returns - A promise resolving to the ContractInvocation model. + * @throws {APIError} If the request fails. + */ + createContractInvocation( + walletId: string, + addressId: string, + createContractInvocationRequest: CreateContractInvocationRequest, + options?: AxiosRequestConfig, + ): AxiosPromise; + + /** + * Retrieves a Contract Invocation. + * + * @param walletId - The ID of the wallet the address belongs to. + * @param addressId - The ID of the address the contract invocation belongs to. + * @param contractInvocationId - The ID of the contract invocation to retrieve. + * @param options - Axios request options. + * @returns - A promise resolving to the ContractInvocation model. + * @throws {APIError} If the request fails. + */ + getContractInvocation( + walletId: string, + addressId: string, + contractInvocationId: string, + options?: AxiosRequestConfig, + ): AxiosPromise; + + /** + * Lists Contract Invocations. + * + * @param walletId - The ID of the wallet the address belongs to. + * @param addressId - The ID of the address the contract invocations belong to. + * @param limit - The maximum number of contract invocations to return. + * @param page - The cursor for pagination across multiple pages of contract invocations. + * @param options - Axios request options. + * @returns - A promise resolving to the ContractInvocation list. + * @throws {APIError} If the request fails. + */ + listContractInvocations( + walletId: string, + addressId: string, + limit?: number, + page?: string, + options?: AxiosRequestConfig, + ): AxiosPromise; +}; + +export interface SmartContractAPIClient { + /** + * List smart contracts belonging to the CDP project. + * + * @summary List smart contracts belonging to the CDP project + * @param page - A cursor for pagination across multiple pages of results. Don\'t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param options - Axios request options. + * @throws {APIError} If the request fails. + */ + listSmartContracts( + page?: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise; + + /** + * Compiles a custom contract. + * + * @param compileSmartContractRequest - The request body containing the compile smart contract details. + * @param options - Axios request options. + * @returns - A promise resolving to the compiled smart contract. + * @throws {APIError} If the request fails. + */ + compileSmartContract( + compileSmartContractRequest: CompileSmartContractRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise; + + /** + * Creates a new Smart Contract. + * + * @param walletId - The ID of the wallet the address belongs to. + * @param addressId - The ID of the address to create the smart contract for. + * @param createSmartContractRequest - The request body containing the smart contract details. + * @param options - Axios request options. + * @throws {APIError} If the request fails. + */ + createSmartContract( + walletId: string, + addressId: string, + createSmartContractRequest: CreateSmartContractRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise; + + /** + * Gets a specific Smart Contract. + * + * @param walletId - The ID of the wallet the address belongs to. + * @param addressId - The ID of the address the smart contract belongs to. + * @param smartContractId - The ID of the smart contract to retrieve. + * @param options - Axios request options. + * @throws {APIError} If the request fails. + */ + getSmartContract( + walletId: string, + addressId: string, + smartContractId: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise; + + /** + * Deploys a Smart Contract. + * + * @param walletId - The ID of the wallet the address belongs to. + * @param addressId - The ID of the address the smart contract belongs to. + * @param smartContractId - The ID of the smart contract to deploy. + * @param deploySmartContractRequest - The request body containing deployment details. + * @param options - Axios request options. + * @throws {APIError} If the request fails. + */ + deploySmartContract( + walletId: string, + addressId: string, + smartContractId: string, + deploySmartContractRequest: DeploySmartContractRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise; + + /** + * Read a contract + * + * @param networkId - Unique identifier for the blockchain network + * @param contractAddress - EVM address of the smart contract (42 characters, including '0x', in lowercase) + * @param readContractRequest - The request body containing the method, args, and optionally the ABI + * @returns - A promise resolving to the contract read result + * @throws {APIError} If the request fails + */ + readContract( + networkId: string, + contractAddress: string, + readContractRequest: ReadContractRequest, + ): AxiosPromise; + + /** + * Register a smart contract. + * + * @summary Register a smart contract. + * @param {string} [networkId] - The network ID. + * @param {string} [contractAddress] - The contract address. + * @param {RegisterSmartContractRequest} [registerSmartContractRequest] - The request body containing the register smart contract details. + * @param options - Axios request options + * @returns - A promise resolving to the register smart contract result + * @throws {APIError} If the request fails + */ + registerSmartContract( + networkId: string, + contractAddress: string, + registerSmartContractRequest: RegisterSmartContractRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise; + + /** + * Update a smart contract. + * + * @summary Update a smart contract. + * @param {string} [networkId] - The network ID. + * @param {string} [contractAddress] - The contract address. + * @param {UpdateSmartContractRequest} [updateSmartContractRequest] - The request body containing the update smart contract details. + * @param options - Axios request options + * @returns - A promise resolving to the update smart contract result + * @throws {APIError} If the request fails + */ + updateSmartContract( + networkId: string, + contractAddress: string, + updateSmartContractRequest: UpdateSmartContractRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise; +} + +export interface FundOperationApiClient { + /** + * List fund operations + * + * @param walletId - The ID of the wallet the address belongs to. + * @param addressId - The ID of the address to list fund operations for. + * @param limit - A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + * @param page - A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + * @param options - Axios request options + * @throws {APIError} If the request fails + */ + listFundOperations( + walletId: string, + addressId: string, + limit?: number, + page?: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise; + + /** + * Get a fund operation + * + * @param walletId - The ID of the wallet the address belongs to. + * @param addressId - The ID of the address the fund operation belongs to. + * @param fundOperationId - The ID of the fund operation to retrieve + * @param options - Axios request options + * @throws {APIError} If the request fails + */ + getFundOperation( + walletId: string, + addressId: string, + fundOperationId: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise; + + /** + * Create a fund operation + * + * @param walletId - The ID of the wallet to create the fund operation for + * @param addressId - The ID of the address to create the fund operation for + * @param createFundOperationRequest - The request body containing the fund operation details + * @param options - Axios request options + * @throws {APIError} If the request fails + */ + createFundOperation( + walletId: string, + addressId: string, + createFundOperationRequest: CreateFundOperationRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise; + + /** + * Create a fund operation quote + * + * @param walletId - The ID of the wallet the address belongs to. + * @param addressId - The ID of the address to create the fund operation quote for. + * @param createFundQuoteRequest - The request body containing the fund operation quote details. + * @param options - Axios request options. + * @throws {APIError} If the request fails. + */ + createFundQuote( + walletId: string, + addressId: string, + createFundQuoteRequest: CreateFundQuoteRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise; +} + +export interface AddressReputationApiClient { + /** + * Get the reputation of an address + * + * @param networkId - The ID of the blockchain network + * @param addressId - The ID of the address to fetch the reputation for + * @param options - Override http request option. + * @throws {APIError} If the request fails. + */ + getAddressReputation( + networkId: string, + addressId: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise; +} + +/** + * Options for pagination on list methods. + */ +export type PaginationOptions = { + limit?: number; + page?: string; +}; + +/** + * Paginated list response. + */ +export interface PaginationResponse { + data: T[]; + hasMore: boolean; + nextPage: string | undefined; +} + +/** + * Response from broadcasting an external transaction + */ +export interface BroadcastExternalTransactionResponse { + transactionHash: string; + transactionLink?: string; +} diff --git a/src/coinbase/types/contract.ts b/src/coinbase/types/contract.ts new file mode 100644 index 00000000..4b739d19 --- /dev/null +++ b/src/coinbase/types/contract.ts @@ -0,0 +1,73 @@ +import { + Abi, + AbiFunction, + AbiParameter, + AbiParametersToPrimitiveTypes, + ExtractAbiFunction, +} from "abitype"; +import { ContractFunctionName } from "viem"; + +/** + * Converts an array of ABI parameters to a dictionary type. + * Each parameter name becomes a key in the resulting dictionary, with a string value. + */ +type AbiParametersToDictionary = { + [K in T[number]["name"] as K extends string ? K : any]: string; +}; + +/** + * Checks if two types are exactly the same. + * Returns true if TArgs and TParams are identical, false otherwise. + */ +type MatchesParams = TArgs extends TParams + ? TParams extends TArgs + ? true + : false + : false; + +/** + * Matches the provided arguments to a specific function in the ABI. + * Returns the matched AbiFunction if found, never otherwise. + */ +type MatchArgsToFunction< + TAbi extends Abi, + TFunctionName extends string, + TArgs extends Record, +> = + ExtractAbiFunction extends infer TFunctions + ? TFunctions extends AbiFunction + ? MatchesParams> extends true + ? TFunctions + : any + : any + : any; + +/** + * Determines the return type of a contract function based on the ABI, function name, and arguments. + * + * @template TAbi - The ABI of the contract + * @template TFunctionName - The name of the function to call + * @template TArgs - The arguments to pass to the function (optional) + * + * @returns The return type of the function: + * - void if the function has no outputs + * - The single output type if there's only one output + * - A tuple of output types if there are multiple outputs + * - unknown if the function or its return type cannot be determined + */ +export type ContractFunctionReturnType< + TAbi extends Abi, + TFunctionName extends ContractFunctionName, + TArgs extends Record = {}, +> = + MatchArgsToFunction extends infer TFunction + ? TFunction extends AbiFunction + ? AbiParametersToPrimitiveTypes extends infer TOutputs + ? TOutputs extends readonly [] + ? void + : TOutputs extends readonly [infer TOutput] + ? TOutput + : TOutputs + : any + : any + : any; diff --git a/src/coinbase/user.ts b/src/coinbase/user.ts deleted file mode 100644 index 90cd502b..00000000 --- a/src/coinbase/user.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { User as UserModel } from "./../client/api"; -import { Coinbase } from "./coinbase"; -import { WalletData } from "./types"; -import { Wallet } from "./wallet"; - -type CreateWalletOptionsType = { - networkId?: string; -}; - -/** - * A representation of a User. - * Users have Wallets, which can hold balances of Assets. - * Access the default User through Coinbase.defaultUser(). - */ -export class User { - private model: UserModel; - - /** - * Initializes a new User instance. - * - * @param user - The user model. - */ - constructor(user: UserModel) { - this.model = user; - } - - /** - * Creates a new Wallet belonging to the User. - * - * @param createWalletOptions - The options for creating the Wallet. - * @param createWalletOptions.networkId - the ID of the blockchain network. Defaults to 'base-sepolia'. - * @throws {APIError} - If the request fails. - * @throws {ArgumentError} - If the model or client is not provided. - * @throws {InternalError} - If address derivation or caching fails. - * @returns the new Wallet - */ - async createWallet(createWalletOptions: CreateWalletOptionsType = {}): Promise { - return await Wallet.create(createWalletOptions); - } - - /** - * Returns the user's ID. - * - * @returns The user's ID. - */ - public getId(): string { - return this.model.id; - } - - /** - * Lists the Wallets belonging to the User. - * - * @param pageSize - The number of Wallets to return per page. Defaults to 10 - * @param nextPageToken - The token for the next page of Wallets - * @returns An object containing the Wallets and the token for the next page - */ - public async listWallets( - pageSize: number = 10, - nextPageToken?: string, - ): Promise<{ wallets: Wallet[]; nextPageToken: string }> { - return await Wallet.listWallets(pageSize, nextPageToken); - } - - /** - * Returns the Wallet with the given ID. - * - * @param wallet_id - the ID of the Wallet - * @returns the Wallet with the given ID - */ - public async getWallet(wallet_id: string): Promise { - const wallet = await Wallet.fetch(wallet_id); - await wallet.listAddresses(); - return wallet; - } - - /** - * Imports a Wallet belonging to a User. - * - * @param data - The Wallet data to import. - * @returns The imported Wallet. - */ - public async importWallet(data: WalletData): Promise { - const walletModel = await Coinbase.apiClients.wallet!.getWallet(data.walletId); - const wallet = Wallet.init(walletModel.data, data.seed); - await wallet.listAddresses(); - return wallet; - } - - /** - * Returns a string representation of the User. - * - * @returns The string representation of the User. - */ - toString(): string { - return `User{ userId: ${this.model.id} }`; - } -} diff --git a/src/coinbase/utils.ts b/src/coinbase/utils.ts index d0e2937c..e55e95e3 100644 --- a/src/coinbase/utils.ts +++ b/src/coinbase/utils.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import { Axios, AxiosResponse, InternalAxiosRequestConfig } from "axios"; import { APIError } from "./api_error"; -import { InvalidUnsignedPayload } from "./errors"; +import { InvalidUnsignedPayloadError } from "./errors"; /** * Prints Axios response to the console for debugging purposes. @@ -92,7 +92,7 @@ export async function delay(seconds: number): Promise { export function parseUnsignedPayload(payload: string): Record { const rawPayload = payload.match(/../g)?.map(byte => parseInt(byte, 16)); if (!rawPayload) { - throw new InvalidUnsignedPayload("Unable to parse unsigned payload"); + throw new InvalidUnsignedPayloadError("Unable to parse unsigned payload"); } let parsedPayload; @@ -101,8 +101,35 @@ export function parseUnsignedPayload(payload: string): Record { const decoder = new TextDecoder(); parsedPayload = JSON.parse(decoder.decode(rawPayloadBytes)); } catch (error) { - throw new InvalidUnsignedPayload("Unable to decode unsigned payload JSON"); + throw new InvalidUnsignedPayloadError("Unable to decode unsigned payload JSON"); } return parsedPayload; } + +/** + * Formats the input date to 'YYYY-MM-DD' + * + * @param date - The date to format. + * + * @returns a formated date of 'YYYY-MM-DD' + */ +export function formatDate(date: Date): string { + const year = date.getFullYear(); + const month = String(date.getMonth() + 1).padStart(2, "0"); // Months are zero-based, so add 1 + const day = String(date.getDate()).padStart(2, "0"); + return `${year}-${month}-${day}T00:00:00Z`; +} + +/** + * + * Takes a date and subtracts a week from it. (7 days) + * + * @param date - The date to be formatted. + * + * @returns a formatted date that is one week ago. + */ +export function getWeekBackDate(date: Date): string { + date.setDate(date.getDate() - 7); + return formatDate(date); +} diff --git a/src/coinbase/validator.ts b/src/coinbase/validator.ts new file mode 100644 index 00000000..1faaae95 --- /dev/null +++ b/src/coinbase/validator.ts @@ -0,0 +1,301 @@ +import { Coinbase } from "./coinbase"; +import { + Balance, + Validator as ValidatorModel, + ValidatorStatus as APIValidatorStatus, +} from "../client/api"; +import { ValidatorStatus } from "./types"; + +/** + * A representation of a validator onchain. + */ +export class Validator { + private model: ValidatorModel; + + /** + * Creates a Validator object. + * + * @class + * @param model - The underlying Validator object. + * @throws {Error} - If the Validator model is empty. + */ + constructor(model: ValidatorModel) { + if (!model) { + throw new Error("Invalid model type"); + } + + this.model = model; + } + + /** + * Returns the list of Validators. + * + * @param networkId - The network ID. + * @param assetId - The asset ID. + * @param status - The status to filter by. + * @returns The list of Validators. + */ + public static async list( + networkId: string, + assetId: string, + status?: ValidatorStatus, + ): Promise { + const validators: Validator[] = []; + const response = await Coinbase.apiClients.stake!.listValidators( + networkId, + assetId, + Validator.getAPIValidatorStatus(status), + ); + + response.data.data.forEach(validator => { + validators.push(new Validator(validator)); + }); + + return validators; + } + + /** + * + * Returns the details of a specific validator. + * + * @param networkId - The network ID. + * @param assetId - The asset ID. + * @param id - The unique publicly identifiable id of the validator for which to fetch the data. + * @returns The requested validator details. + */ + public static async fetch(networkId: string, assetId: string, id: string): Promise { + const response = await Coinbase.apiClients.stake!.getValidator(networkId, assetId, id); + + return new Validator(response.data); + } + /** + * Returns the Validator status. + * + * @param status - The API Validator status. + * @returns The Validator status. + */ + private static getAPIValidatorStatus(status?: ValidatorStatus): APIValidatorStatus { + /* istanbul ignore next */ + switch (status) { + case ValidatorStatus.UNKNOWN: + return APIValidatorStatus.Unknown; + case ValidatorStatus.PROVISIONING: + return APIValidatorStatus.Provisioning; + case ValidatorStatus.PROVISIONED: + return APIValidatorStatus.Provisioned; + case ValidatorStatus.DEPOSITED: + return APIValidatorStatus.Deposited; + case ValidatorStatus.PENDING_ACTIVATION: + return APIValidatorStatus.PendingActivation; + case ValidatorStatus.ACTIVE: + return APIValidatorStatus.Active; + case ValidatorStatus.EXITING: + return APIValidatorStatus.Exiting; + case ValidatorStatus.EXITED: + return APIValidatorStatus.Exited; + case ValidatorStatus.WITHDRAWAL_AVAILABLE: + return APIValidatorStatus.WithdrawalAvailable; + case ValidatorStatus.WITHDRAWAL_COMPLETE: + return APIValidatorStatus.WithdrawalComplete; + case ValidatorStatus.ACTIVE_SLASHED: + return APIValidatorStatus.ActiveSlashed; + case ValidatorStatus.EXITED_SLASHED: + return APIValidatorStatus.ExitedSlashed; + case ValidatorStatus.REAPED: + return APIValidatorStatus.Reaped; + default: + return APIValidatorStatus.Unknown; + } + } + + /** + * Returns the Validator ID. + * + * @returns The Validator ID. + */ + public getValidatorId(): string { + return this.model.validator_id; + } + + /** + * Returns the Validator status. + * + * @returns The Validator status. + */ + public getStatus(): string { + switch (this.model.status) { + case APIValidatorStatus.Unknown: + return ValidatorStatus.UNKNOWN; + case APIValidatorStatus.Provisioning: + return ValidatorStatus.PROVISIONING; + case APIValidatorStatus.Provisioned: + return ValidatorStatus.PROVISIONED; + case APIValidatorStatus.Deposited: + return ValidatorStatus.DEPOSITED; + case APIValidatorStatus.PendingActivation: + return ValidatorStatus.PENDING_ACTIVATION; + case APIValidatorStatus.Active: + return ValidatorStatus.ACTIVE; + case APIValidatorStatus.Exiting: + return ValidatorStatus.EXITING; + case APIValidatorStatus.Exited: + return ValidatorStatus.EXITED; + case APIValidatorStatus.WithdrawalAvailable: + return ValidatorStatus.WITHDRAWAL_AVAILABLE; + case APIValidatorStatus.WithdrawalComplete: + return ValidatorStatus.WITHDRAWAL_COMPLETE; + case APIValidatorStatus.ActiveSlashed: + return ValidatorStatus.ACTIVE_SLASHED; + case APIValidatorStatus.ExitedSlashed: + return ValidatorStatus.EXITED_SLASHED; + case APIValidatorStatus.Reaped: + return ValidatorStatus.REAPED; + default: + return ValidatorStatus.UNKNOWN; + } + } + /** + * Returns the network ID. + * + * @returns The network ID. + */ + public getNetworkId(): string { + return this.model.network_id; + } + + /** + * Returns the asset ID. + * + * @returns The asset ID. + */ + public getAssetId(): string { + return this.model.asset_id; + } + + /** + * Returns the activation epoch of the validator. + * + * @returns The activation epoch as a string. + */ + public getActivationEpoch(): string { + return this.model.details?.activationEpoch || ""; + } + + /** + * Returns the balance of the validator. + * + * @returns The balance object. + */ + public getBalance(): Balance | undefined { + return this.model.details?.balance; + } + + /** + * Returns the effective balance of the validator. + * + * @returns The effective balance object. + */ + public getEffectiveBalance(): Balance | undefined { + return this.model.details?.effective_balance; + } + + /** + * Returns the exit epoch of the validator. + * + * @returns The exit epoch as a string. + */ + public getExitEpoch(): string { + return this.model.details?.exitEpoch || ""; + } + + /** + * Returns the index of the validator. + * + * @returns The validator index as a string. + */ + public getIndex(): string { + return this.model.details?.index || ""; + } + + /** + * Returns the public key of the validator. + * + * @returns The validator's public key as a string. + */ + public getPublicKey(): string { + return this.model.details?.public_key || ""; + } + + /** + * Returns whether the validator has been slashed. + * + * @returns True if the validator has been slashed, false otherwise. + */ + public isSlashed(): boolean { + return this.model.details?.slashed || false; + } + + /** + * Returns the withdrawable epoch of the validator. + * + * @returns The withdrawable epoch as a string. + */ + public getWithdrawableEpoch(): string { + return this.model.details?.withdrawableEpoch || ""; + } + + /** + * Returns the withdrawal address of the validator. + * + * @returns The withdrawal address as a string. + */ + public getWithdrawalAddress(): string { + return this.model.details?.withdrawal_address || ""; + } + + /** + * Returns the withdrawal credentials of the validator. + * + * @returns The withdrawal credentials as a string. + */ + public getWithdrawalCredentials(): string { + return this.model.details?.withdrawal_credentials || ""; + } + + /** + * Returns the address for execution layer rewards (MEV & tx fees).If using a reward splitter plan, this is a smart contract + * address that splits rewards based on defined commissions and send a portion to the forwarded_fee_recipient_address. + * + * @returns The fee recipient address as a string. + */ + public getFeeRecipientAddress(): string { + return this.model.details?.fee_recipient_address || ""; + } + + /** + * If using a reward splitter plan, this address receives a defined percentage of the total execution layer rewards. + * + * @returns The forwarded fee recipient address as a string. + */ + public getForwardedFeeRecipientAddress(): string { + return this.model.details?.forwarded_fee_recipient_address || ""; + } + + /** + * Returns the string representation of the Validator. + * + * @returns The string representation of the Validator. + */ + public toString(): string { + return `Id: ${this.getValidatorId()} Status: ${this.getStatus()}`; + } + + /** + * Returns the JSON representation of the Validator. + * + * @returns The JSON representation of the Validator. + */ + public toJSON(): string { + return JSON.stringify(this.model); + } +} diff --git a/src/coinbase/wallet.ts b/src/coinbase/wallet.ts index d725373e..626db26b 100644 --- a/src/coinbase/wallet.ts +++ b/src/coinbase/wallet.ts @@ -1,8 +1,12 @@ import { HDKey } from "@scure/bip32"; +import { mnemonicToSeedSync, validateMnemonic } from "@scure/bip39"; +import { wordlist } from "@scure/bip39/wordlists/english"; +import { hexlify } from "ethers"; import * as crypto from "crypto"; import Decimal from "decimal.js"; import { ethers } from "ethers"; import * as fs from "fs"; +import * as ed2curve from "ed2curve"; import * as secp256k1 from "secp256k1"; import { Address as AddressModel, Wallet as WalletModel } from "../client"; import { Address } from "./address"; @@ -11,34 +15,62 @@ import { Asset } from "./asset"; import { Balance } from "./balance"; import { BalanceMap } from "./balance_map"; import { Coinbase } from "./coinbase"; -import { ArgumentError, InternalError } from "./errors"; +import { ArgumentError } from "./errors"; import { FaucetTransaction } from "./faucet_transaction"; import { Trade } from "./trade"; import { Transfer } from "./transfer"; import { Amount, + StakingRewardFormat, + CreateContractInvocationOptions, CreateTransferOptions, + CreateTradeOptions, SeedData, ServerSignerStatus, + StakeOptionsMode, WalletCreateOptions, WalletData, + isWalletData, + MnemonicSeedPhrase, + isMnemonicSeedPhrase, + CreateERC20Options, + CreateERC721Options, + CreateERC1155Options, + PaginationOptions, + PaginationResponse, + CreateFundOptions, + CreateQuoteOptions, + CreateCustomContractOptions, } from "./types"; -import { convertStringToHex, delay } from "./utils"; +import { convertStringToHex, delay, formatDate, getWeekBackDate } from "./utils"; +import { StakingOperation } from "./staking_operation"; +import { StakingReward } from "./staking_reward"; +import { StakingBalance } from "./staking_balance"; +import { PayloadSignature } from "./payload_signature"; +import { ContractInvocation } from "../coinbase/contract_invocation"; +import { SmartContract } from "./smart_contract"; +import { Webhook } from "./webhook"; +import { HistoricalBalance } from "./historical_balance"; +import { FundOperation } from "./fund_operation"; +import { FundQuote } from "./fund_quote"; /** * A representation of a Wallet. Wallets come with a single default Address, but can expand to have a set of Addresses, * each of which can hold a balance of one or more Assets. Wallets can create new Addresses, list their addresses, * list their balances, and transfer Assets to other Addresses. Wallets should be created through User.createWallet or User.importWallet. + * Wallets should be created using `Wallet.create`, imported using `Wallet.import`, or fetched using `Wallet.fetch`. + * Existing wallets can be imported with a seed using `Wallet.import`. + * Wallets backed by a Server Signer can be fetched with `Wallet.fetch` and used for signing operations immediately. */ export class Wallet { - private model: WalletModel; + static MAX_ADDRESSES = 20; + private model: WalletModel; private master?: HDKey; private seed?: string; private addresses: WalletAddress[] = []; private readonly addressPathPrefix = "m/44'/60'/0'/0"; - static MAX_ADDRESSES = 20; /** * Private constructor to prevent direct instantiation outside of factory method. Use Wallet.init instead. @@ -56,25 +88,41 @@ export class Wallet { } /** - * Lists the Wallets belonging to the User. + * Lists the Wallets belonging to the CDP Project. * - * @param pageSize - The number of Wallets to return per page. Defaults to 10 - * @param nextPageToken - The token for the next page of Wallets - * @returns An object containing the Wallets and the token for the next page + * @param options - The pagination options. + * @param options.limit - The maximum number of Wallets to return. Limit can range between 1 and 100. + * @param options.page - The cursor for pagination across multiple pages of Wallets. Don\'t include this parameter on the first call. Use the next page value returned in a previous response to request subsequent results. + * + * @returns The paginated list response of Wallets. */ - public static async listWallets( - pageSize: number = 10, - nextPageToken?: string, - ): Promise<{ wallets: Wallet[]; nextPageToken: string }> { - const walletList = await Coinbase.apiClients.wallet!.listWallets( - pageSize, - nextPageToken ? nextPageToken : undefined, - ); - const wallets = walletList.data.data.map(wallet => { - return Wallet.init(wallet, ""); - }); + public static async listWallets({ + limit = Coinbase.defaultPageLimit, + page = undefined, + }: PaginationOptions = {}): Promise> { + const data: Wallet[] = []; + let nextPage: string | undefined; + + const response = await Coinbase.apiClients.wallet!.listWallets(limit, page); + + const wallets = response.data.data; + for (const wallet of wallets) { + data.push(Wallet.init(wallet, "")); + } + + const hasMore = response.data.has_more; - return { wallets: wallets, nextPageToken: walletList.data.next_page }; + if (hasMore) { + if (response.data.next_page) { + nextPage = response.data.next_page; + } + } + + return { + data, + hasMore, + nextPage, + }; } /** @@ -90,16 +138,79 @@ export class Wallet { } /** - * Returns a newly created Wallet object. Do not use this method directly. - * Instead, use User.createWallet. + * Loads an existing CDP Wallet using a wallet data object or mnemonic seed phrase. + * + * @param data - The data used to import the wallet: + * - If WalletData: Must contain walletId (or wallet_id) and seed. + * Allows for the loading of an existing CDP wallet into CDP. + * - If MnemonicSeedPhrase: Must contain a valid BIP-39 mnemonic phrase (12, 15, 18, 21, or 24 words). + * Allows for the import of an external wallet into CDP as a 1-of-1 wallet. + * @param networkId - the ID of the blockchain network. Defaults to 'base-sepolia'. + * @returns A Promise that resolves to the loaded Wallet instance + * @throws {ArgumentError} If the data format is invalid. + * @throws {ArgumentError} If the seed is not provided. + * @throws {ArgumentError} If the mnemonic seed phrase is invalid. + */ + public static async import( + data: WalletData | MnemonicSeedPhrase, + networkId: string = Coinbase.networks.BaseSepolia, + ): Promise { + // Check if data is a mnemonic seed phrase object + if (isMnemonicSeedPhrase(data)) { + // Handle mnemonic seed phrase object import + + if (!data.mnemonicPhrase) { + throw new ArgumentError("BIP-39 mnemonic seed phrase must be provided"); + } + + if (!validateMnemonic(data.mnemonicPhrase, wordlist)) { + throw new ArgumentError("Invalid BIP-39 mnemonic seed phrase"); + } + + // Convert mnemonic phrase to seed + const seedBuffer = mnemonicToSeedSync(data.mnemonicPhrase); + const seed = hexlify(seedBuffer).slice(2); // remove 0x prefix + + // Create wallet using the provided seed + const wallet = await Wallet.createWithSeed({ + seed: seed, + networkId, + }); + + // Ensure the wallet is created + await wallet.listAddresses(); + return wallet; + } else if (isWalletData(data)) { + // Handle WalletData object import + + const walletId = data.walletId || data.wallet_id; + if (!walletId) { + throw new ArgumentError("Wallet ID must be provided"); + } + + if (!data.seed) { + throw new ArgumentError("Seed must be provided"); + } + + const walletModel = await Coinbase.apiClients.wallet!.getWallet(walletId); + const wallet = Wallet.init(walletModel.data, data.seed); + await wallet.listAddresses(); + return wallet; + } else { + throw new ArgumentError("Invalid import data format"); + } + } + + /** + * Creates a new Wallet with a random seed. * * @constructs Wallet * @param options - The options to create the Wallet. * @param options.networkId - the ID of the blockchain network. Defaults to 'base-sepolia'. - * @param options.intervalSeconds - The interval at which to poll the CDPService, in seconds. + * @param options.intervalSeconds - The interval at which to poll the backend, in seconds. * @param options.timeoutSeconds - The maximum amount of time to wait for the ServerSigner to create a seed, in seconds. * @throws {ArgumentError} If the model or client is not provided. - * @throws {InternalError} - If address derivation or caching fails. + * @throws {Error} - If address derivation or caching fails. * @throws {APIError} - If the request fails. * @returns A promise that resolves with the new Wallet object. */ @@ -107,6 +218,32 @@ export class Wallet { networkId = Coinbase.networks.BaseSepolia, timeoutSeconds = 20, intervalSeconds = 0.2, + }: WalletCreateOptions = {}): Promise { + return Wallet.createWithSeed({ + networkId, + timeoutSeconds, + intervalSeconds, + }); + } + + /** + * Creates a new Wallet with the given seed. + * + * @param options - The options to create the Wallet. + * @param options.seed - The seed to use for the Wallet. If undefined, a random seed will be generated. + * @param options.networkId - the ID of the blockchain network. Defaults to 'base-sepolia'. + * @param options.intervalSeconds - The interval at which to poll the backend, in seconds. + * @param options.timeoutSeconds - The maximum amount of time to wait for the ServerSigner to create a seed, in seconds. + * @throws {ArgumentError} If the model or client is not provided. + * @throws {Error} - If address derivation or caching fails. + * @throws {APIError} - If the request fails. + * @returns A promise that resolves with the new Wallet object. + */ + public static async createWithSeed({ + seed = undefined, + networkId = Coinbase.networks.BaseSepolia, + timeoutSeconds = 20, + intervalSeconds = 0.2, }: WalletCreateOptions = {}): Promise { const result = await Coinbase.apiClients.wallet!.createWallet({ wallet: { @@ -115,7 +252,7 @@ export class Wallet { }, }); - const wallet = Wallet.init(result.data, undefined); + const wallet = Wallet.init(result.data, seed); if (Coinbase.useServerSigner) { await wallet.waitForSigner(wallet.getId()!, intervalSeconds, timeoutSeconds); } @@ -125,14 +262,17 @@ export class Wallet { } /** - * Returns a new Wallet object. Do not use this method directly. Instead, use User.createWallet or User.importWallet. + * Returns a new Wallet object. Do not use this method directly. Instead, use one of: + * - Wallet.create (Create a new Wallet), + * - Wallet.import (Import a Wallet with seed), + * - Wallet.fetch (fetch a Wallet by ID w/o seed, useful for server signer wallets). * * @constructs Wallet * @param model - The underlying Wallet model object * @param seed - The seed to use for the Wallet. Expects a 32-byte hexadecimal with no 0x prefix. If null or undefined, a new seed will be generated. * If the empty string, no seed is generated, and the Wallet will be instantiated without a seed and its corresponding private keys. * @throws {ArgumentError} If the model or client is not provided. - * @throws {InternalError} - If address derivation or caching fails. + * @throws {Error} - If address derivation or caching fails. * @throws {APIError} - If the request fails. * @returns A promise that resolves with the new Wallet object. */ @@ -153,9 +293,13 @@ export class Wallet { */ public export(): WalletData { if (!this.seed) { - throw new InternalError("Cannot export Wallet without loaded seed"); + throw new Error("Cannot export Wallet without loaded seed"); } - return { walletId: this.getId()!, seed: this.seed }; + return { + walletId: this.getId()!, + seed: this.seed, + networkId: this.getNetworkId(), + }; } /** @@ -167,7 +311,9 @@ export class Wallet { public async createAddress(): Promise
        { let payload, key; if (!Coinbase.useServerSigner) { - const hdKey = this.deriveKey(this.addresses.length); + // TODO: Coordinate this value with concurrent calls to createAddress. + const addressIndex = this.addresses.length; + const hdKey = this.deriveKey(addressIndex); const attestation = this.createAttestation(hdKey); const publicKey = convertStringToHex(hdKey.publicKey!); key = new ethers.Wallet(convertStringToHex(hdKey.privateKey!)); @@ -175,6 +321,7 @@ export class Wallet { payload = { public_key: publicKey, attestation: attestation, + address_index: addressIndex, }; } const response = await Coinbase.apiClients.address!.createAddress(this.model.id!, payload); @@ -192,14 +339,14 @@ export class Wallet { * * @param seed - The seed to use for the Wallet. Expects a 32-byte hexadecimal with no 0x prefix. * @throws {ArgumentError} If the seed is empty. - * @throws {InternalError} If the seed is already set. + * @throws {Error} If the seed is already set. */ public setSeed(seed: string) { if (seed === undefined || seed === "") { throw new ArgumentError("Seed must not be empty"); } if (this.master) { - throw new InternalError("Seed is already set"); + throw new Error("Seed is already set"); } this.setMasterNode(seed); @@ -211,21 +358,23 @@ export class Wallet { const derivedKey = this.deriveKey(index); const etherWallet = new ethers.Wallet(convertStringToHex(derivedKey.privateKey!)); if (etherWallet.address != address.getId()) { - throw new InternalError( - `Seed does not match wallet; cannot find address ${etherWallet.address}`, - ); + throw new Error(`Seed does not match wallet; cannot find address ${etherWallet.address}`); } address.setKey(etherWallet); }); } /** - * Returns the Address with the given ID. + * Returns the WalletAddress with the given ID. * - * @param addressId - The ID of the Address to retrieve. - * @returns The Address. + * @param addressId - The ID of the WalletAddress to retrieve. + * @returns The WalletAddress. */ - public getAddress(addressId: string): Address | undefined { + public async getAddress(addressId: string): Promise { + if (this.addresses.length < 1) { + this.addresses = await this.listAddresses(); + } + return this.addresses.find(address => { return address.getId() === addressId; }); @@ -242,28 +391,238 @@ export class Wallet { Wallet.MAX_ADDRESSES, ); - const addresses = response.data.data.map((address, index) => { - return this.buildWalletAddress(address, index); + const addresses = response.data.data.map(address => { + return this.buildWalletAddress(address, address.index); }); this.addresses = addresses; return addresses; } /** - * Trades the given amount of the given Asset for another Asset. Currently only the default address is used to source the Trade + * Trades the given amount of the given Asset for another Asset. + * Currently only the default address is used to source the Trade. * - * @param amount - The amount of the Asset to send. - * @param fromAssetId - The ID of the Asset to trade from. - * @param toAssetId - The ID of the Asset to trade to. - * @throws {InternalError} If the default address is not found. + * @param options - The options to create the Trade. + * @param options.amount - The amount of the Asset to send. + * @param options.fromAssetId - The ID of the Asset to trade from. + * @param options.toAssetId - The ID of the Asset to trade to. + * @throws {Error} If the default address is not found. * @throws {Error} If the private key is not loaded, or if the asset IDs are unsupported, or if there are insufficient funds. - * @returns The Trade object. + * @returns The created Trade object. */ - public async createTrade(amount: Amount, fromAssetId: string, toAssetId: string): Promise { - if (!this.getDefaultAddress()) { - throw new InternalError("Default address not found"); - } - return await this.getDefaultAddress()!.createTrade(amount, fromAssetId, toAssetId); + public async createTrade(options: CreateTradeOptions): Promise { + return (await this.getDefaultAddress()).createTrade(options); + } + + /** + * Get the stakeable balance for the supplied asset. + * + * @param asset_id - The asset to check the stakeable balance for. + * @param mode - The staking mode. Defaults to DEFAULT. + * @param options - Additional options for getting the stakeable balance. + * @throws {Error} if the default address is not found. + * @returns The stakeable balance. + */ + public async stakeableBalance( + asset_id: string, + mode: StakeOptionsMode = StakeOptionsMode.DEFAULT, + options: { [key: string]: string } = {}, + ): Promise { + return (await this.getDefaultAddress()).stakeableBalance(asset_id, mode, options); + } + + /** + * Get the unstakeable balance for the supplied asset. + * + * @param asset_id - The asset to check the unstakeable balance for. + * @param mode - The staking mode. Defaults to DEFAULT. + * @param options - Additional options for getting the unstakeable balance. + * @throws {Error} if the default address is not found. + * @returns The unstakeable balance. + */ + public async unstakeableBalance( + asset_id: string, + mode: StakeOptionsMode = StakeOptionsMode.DEFAULT, + options: { [key: string]: string } = {}, + ): Promise { + return (await this.getDefaultAddress()).unstakeableBalance(asset_id, mode, options); + } + + /** + * Get the pending claimable balance for the supplied asset. + * + * @param asset_id - The asset to check pending claimable balance for. + * @param mode - The staking mode. Defaults to DEFAULT. + * @param options - Additional options for getting the pending claimable balance. + * @throws {Error} if the default address is not found. + * @returns The pending claimable balance. + */ + public async pendingClaimableBalance( + asset_id: string, + mode: StakeOptionsMode = StakeOptionsMode.DEFAULT, + options: { [key: string]: string } = {}, + ): Promise { + return (await this.getDefaultAddress()).pendingClaimableBalance(asset_id, mode, options); + } + + /** + * Get the claimable balance for the supplied asset. + * + * @param asset_id - The asset to check claimable balance for. + * @param mode - The staking mode. Defaults to DEFAULT. + * @param options - Additional options for getting the claimable balance. + * @throws {Error} if the default address is not found. + * @returns The claimable balance. + */ + public async claimableBalance( + asset_id: string, + mode: StakeOptionsMode = StakeOptionsMode.DEFAULT, + options: { [key: string]: string } = {}, + ): Promise { + return (await this.getDefaultAddress()).claimableBalance(asset_id, mode, options); + } + + /** + * Lists the staking rewards for the address. + * + * @param assetId - The asset ID. + * @param startTime - The start time. + * @param endTime - The end time. + * @param format - The format to return the rewards in. (usd, native). Defaults to usd. + * @throws {Error} if the default address is not found. + * @returns The staking rewards. + */ + public async stakingRewards( + assetId: string, + startTime = getWeekBackDate(new Date()), + endTime = formatDate(new Date()), + format: StakingRewardFormat = StakingRewardFormat.USD, + ): Promise { + return (await this.getDefaultAddress()).stakingRewards(assetId, startTime, endTime, format); + } + + /** + * Lists the historical staking balances for the address. + * + * @param assetId - The asset ID. + * @param startTime - The start time. + * @param endTime - The end time. + * @throws {Error} if the default address is not found. + * @returns The staking balances. + */ + public async historicalStakingBalances( + assetId: string, + startTime = getWeekBackDate(new Date()), + endTime = formatDate(new Date()), + ): Promise { + return (await this.getDefaultAddress()).historicalStakingBalances(assetId, startTime, endTime); + } + + /** + * Lists the historical balances for a given asset belonging to the default address of the wallet. + * + * @param assetId - The asset ID. + * @param options - The pagination options. + * @param options.limit - The maximum number of Historical Balances to return. Limit can range between 1 and 100. + * @param options.page - The cursor for pagination across multiple pages of Historical Balances. Don\'t include this parameter on the first call. Use the next page value returned in a previous response to request subsequent results. + * + * @returns The paginated list response of Historical Balances for the given Asset ID. + */ + public async listHistoricalBalances( + assetId: string, + { limit = Coinbase.defaultPageLimit, page = undefined }: PaginationOptions = {}, + ): Promise> { + return (await this.getDefaultAddress()).listHistoricalBalances(assetId, { limit, page }); + } + + /** + * Creates a staking operation to stake, signs it, and broadcasts it on the blockchain. + * + * @param amount - The amount for the staking operation. + * @param assetId - The asset for the staking operation. + * @param mode - The staking mode. Defaults to DEFAULT. + * @param options - Additional options such as setting the mode for the staking action. + * @param timeoutSeconds - The amount to wait for the transaction to complete when broadcasted. + * @param intervalSeconds - The amount to check each time for a successful broadcast. + * @throws {Error} if the default address is not found. + * @returns The staking operation after it's completed fully. + */ + public async createStake( + amount: Amount, + assetId: string, + mode: StakeOptionsMode = StakeOptionsMode.DEFAULT, + options: { [key: string]: string } = {}, + timeoutSeconds = 60, + intervalSeconds = 0.2, + ): Promise { + return (await this.getDefaultAddress()).createStake( + amount, + assetId, + mode, + options, + timeoutSeconds, + intervalSeconds, + ); + } + + /** + * Creates a staking operation to unstake, signs it, and broadcasts it on the blockchain. + * + * @param amount - The amount for the staking operation. + * @param assetId - The asset for the staking operation. + * @param mode - The staking mode. Defaults to DEFAULT. + * @param options - Additional options such as setting the mode for the staking action. + * @param timeoutSeconds - The amount to wait for the transaction to complete when broadcasted. + * @param intervalSeconds - The amount to check each time for a successful broadcast. + * @throws {Error} if the default address is not found. + * @returns The staking operation after it's completed successfully. + */ + public async createUnstake( + amount: Amount, + assetId: string, + mode: StakeOptionsMode = StakeOptionsMode.DEFAULT, + options: { [key: string]: string } = {}, + timeoutSeconds = 60, + intervalSeconds = 0.2, + ): Promise { + return (await this.getDefaultAddress()).createUnstake( + amount, + assetId, + mode, + options, + timeoutSeconds, + intervalSeconds, + ); + } + + /** + * Creates a staking operation to claim stake, signs it, and broadcasts it on the blockchain. + * + * @param amount - The amount for the staking operation. + * @param assetId - The asset for the staking operation. + * @param mode - The staking mode. Defaults to DEFAULT. + * @param options - Additional options such as setting the mode for the staking action. + * @param timeoutSeconds - The amount to wait for the transaction to complete when broadcasted. + * @param intervalSeconds - The amount to check each time for a successful broadcast. + * @throws {Error} if the default address is not found. + * @returns The staking operation after it's completed fully. + */ + public async createClaimStake( + amount: Amount, + assetId: string, + mode: StakeOptionsMode = StakeOptionsMode.DEFAULT, + options: { [key: string]: string } = {}, + timeoutSeconds = 60, + intervalSeconds = 0.2, + ): Promise { + return (await this.getDefaultAddress()).createClaimStake( + amount, + assetId, + mode, + options, + timeoutSeconds, + intervalSeconds, + ); } /** @@ -326,6 +685,20 @@ export class Wallet { return this.model.id; } + /** + * Saves the seed of the Wallet to the given file. + * + * @deprecated Use saveSeedToFile() instead + * @param filePath - The path of the file to save the seed to + * @param encrypt - Whether the seed information persisted to the local file system should be + * encrypted or not. Data is unencrypted by default. + * @returns A string indicating the success of the operation + * @throws {Error} If the Wallet does not have a seed + */ + public saveSeed(filePath: string, encrypt: boolean = false): string { + return this.saveSeedToFile(filePath, encrypt); + } + /** * Saves the seed of the Wallet to the given file. Wallets whose seeds are saved this way can be * rehydrated using load_seed. A single file can be used for multiple Wallet seeds. @@ -335,11 +708,11 @@ export class Wallet { * @param encrypt - Whether the seed information persisted to the local file system should be * encrypted or not. Data is unencrypted by default. * @returns A string indicating the success of the operation - * @throws {InternalError} If the Wallet does not have a seed + * @throws {Error} If the Wallet does not have a seed */ - public saveSeed(filePath: string, encrypt: boolean = false): string { + public saveSeedToFile(filePath: string, encrypt: boolean = false): string { if (!this.master) { - throw new InternalError("Cannot save Wallet without loaded seed"); + throw new Error("Cannot save Wallet without loaded seed"); } const existingSeedsInStore = this.getExistingSeeds(filePath); @@ -362,11 +735,12 @@ export class Wallet { iv = ivBytes.toString("hex"); } - existingSeedsInStore[data.walletId] = { + existingSeedsInStore[data.walletId!] = { seed: seedToStore, encrypted: encrypt, authTag: authTag, iv: iv, + networkId: data.networkId!, }; fs.writeFileSync(filePath, JSON.stringify(existingSeedsInStore, null, 2), "utf8"); @@ -377,10 +751,21 @@ export class Wallet { /** * Loads the seed of the Wallet from the given file. * + * @deprecated Use loadSeedFromFile() instead * @param filePath - The path of the file to load the seed from * @returns A string indicating the success of the operation */ public async loadSeed(filePath: string): Promise { + return this.loadSeedFromFile(filePath); + } + + /** + * Loads the seed of the Wallet from the given file. + * + * @param filePath - The path of the file to load the seed from + * @returns A string indicating the success of the operation + */ + public async loadSeedFromFile(filePath: string): Promise { const existingSeedsInStore = this.getExistingSeeds(filePath); if (Object.keys(existingSeedsInStore).length === 0) { throw new ArgumentError(`File ${filePath} does not contain any seed data`); @@ -432,10 +817,15 @@ export class Wallet { * * @returns The default address */ - public getDefaultAddress(): WalletAddress | undefined { - return this.addresses.find( - address => address.getId() === this.model.default_address?.address_id, - ); + public async getDefaultAddress(): Promise { + if (this.model.default_address === undefined) { + throw new Error("WalletModel default address not set"); + } + const defaultAddress = await this.getAddress(this.model.default_address.address_id); + if (!defaultAddress) { + throw new Error("Default address not found"); + } + return defaultAddress; } /** @@ -451,15 +841,16 @@ export class Wallet { * Requests funds from the faucet for the Wallet's default address and returns the faucet transaction. * This is only supported on testnet networks. * - * @throws {InternalError} If the default address is not found. + * @param assetId - The ID of the Asset to request from the faucet. + * @throws {Error} If the default address is not found. * @throws {APIError} If the request fails. * @returns The successful faucet transaction */ - public async faucet(): Promise { + public async faucet(assetId?: string): Promise { if (!this.model.default_address) { - throw new InternalError("Default address not found"); + throw new Error("Default address not found"); } - const transaction = await this.getDefaultAddress()!.faucet(); + const transaction = (await this.getDefaultAddress()).faucet(assetId); return transaction!; } @@ -471,30 +862,176 @@ export class Wallet { * @param options.amount - The amount of the Asset to send. * @param options.assetId - The ID of the Asset to send. * @param options.destination - The destination of the transfer. If a Wallet, sends to the Wallet's default address. If a String, interprets it as the address ID. - * @param options.timeoutSeconds - The maximum amount of time to wait for the Transfer to complete, in seconds. - * @param options.intervalSeconds - The interval at which to poll the Network for Transfer status, in seconds. - * @returns The hash of the Transfer transaction. + * @param options.gasless - Whether the Transfer should be gasless. Defaults to false. + * @param options.skipBatching - When true, the Transfer will be submitted immediately. Otherwise, the Transfer will be batched. Defaults to false. Note: requires gasless option to be set to true. + * @returns The created Transfer object. * @throws {APIError} if the API request to create a Transfer fails. * @throws {APIError} if the API request to broadcast a Transfer fails. - * @throws {Error} if the Transfer times out. */ - public async createTransfer({ - amount, - assetId, - destination, - timeoutSeconds = 10, - intervalSeconds = 0.2, - }: CreateTransferOptions): Promise { - if (!this.getDefaultAddress()) { - throw new InternalError("Default address not found"); - } - return await this.getDefaultAddress()!.createTransfer({ - amount, - assetId, - destination, - timeoutSeconds, - intervalSeconds, + public async createTransfer(options: CreateTransferOptions): Promise { + return (await this.getDefaultAddress()).createTransfer(options); + } + + /** + * Creates a Payload Signature. + * + * @param unsignedPayload - The Unsigned Payload to sign. + * @returns A promise that resolves to the Payload Signature object. + * @throws {APIError} if the API request to create a Payload Signature fails. + * @throws {Error} if the default address is not found. + */ + public async createPayloadSignature(unsignedPayload: string): Promise { + return (await this.getDefaultAddress()).createPayloadSignature(unsignedPayload); + } + + /** + * Creates a Webhook for a wallet, monitors all wallet addresses for onchain events. + * + * @param notificationUri - The URI to which the webhook notifications will be sent. + * + * @returns The newly created webhook instance. + */ + public async createWebhook(notificationUri: string): Promise { + const result = await Coinbase.apiClients.webhook!.createWalletWebhook(this.getId(), { + notification_uri: notificationUri, }); + + return Webhook.init(result.data); + } + + /** + * Invokes a contract with the given data. + * + * @param options - The options to invoke the contract + * @param options.contractAddress - The address of the contract the method will be invoked on. + * @param options.method - The method to invoke on the contract. + * @param options.abi - The ABI of the contract. + * @param options.args - The arguments to pass to the contract method invocation. + * The keys should be the argument names and the values should be the argument values. + * @param options.amount - The amount of the asset to send to a payable contract method. + * @param options.assetId - The ID of the asset to send to a payable contract method. + * The asset must be a denomination of the native asset. (Ex. "wei", "gwei", or "eth"). + * @returns The ContractInvocation object. + * @throws {APIError} if the API request to create a contract invocation fails. + */ + public async invokeContract( + options: CreateContractInvocationOptions, + ): Promise { + return (await this.getDefaultAddress()).invokeContract(options); + } + + /** + * Deploys an ERC20 token contract. + * + * @param options - The options for creating the ERC20 token. + * @param options.name - The name of the ERC20 token. + * @param options.symbol - The symbol of the ERC20 token. + * @param options.totalSupply - The total supply of the ERC20 token. + * @returns A Promise that resolves to the deployed SmartContract object. + * @throws {Error} If the private key is not loaded when not using server signer. + */ + public async deployToken(options: CreateERC20Options): Promise { + return (await this.getDefaultAddress()).deployToken(options); + } + + /** + * Deploys an ERC721 token contract. + * + * @param options - The options for creating the ERC721 token. + * @param options.name - The name of the ERC721 token. + * @param options.symbol - The symbol of the ERC721 token. + * @param options.baseURI - The base URI of the ERC721 token. + * @returns A Promise that resolves to the deployed SmartContract object. + * @throws {Error} If the private key is not loaded when not using server signer. + */ + public async deployNFT(options: CreateERC721Options): Promise { + return (await this.getDefaultAddress()).deployNFT(options); + } + + /** + * Deploys an ERC1155 token contract. + * + * @param options - The options for creating the ERC1155 token. + * @param options.name - The name of the ERC1155 token. + * @param options.symbol - The symbol of the ERC1155 token. + * @param options.baseURI - The base URI of the ERC1155 token. + * @returns A Promise that resolves to the deployed SmartContract object. + * @throws {Error} If the private key is not loaded when not using server signer. + */ + public async deployMultiToken(options: CreateERC1155Options): Promise { + return (await this.getDefaultAddress()).deployMultiToken(options); + } + + /** + * Deploys a custom contract. + * + * @param options - The options for creating the custom contract. + * @param options.solidityVersion - The version of the solidity compiler, must be 0.8.+, such as "0.8.28+commit.7893614a". See https://binaries.soliditylang.org/bin/list.json + * @param options.solidityInputJson - The input json for the solidity compiler. See https://docs.soliditylang.org/en/latest/using-the-compiler.html#input-description for more details. + * @param options.contractName - The name of the contract class to be deployed. + * @param options.constructorArgs - The arguments for the constructor. + * @returns A Promise that resolves to the deployed SmartContract object. + * @throws {Error} If the private key is not loaded when not using server signer. + */ + public async deployContract(options: CreateCustomContractOptions): Promise { + return (await this.getDefaultAddress()).deployContract(options); + } + + /** + * Fund the wallet from your account on the Coinbase Platform. + * + * @param options - The options to create the fund operation + * @param options.amount - The amount of the Asset to fund the wallet with + * @param options.assetId - The ID of the Asset to fund with. For Ether, eth, gwei, and wei are supported. + * @returns The created fund operation object + * @throws {Error} If the default address does not exist + */ + public async fund(options: CreateFundOptions): Promise { + const defaultAddress = await this.getDefaultAddress(); + if (!defaultAddress) { + throw new Error("Default address does not exist"); + } + + return defaultAddress.fund(options); + } + + /** + * Get a quote for funding the wallet from your Coinbase platform account. + * + * @param options - The options to create the fund quote + * @param options.amount - The amount to fund + * @param options.assetId - The ID of the Asset to fund with. For Ether, eth, gwei, and wei are supported. + * @returns The fund quote object + * @throws {Error} If the default address does not exist + */ + public async quoteFund(options: CreateQuoteOptions): Promise { + const defaultAddress = await this.getDefaultAddress(); + if (!defaultAddress) { + throw new Error("Default address does not exist"); + } + + return defaultAddress.quoteFund(options); + } + + /** + * Returns all the fund operations associated with the wallet's default address. + * + * @param options - The pagination options. + * @param options.limit - The maximum number of fund operations to return. Limit can range between 1 and 100. + * @param options.page - The cursor for pagination across multiple pages of fund operations. Don't include this parameter on the first call. Use the next page value returned in a previous response to request subsequent results. + * @returns The paginated list response of fund operations. + * @throws {Error} If the default address does not exist + */ + public async listFundOperations({ + limit = Coinbase.defaultPageLimit, + page = undefined, + }: PaginationOptions = {}): Promise> { + const defaultAddress = await this.getDefaultAddress(); + if (!defaultAddress) { + throw new Error("Default address does not exist"); + } + + return defaultAddress.listFundOperations({ limit, page }); } /** @@ -512,8 +1049,8 @@ export class Wallet { * @param seed - The seed to use for the Wallet */ private validateSeed(seed: string | undefined): void { - if (seed && seed.length !== 64) { - throw new ArgumentError("Seed must be 32 bytes"); + if (seed && seed.length !== 64 && seed.length !== 128) { + throw new ArgumentError("Seed must be 32 or 64 bytes"); } } @@ -557,16 +1094,33 @@ export class Wallet { /** * Gets the key for encrypting seed data. * + * For EC keys (PEM format), it uses crypto.diffieHellman. + * For Ed25519 keys (assumed to be a base64-encoded 64-byte string), it converts the secret key + * to an X25519 key using ed2curve. + * * @returns The encryption key. */ private getEncryptionKey(): Buffer { - const privateKey = crypto.createPrivateKey(Coinbase.apiKeyPrivateKey); - const publicKey = crypto.createPublicKey(Coinbase.apiKeyPrivateKey); - const encryptionKey = crypto.diffieHellman({ - privateKey, - publicKey, - }); - return encryptionKey; + const apiKeyPrivateKey = Coinbase.apiKeyPrivateKey; + if (apiKeyPrivateKey.startsWith("-----BEGIN")) { + // Assume EC key in PEM format. + const privateKey = crypto.createPrivateKey(apiKeyPrivateKey); + const publicKey = crypto.createPublicKey(apiKeyPrivateKey); + return crypto.diffieHellman({ privateKey, publicKey }); + } else { + // Assume Ed25519 key: a base64-encoded 64-byte string (first 32 bytes = seed, next 32 = public key) + const decoded = Buffer.from(apiKeyPrivateKey, "base64"); + if (decoded.length !== 64) { + throw new Error("Invalid Ed25519 key format"); + } + const seed = decoded.slice(0, 32); + // Convert the Ed25519 seed to an X25519 key using ed2curve. + const x25519 = ed2curve.convertSecretKey(new Uint8Array(seed)); + if (!x25519) { + throw new Error("Failed to convert Ed25519 key to X25519"); + } + return Buffer.from(x25519); + } } /** @@ -583,7 +1137,7 @@ export class Wallet { const key = this.deriveKey(index); const ethWallet = new ethers.Wallet(convertStringToHex(key.privateKey!)); if (ethWallet.address != addressModel.address_id) { - throw new InternalError(`Seed does not match wallet`); + throw new Error(`Seed does not match wallet`); } return new WalletAddress(addressModel, ethWallet); @@ -636,21 +1190,17 @@ export class Wallet { * Derives a key for an already registered Address in the Wallet. * * @param index - The index of the Address to derive. - * @throws {InternalError} - If the key derivation fails. + * @throws {Error} - If the key derivation fails. * @returns The derived key. */ private deriveKey(index: number): HDKey { if (!this.master) { - throw new InternalError("Cannot derive key for Wallet without seed loaded"); - } - const [networkPrefix] = this.model.network_id.split("-"); - // TODO: Push this logic to the backend. - if (!["base", "ethereum"].includes(networkPrefix)) { - throw new InternalError(`Unsupported network ID: ${this.model.network_id}`); + throw new Error("Cannot derive key for Wallet without seed loaded"); } + const derivedKey = this.master?.derive(this.addressPathPrefix + `/${index}`); if (!derivedKey?.privateKey) { - throw new InternalError("Failed to derive key"); + throw new Error("Failed to derive key"); } return derivedKey; } @@ -664,7 +1214,7 @@ export class Wallet { private createAttestation(key: HDKey): string { if (!key.publicKey || !key.privateKey) { /* istanbul ignore next */ - throw InternalError; + throw Error; } const publicKey = convertStringToHex(key.publicKey); diff --git a/src/coinbase/webhook.ts b/src/coinbase/webhook.ts new file mode 100644 index 00000000..9c1196ad --- /dev/null +++ b/src/coinbase/webhook.ts @@ -0,0 +1,234 @@ +import { + Webhook as WebhookModel, + WebhookEventType, + WebhookEventFilter, + WebhookEventTypeFilter, + WebhookWalletActivityFilter, +} from "../client/api"; +import { Coinbase } from "./coinbase"; +import { + CreateWebhookOptions, + UpdateWebhookOptions, + PaginationOptions, + PaginationResponse, +} from "./types"; + +/** + * A representation of a Webhook, + * which provides methods to create, list, update, and delete webhooks that are used to receive notifications of specific events. + */ +export class Webhook { + private model: WebhookModel | null; + + /** + * Initializes a new Webhook object. + * + * @param model - The underlying Webhook object. + * @throws {Error} If the model is not provided. + */ + private constructor(model: WebhookModel) { + if (!model) { + throw new Error("Webhook model cannot be empty"); + } + this.model = model; + } + + /** + * Returns a new Webhook object. Do not use this method directly. Instead, Webhook.create(...) + * + * @constructs Webhook + * @param model - The underlying Webhook model object + * @returns A Webhook object. + */ + public static init(model: WebhookModel): Webhook { + return new Webhook(model); + } + + /** + * Creates a new webhook for a specified network. + * + * @param options - The options to create webhook. + * @param options.networkId - The network ID for which the webhook is created. + * @param options.notificationUri - The URI where notifications should be sent. + * @param options.eventType - The type of event for the webhook. + * @param options.eventTypeFilter - Filter for wallet or smart contract activity event types. + * @param options.eventFilters - Filters applied to the events that determine which specific events trigger the webhook. + * @returns A promise that resolves to a new instance of Webhook. + */ + public static async create({ + networkId, + notificationUri, + eventType, + eventTypeFilter, + eventFilters = [], + }: CreateWebhookOptions): Promise { + const result = await Coinbase.apiClients.webhook!.createWebhook({ + network_id: networkId, + notification_uri: notificationUri, + event_type: eventType, + event_type_filter: eventTypeFilter, + event_filters: eventFilters, + }); + + return new Webhook(result.data); + } + + /** + * Lists the Webhooks belonging to the CDP Project. + * + * @param options - The pagination options. + * @param options.limit - The maximum number of Webhooks to return. Limit can range between 1 and 100. + * @param options.page - The cursor for pagination across multiple pages of Webhooks. Don\'t include this parameter on the first call. Use the next page value returned in a previous response to request subsequent results. + * + * @returns The paginated list response of Webhooks. + */ + public static async list({ + limit = Coinbase.defaultPageLimit, + page = undefined, + }: PaginationOptions = {}): Promise> { + const data: Webhook[] = []; + let nextPage: string | undefined; + + const response = await Coinbase.apiClients.webhook!.listWebhooks(limit, page); + + const webhooks = response.data.data; + for (const w of webhooks) { + data.push(new Webhook(w)); + } + + const hasMore: boolean = response.data.has_more ? response.data.has_more : false; + + if (hasMore) { + if (response.data.next_page) { + nextPage = response.data.next_page; + } + } + + return { + data, + hasMore, + nextPage, + }; + } + + /** + * Returns the ID of the webhook. + * + * @returns The ID of the webhook, or undefined if the model is null. + */ + public getId(): string | undefined { + return this.model?.id; + } + + /** + * Returns the network ID associated with the webhook. + * + * @returns The network ID of the webhook, or undefined if the model is null. + */ + public getNetworkId(): string | undefined { + return this.model?.network_id; + } + + /** + * Returns the notification URI of the webhook. + * + * @returns The URI where notifications are sent, or undefined if the model is null. + */ + public getNotificationURI(): string | undefined { + return this.model?.notification_uri; + } + + /** + * Returns the event type of the webhook. + * + * @returns The type of event the webhook listens for, or undefined if the model is null. + */ + public getEventType(): WebhookEventType | undefined { + return this.model?.event_type; + } + + /** + * Returns the event type filter of the webhook. + * + * @returns The filter which will be used to filter for events of a certain event type + */ + public getEventTypeFilter(): WebhookEventTypeFilter | undefined { + return this.model?.event_type_filter; + } + + /** + * Returns the event filters applied to the webhook. + * + * @returns An array of event filters used by the webhook, or undefined if the model is null. + */ + public getEventFilters(): Array | undefined { + return this.model?.event_filters; + } + + /** + * Returns the signature header of the webhook. + * + * @returns The signature header which will be set on the callback requests, or undefined if the model is null. + */ + public getSignatureHeader(): string | undefined { + return this.model?.signature_header; + } + + /** + * Updates the webhook with a new notification URI, and optionally a new list of addresses to monitor. + * + * @param options - The options to update webhook. + * @param options.notificationUri - The new URI for webhook notifications. + * @param options.eventTypeFilter - The new eventTypeFilter that contains a new list (replacement) of addresses to monitor for the webhook. + * @returns A promise that resolves to the updated Webhook object. + */ + public async update({ + notificationUri, + eventTypeFilter, + }: UpdateWebhookOptions): Promise { + const finalNotificationUri = notificationUri ?? this.getNotificationURI(); + const finalEventTypeFilter = eventTypeFilter ?? this.getEventTypeFilter(); + + // wallet ID is required for wallet activity event type filter, but we do not support updating it just yet, this will be added in the future + if (this.getEventType() === WebhookEventType.WalletActivity) { + (finalEventTypeFilter as WebhookWalletActivityFilter).wallet_id = ( + (this.getEventTypeFilter() as WebhookWalletActivityFilter)?.wallet_id + ); + } + + const result = await Coinbase.apiClients.webhook!.updateWebhook(this.getId()!, { + notification_uri: finalNotificationUri, + event_filters: this.getEventFilters()!, + event_type_filter: finalEventTypeFilter, + }); + + this.model = result.data; + + return this; + } + + /** + * Deletes the webhook. + * + * @returns A promise that resolves when the webhook is deleted and its attributes are set to null. + */ + public async delete(): Promise { + await Coinbase.apiClients.webhook!.deleteWebhook(this.getId()!); + + this.model = null; + } + + /** + * Returns a String representation of the Webhook. + * + * @returns A String representation of the Webhook. + */ + public toString(): string { + return ( + `Webhook { id: '${this.getId()}', networkId: '${this.getNetworkId()}', ` + + `eventType: '${this.getEventType()}', eventFilter: ${JSON.stringify(this.getEventFilters())}, ` + + `eventTypeFilter: ${JSON.stringify(this.getEventTypeFilter())}, ` + + `notificationUri: '${this.getNotificationURI()}', signatureHeader: '${this.getSignatureHeader()}' }` + ); + } +} diff --git a/src/examples/create_wallet.js b/src/examples/create_wallet.js deleted file mode 100644 index 4a11e68f..00000000 --- a/src/examples/create_wallet.js +++ /dev/null @@ -1,18 +0,0 @@ -const { Coinbase } = require("@coinbase/coinbase-sdk"); - -async function createWallet() { - const coinbase = Coinbase.configureFromJson({ filePath: "~/Downloads/cdp_api_key.json" }); - console.log("Coinbase SDK has been successfully configured with CDP API key."); - - const user = await coinbase.getDefaultUser(); - console.log(user); - - // Create a Wallet for the user - const wallet = await user.createWallet(); - - // Wallets come with a single default address, accessible via getDefaultAddress: - const address = await wallet.getDefaultAddress(); - console.log(address.toString()); -} - -createWallet(); diff --git a/src/examples/fund_wallet.js b/src/examples/fund_wallet.js deleted file mode 100644 index cba68316..00000000 --- a/src/examples/fund_wallet.js +++ /dev/null @@ -1,13 +0,0 @@ -const { Coinbase } = require("@coinbase/coinbase-sdk"); - -async function fundWallet() { - const coinbase = Coinbase.configureFromJson({ filePath: "~/Downloads/cdp_api_key.json" }); - const user = await coinbase.getDefaultUser(); - const wallet = await user.createWallet(); - - // Fund the wallet with a faucet transaction. - const faucetTransaction = await wallet.faucet(); - console.log(`Faucet transaction successfully completed: `, faucetTransaction.toString()); -} - -fundWallet(); diff --git a/src/examples/trade_assets.js b/src/examples/trade_assets.js deleted file mode 100644 index 801207b4..00000000 --- a/src/examples/trade_assets.js +++ /dev/null @@ -1,15 +0,0 @@ -const { Coinbase } = require("@coinbase/coinbase-sdk"); - -async function tradeAssets() { - const coinbase = Coinbase.configureFromJson({ filePath: "~/Downloads/cdp_api_key.json" }); - const user = await coinbase.getDefaultUser(); - // Create a wallet on base-mainnet to trade assets with. - const wallet = await user.createWallet({ networkId: Coinbase.networks.BaseMainnet }); - - // Fund the wallet's default address with ETH from an external source. - // Trade 0.00001 ETH to USDC - const trade = await wallet.createTrade(0.00001, Coinbase.assets.Eth, Coinbase.assets.Usdc); - console.log(`Trade successfully completed: `, trade.toString()); -} - -tradeAssets(); diff --git a/src/examples/transfer_funds.js b/src/examples/transfer_funds.js deleted file mode 100644 index 0e8402a1..00000000 --- a/src/examples/transfer_funds.js +++ /dev/null @@ -1,21 +0,0 @@ -const { Coinbase } = require("@coinbase/coinbase-sdk"); - -async function transferFunds() { - const coinbase = Coinbase.configureFromJson({ filePath: "~/Downloads/cdp_api_key.json" }); - const user = await coinbase.getDefaultUser(); - const wallet = await user.createWallet(); - - // Create a new Wallet to transfer funds to. - const anotherWallet = await user.createWallet(); - - // Then, we can transfer 0.00001 ETH out of the Wallet to another Wallet. - // The wallet object should have funds to create a transfer. - const transfer = await wallet.createTransfer({ - amount: 0.00001, - assetId: Coinbase.assets.Eth, - destination: anotherWallet, - }); - console.log(`Transfer successfully completed: `, transfer.toString()); -} - -transferFunds(); diff --git a/src/index.ts b/src/index.ts index 1d12eeeb..c1c9f288 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,19 +1,40 @@ -export * from "./coinbase/coinbase"; -export * from "./coinbase/wallet"; export * from "./coinbase/address"; +export * from "./coinbase/address/external_address"; +export * from "./coinbase/address/wallet_address"; +export * from "./coinbase/api_error"; export * from "./coinbase/asset"; +export * from "./coinbase/authenticator"; export * from "./coinbase/balance"; export * from "./coinbase/balance_map"; +export * from "./coinbase/coinbase"; export * from "./coinbase/constants"; +export * from "./coinbase/contract_event"; +export * from "./coinbase/contract_invocation"; export * from "./coinbase/errors"; export * from "./coinbase/faucet_transaction"; +export * from "./coinbase/hash"; +export * from "./coinbase/historical_balance"; +export * from "./coinbase/payload_signature"; export * from "./coinbase/server_signer"; +export * from "./coinbase/smart_contract"; +export * from "./coinbase/staking_balance"; +export * from "./coinbase/staking_operation"; +export * from "./coinbase/staking_reward"; export * from "./coinbase/trade"; export * from "./coinbase/transaction"; export * from "./coinbase/transfer"; export * from "./coinbase/types"; -export * from "./coinbase/user"; -export * from "./coinbase/address/external_address"; -export * from "./coinbase/address/wallet_address"; -export * from "./coinbase/staking_operation"; -export * from "./coinbase/staking_reward"; +export * from "./coinbase/validator"; +export * from "./coinbase/wallet"; +export * from "./coinbase/webhook"; +export * from "./coinbase/read_contract"; +export * from "./coinbase/crypto_amount"; +export * from "./coinbase/fiat_amount"; +export * from "./coinbase/fund_operation"; +export * from "./coinbase/fund_quote"; +export * from "./types/chain"; +export * from "./wallets/types"; +export * from "./wallets/createSmartWallet"; +export * from "./wallets/toSmartWallet"; +export * from "./actions/sendUserOperation"; +export * from "./actions/waitForUserOperation"; diff --git a/src/tests/address_reputation_test.ts b/src/tests/address_reputation_test.ts new file mode 100644 index 00000000..71cac006 --- /dev/null +++ b/src/tests/address_reputation_test.ts @@ -0,0 +1,96 @@ +import { AddressReputation } from "../coinbase/address_reputation"; + +describe("AddressReputation", () => { + let addressReputation: AddressReputation; + + beforeEach(() => { + addressReputation = new AddressReputation({ + score: -90, + metadata: { + unique_days_active: 1, + total_transactions: 1, + token_swaps_performed: 1, + bridge_transactions_performed: 1, + smart_contract_deployments: 1, + longest_active_streak: 1, + lend_borrow_stake_transactions: 1, + ens_contract_interactions: 1, + current_active_streak: 1, + activity_period_days: 1, + }, + }); + }); + + it("returns the score", () => { + expect(addressReputation.score).toBe(-90); + }); + + it("returns the metadata", () => { + expect(addressReputation.metadata).toEqual({ + unique_days_active: 1, + total_transactions: 1, + token_swaps_performed: 1, + bridge_transactions_performed: 1, + smart_contract_deployments: 1, + longest_active_streak: 1, + lend_borrow_stake_transactions: 1, + ens_contract_interactions: 1, + current_active_streak: 1, + activity_period_days: 1, + }); + }); + + it("returns the string representation of the address reputation", () => { + expect(addressReputation.toString()).toBe( + "AddressReputation(score: -90, metadata: {unique_days_active: 1, total_transactions: 1, token_swaps_performed: 1, bridge_transactions_performed: 1, smart_contract_deployments: 1, longest_active_streak: 1, lend_borrow_stake_transactions: 1, ens_contract_interactions: 1, current_active_streak: 1, activity_period_days: 1})", + ); + }); + + it("should throw an error for an empty model", () => { + expect(() => new AddressReputation(null!)).toThrow("Address reputation model cannot be empty"); + }); + + describe("#risky", () => { + it("returns the risky as true for score < 0", () => { + expect(addressReputation.risky).toBe(true); + }); + + it("should return risky as false for a score > 0", () => { + addressReputation = new AddressReputation({ + score: 90, + metadata: { + unique_days_active: 1, + total_transactions: 1, + token_swaps_performed: 1, + bridge_transactions_performed: 1, + smart_contract_deployments: 1, + longest_active_streak: 1, + lend_borrow_stake_transactions: 1, + ens_contract_interactions: 1, + current_active_streak: 1, + activity_period_days: 1, + }, + }); + expect(addressReputation.risky).toBe(false); + }); + + it("should return risky as false for a score=0", () => { + addressReputation = new AddressReputation({ + score: 0, + metadata: { + unique_days_active: 1, + total_transactions: 1, + token_swaps_performed: 1, + bridge_transactions_performed: 1, + smart_contract_deployments: 1, + longest_active_streak: 1, + lend_borrow_stake_transactions: 1, + ens_contract_interactions: 1, + current_active_streak: 1, + activity_period_days: 1, + }, + }); + expect(addressReputation.risky).toBe(false); + }); + }); +}); diff --git a/src/tests/address_test.ts b/src/tests/address_test.ts index 1306a343..858a26df 100644 --- a/src/tests/address_test.ts +++ b/src/tests/address_test.ts @@ -1,7 +1,22 @@ -import { Address } from "../coinbase/address"; -import { VALID_ADDRESS_MODEL } from "./utils"; +import { Coinbase } from "../coinbase/coinbase"; +import { Address, TransactionStatus } from "../index"; +import { AddressHistoricalBalanceList, AddressTransactionList, AddressReputation } from "../client"; +import { + VALID_ADDRESS_MODEL, + mockReturnValue, + newAddressModel, + balanceHistoryApiMock, + transactionHistoryApiMock, + reputationApiMock, +} from "./utils"; +import Decimal from "decimal.js"; +import { randomUUID } from "crypto"; describe("Address", () => { + const newAddress = newAddressModel("", randomUUID(), Coinbase.networks.EthereumHoodi); + + const address = new Address(newAddress.network_id, newAddress.address_id); + describe(".getNetworkId", () => { it("should get the network ID", () => { const address = new Address(VALID_ADDRESS_MODEL.network_id, VALID_ADDRESS_MODEL.address_id); @@ -22,4 +37,282 @@ describe("Address", () => { ); }); }); + + describe("#listTransactions", () => { + beforeEach(() => { + const mockTransactionsResponse: AddressTransactionList = { + data: [ + { + network_id: "base-sepolia", + from_address_id: "from_address", + block_hash: "0x0dadd465fb063ceb78babbb30abbc6bfc0730d0c57a53e8f6dc778dafcea568f", + block_height: "12345", + unsigned_payload: "", + status: TransactionStatus.COMPLETE, + }, + { + network_id: "base-sepolia", + from_address_id: "from_address_1", + block_hash: "block_hash", + block_height: "12348", + unsigned_payload: "", + status: TransactionStatus.FAILED, + }, + ], + has_more: true, + next_page: "pageToken", + }; + Coinbase.apiClients.transactionHistory = transactionHistoryApiMock; + Coinbase.apiClients.transactionHistory!.listAddressTransactions = + mockReturnValue(mockTransactionsResponse); + }); + + it("should return results with param", async () => { + const paginationResponse = await address.listTransactions({ limit: 2, page: "page" }); + const transactions = paginationResponse.data; + expect(transactions.length).toEqual(2); + expect(transactions[0].blockHeight()).toEqual("12345"); + expect(Coinbase.apiClients.transactionHistory!.listAddressTransactions).toHaveBeenCalledTimes( + 1, + ); + expect(Coinbase.apiClients.transactionHistory!.listAddressTransactions).toHaveBeenCalledWith( + address.getNetworkId(), + address.getId(), + 2, + "page", + ); + expect(paginationResponse.nextPage).toEqual("pageToken"); + }); + + it("should return results without param", async () => { + Coinbase.apiClients.transactionHistory!.listAddressTransactions = mockReturnValue({ + data: [ + { + network_id: "base-sepolia", + from_address_id: "from_address_1", + block_hash: "block_hash", + block_height: "12348", + unsigned_payload: "", + status: TransactionStatus.COMPLETE, + }, + ], + has_more: false, + next_page: "", + }); + const paginationResponse = await address.listTransactions(); + const transactions = paginationResponse.data; + expect(transactions.length).toEqual(1); + expect(transactions[0].blockHeight()).toEqual("12348"); + expect(Coinbase.apiClients.transactionHistory!.listAddressTransactions).toHaveBeenCalledTimes( + 1, + ); + expect(Coinbase.apiClients.transactionHistory!.listAddressTransactions).toHaveBeenCalledWith( + address.getNetworkId(), + address.getId(), + Coinbase.defaultPageLimit, + undefined, + ); + expect(paginationResponse.nextPage).toBe(undefined); + }); + + it("should return empty if no transactions found", async () => { + Coinbase.apiClients.transactionHistory!.listAddressTransactions = mockReturnValue({ + data: [], + has_more: false, + next_page: "", + }); + const paginationResponse = await address.listTransactions(); + const transactions = paginationResponse.data; + expect(transactions.length).toEqual(0); + expect(Coinbase.apiClients.transactionHistory!.listAddressTransactions).toHaveBeenCalledTimes( + 1, + ); + expect(Coinbase.apiClients.transactionHistory!.listAddressTransactions).toHaveBeenCalledWith( + address.getNetworkId(), + address.getId(), + Coinbase.defaultPageLimit, + undefined, + ); + expect(paginationResponse.nextPage).toBe(undefined); + }); + }); + + describe(".listHistoricalBalance", () => { + beforeEach(() => { + const mockHistoricalBalanceResponse: AddressHistoricalBalanceList = { + data: [ + { + amount: "1000000", + block_hash: "0x0dadd465fb063ceb78babbb30abbc6bfc0730d0c57a53e8f6dc778dafcea568f", + block_height: "12345", + asset: { + asset_id: "usdc", + network_id: Coinbase.networks.EthereumHoodi, + decimals: 6, + }, + }, + { + amount: "5000000", + block_hash: "0x5c05a37dcb4910b22a775fc9480f8422d9d615ad7a6a0aa9d8778ff8cc300986", + block_height: "67890", + asset: { + asset_id: "usdc", + network_id: Coinbase.networks.EthereumHoodi, + decimals: 6, + }, + }, + ], + has_more: false, + next_page: "", + }; + Coinbase.apiClients.balanceHistory = balanceHistoryApiMock; + Coinbase.apiClients.balanceHistory!.listAddressHistoricalBalance = mockReturnValue( + mockHistoricalBalanceResponse, + ); + }); + + it("should return results with USDC historical balance with limit", async () => { + const paginationResponse = await address.listHistoricalBalances(Coinbase.assets.Usdc); + const historicalBalances = paginationResponse.data; + expect(historicalBalances.length).toEqual(2); + expect(historicalBalances[0].amount).toEqual(new Decimal(1)); + expect(historicalBalances[1].amount).toEqual(new Decimal(5)); + expect( + Coinbase.apiClients.balanceHistory!.listAddressHistoricalBalance, + ).toHaveBeenCalledTimes(1); + expect(Coinbase.apiClients.balanceHistory!.listAddressHistoricalBalance).toHaveBeenCalledWith( + address.getNetworkId(), + address.getId(), + Coinbase.assets.Usdc, + 100, + undefined, + ); + expect(paginationResponse.nextPage).toBe(undefined); + }); + + it("should return results with USDC historical balance with page", async () => { + const paginationResponse = await address.listHistoricalBalances(Coinbase.assets.Usdc, { + page: "page_token", + }); + const historicalBalances = paginationResponse.data; + expect(historicalBalances.length).toEqual(2); + expect(historicalBalances[0].amount).toEqual(new Decimal(1)); + expect(historicalBalances[1].amount).toEqual(new Decimal(5)); + expect( + Coinbase.apiClients.balanceHistory!.listAddressHistoricalBalance, + ).toHaveBeenCalledTimes(1); + expect(Coinbase.apiClients.balanceHistory!.listAddressHistoricalBalance).toHaveBeenCalledWith( + address.getNetworkId(), + address.getId(), + Coinbase.assets.Usdc, + Coinbase.defaultPageLimit, + "page_token", + ); + expect(paginationResponse.nextPage).toBe(undefined); + }); + + it("should return empty if no historical balance found", async () => { + Coinbase.apiClients.balanceHistory!.listAddressHistoricalBalance = mockReturnValue({ + data: [], + has_more: false, + next_page: "", + }); + const paginationResponse = await address.listHistoricalBalances(Coinbase.assets.Usdc); + const historicalBalances = paginationResponse.data; + expect(historicalBalances.length).toEqual(0); + expect( + Coinbase.apiClients.balanceHistory!.listAddressHistoricalBalance, + ).toHaveBeenCalledTimes(1); + expect(Coinbase.apiClients.balanceHistory!.listAddressHistoricalBalance).toHaveBeenCalledWith( + address.getNetworkId(), + address.getId(), + Coinbase.assets.Usdc, + 100, + undefined, + ); + expect(paginationResponse.nextPage).toBe(undefined); + }); + + it("should return results with USDC historical balance and next page", async () => { + Coinbase.apiClients.balanceHistory!.listAddressHistoricalBalance = mockReturnValue({ + data: [ + { + amount: "5000000", + block_hash: "0x5c05a37dcb4910b22a775fc9480f8422d9d615ad7a6a0aa9d8778ff8cc300986", + block_height: "67890", + asset: { + asset_id: "usdc", + network_id: Coinbase.networks.EthereumHoodi, + decimals: 6, + }, + }, + ], + has_more: true, + next_page: "next page", + }); + + const paginationResponse = await address.listHistoricalBalances(Coinbase.assets.Usdc, { + limit: 1, + }); + const historicalBalances = paginationResponse.data; + expect(historicalBalances.length).toEqual(1); + expect(historicalBalances[0].amount).toEqual(new Decimal(5)); + expect( + Coinbase.apiClients.balanceHistory!.listAddressHistoricalBalance, + ).toHaveBeenCalledTimes(1); + expect(Coinbase.apiClients.balanceHistory!.listAddressHistoricalBalance).toHaveBeenCalledWith( + address.getNetworkId(), + address.getId(), + Coinbase.assets.Usdc, + 1, + undefined, + ); + expect(paginationResponse.nextPage).toEqual("next page"); + }); + }); + + describe("#reputation", () => { + beforeEach(() => { + const mockReputationResponse: AddressReputation = { + score: 90, + metadata: { + activity_period_days: 1, + bridge_transactions_performed: 1, + current_active_streak: 1, + ens_contract_interactions: 2, + lend_borrow_stake_transactions: 3, + longest_active_streak: 4, + smart_contract_deployments: 5, + token_swaps_performed: 6, + total_transactions: 7, + unique_days_active: 8, + }, + }; + Coinbase.apiClients.addressReputation = reputationApiMock; + Coinbase.apiClients.addressReputation!.getAddressReputation = + mockReturnValue(mockReputationResponse); + }); + + it("should return address reputation", async () => { + const reputation = await address.reputation(); + expect(reputation.score).toEqual(90); + expect(reputation.metadata).toEqual({ + activity_period_days: 1, + bridge_transactions_performed: 1, + current_active_streak: 1, + ens_contract_interactions: 2, + lend_borrow_stake_transactions: 3, + longest_active_streak: 4, + smart_contract_deployments: 5, + token_swaps_performed: 6, + total_transactions: 7, + unique_days_active: 8, + }); + expect(Coinbase.apiClients.addressReputation!.getAddressReputation).toHaveBeenCalledTimes(1); + expect(Coinbase.apiClients.addressReputation!.getAddressReputation).toHaveBeenCalledWith( + address.getNetworkId(), + address.getId(), + ); + }); + }); }); diff --git a/src/tests/api_error_test.ts b/src/tests/api_error_test.ts index 70ba5012..0840b9ce 100644 --- a/src/tests/api_error_test.ts +++ b/src/tests/api_error_test.ts @@ -34,7 +34,8 @@ describe("APIError", () => { expect(apiError.httpCode).toBeNull(); expect(apiError.apiCode).toBeNull(); expect(apiError.apiMessage).toBeNull(); - expect(apiError.toString()).toBe("APIError{httpCode: null, apiCode: null, apiMessage: null}"); + expect(apiError.correlationId).toBeNull(); + expect(apiError.toString()).toBe("APIError{}"); }); test("should create APIError with response data", () => { @@ -44,6 +45,7 @@ describe("APIError", () => { data: { code: "invalid_wallet_id", message: "Invalid wallet ID", + correlation_id: "123", }, }, } as AxiosError; @@ -53,8 +55,9 @@ describe("APIError", () => { expect(apiError.httpCode).toBe(400); expect(apiError.apiCode).toBe("invalid_wallet_id"); expect(apiError.apiMessage).toBe("Invalid wallet ID"); + expect(apiError.correlationId).toBe("123"); expect(apiError.toString()).toBe( - "APIError{httpCode: 400, apiCode: invalid_wallet_id, apiMessage: Invalid wallet ID}", + "APIError{httpCode: 400, apiCode: invalid_wallet_id, apiMessage: Invalid wallet ID, correlationId: 123}", ); }); diff --git a/src/tests/asset_test.ts b/src/tests/asset_test.ts index 7b266acd..cebd5bee 100644 --- a/src/tests/asset_test.ts +++ b/src/tests/asset_test.ts @@ -1,3 +1,4 @@ +import Decimal from "decimal.js"; import { Coinbase } from "../coinbase/coinbase"; import { GWEI_DECIMALS } from "../coinbase/constants"; import { Asset } from "./../coinbase/asset"; @@ -23,30 +24,60 @@ describe("Asset", () => { }); describe("when the asset_id is gwei", () => { - it("should set the decimals to 9", () => { + it("should set the decimals to 9 and assetId to gwei", () => { const model = { asset_id: "eth", network_id: Coinbase.networks.BaseSepolia, contract_address: "0x", decimals: 18, }; - expect(Asset.fromModel(model, Coinbase.assets.Gwei).decimals).toEqual(GWEI_DECIMALS); + const asset = Asset.fromModel(model, Coinbase.assets.Gwei); + expect(asset.decimals).toEqual(GWEI_DECIMALS); + expect(asset.getAssetId()).toEqual("gwei"); }); }); describe("when the asset_id is wei", () => { - it("should set the decimals to 0", () => { + it("should set the decimals to 0 and assetId to wei", () => { const model = { asset_id: "eth", network_id: Coinbase.networks.BaseSepolia, contract_address: "0x", decimals: 18, }; - expect(Asset.fromModel(model, Coinbase.assets.Wei).decimals).toEqual(0); + const asset = Asset.fromModel(model, Coinbase.assets.Wei); + expect(asset.decimals).toEqual(0); + expect(asset.getAssetId()).toEqual("wei"); + }); + }); + describe("when the asset_id is not checksummed", () => { + it("should return the model with non-checksummed assetId", () => { + const nonChecksummedAssetId = "0x8309fbdf021edf768dc13195741940ba544dea98"; + const model = { + asset_id: "0x8309fbdF021eDF768DC13195741940ba544dEa98", + network_id: Coinbase.networks.BaseMainnet, + contract_address: "0x8309fbdF021eDF768DC13195741940ba544dEa98", + decimals: 18, + }; + const asset = Asset.fromModel(model, nonChecksummedAssetId); + expect(asset.getAssetId()).toEqual("0x8309fbdf021edf768dc13195741940ba544dea98"); + }); + }); + describe("when the asset_id is checksummed", () => { + it("should return the model with checksummed assetId", () => { + const checksummedAssetId = "0x8309fbdF021eDF768DC13195741940ba544dEa98"; + const model = { + asset_id: "0x8309fbdF021eDF768DC13195741940ba544dEa98", + network_id: Coinbase.networks.BaseMainnet, + contract_address: "0x8309fbdF021eDF768DC13195741940ba544dEa98", + decimals: 18, + }; + const asset = Asset.fromModel(model, checksummedAssetId); + expect(asset.getAssetId()).toEqual(checksummedAssetId); }); }); }); - describe(".toString", () => { + describe("#toString", () => { it("should return the assetId", () => { const asset = Asset.fromModel({ asset_id: "eth", @@ -75,4 +106,29 @@ describe("Asset", () => { }); }); }); + + describe("#toAtomicAmount", () => { + it("should return the atomic amount", () => { + const asset = Asset.fromModel({ + asset_id: "eth", + network_id: Coinbase.networks.BaseSepolia, + contract_address: "contractAddress", + decimals: 18, + }); + const atomicAmount = asset.toAtomicAmount(new Decimal(1.23)); + expect(atomicAmount).toEqual(BigInt(1230000000000000000)); + }); + + it("should handle large numbers without using scientific notation", () => { + const asset = Asset.fromModel({ + asset_id: "eth", + network_id: Coinbase.networks.BaseSepolia, + contract_address: "contractAddress", + decimals: 18, + }); + const atomicAmount = asset.toAtomicAmount(new Decimal(2000)); + expect(atomicAmount).toEqual(BigInt(2000000000000000000000)); + expect(atomicAmount.toString()).not.toContain("e"); + }); + }); }); diff --git a/src/tests/authenticator_test.ts b/src/tests/authenticator_test.ts index 885d1cf0..dff8a99b 100644 --- a/src/tests/authenticator_test.ts +++ b/src/tests/authenticator_test.ts @@ -1,39 +1,42 @@ import { AxiosHeaders } from "axios"; import { CoinbaseAuthenticator } from "../coinbase/authenticator"; -import { JWK, JWS } from "node-jose"; -import { InvalidAPIKeyFormat } from "../coinbase/errors"; +import { importPKCS8, SignJWT, importJWK } from "jose"; +import { InvalidAPIKeyFormatError } from "../coinbase/errors"; +import * as crypto from "crypto"; const VALID_CONFIG = { method: "GET", - url: "https://api.cdp.coinbase.com/platform/v1/users/me", + url: "https://api.cdp.coinbase.com/platform/v1/networks/base-mainnet", headers: {} as AxiosHeaders, }; describe("Authenticator tests", () => { const filePath = "./config/test_api_key.json"; - // eslint-disable-next-line @typescript-eslint/no-var-requires const keys = require(filePath); - const authenticator = new CoinbaseAuthenticator(keys.name, keys.privateKey); - let instance; - let privateKey; - let apiKey; + let authenticator: CoinbaseAuthenticator; + let source: string; + let sourceVersion: string | undefined; + let privateKey: string; + let apiKey: string; beforeEach(() => { - privateKey = "mockPrivateKey"; + // Use a dummy PEM string for testing (its contents are not really parsed because we override extractPemKey below) + privateKey = "-----BEGIN EC PRIVATE KEY-----\nMOCK_KEY\n-----END EC PRIVATE KEY-----"; apiKey = "mockApiKey"; - instance = new CoinbaseAuthenticator(privateKey, apiKey); - instance.extractPemKey = jest.fn().mockReturnValue("mockPemPrivateKey"); - instance.nonce = jest.fn().mockReturnValue("mockNonce"); + source = "mockSource"; + sourceVersion = undefined; + jest.spyOn(console, "log").mockImplementation(() => {}); + // Use the key from config for instantiation (could be a real valid key) + authenticator = new CoinbaseAuthenticator(keys.name, keys.privateKey, source, sourceVersion); }); it("should raise InvalidConfiguration error for invalid config", async () => { const invalidConfig = { method: "GET", - url: "https://api.cdp.coinbase.com/platform/v1/users/me", + url: "", // Invalid URL headers: {} as AxiosHeaders, }; - const authenticator = new CoinbaseAuthenticator("api_key", "private_key"); await expect(authenticator.authenticateRequest(invalidConfig)).rejects.toThrow(); }); @@ -41,39 +44,201 @@ describe("Authenticator tests", () => { const config = await authenticator.authenticateRequest(VALID_CONFIG, true); const token = config.headers?.Authorization as string; expect(token).toContain("Bearer "); - expect(token?.length).toBeGreaterThan(100); + expect(token.length).toBeGreaterThan(100); }); - it("invalid pem key should raise an InvalidAPIKeyFormat error", async () => { - const invalidAuthenticator = new CoinbaseAuthenticator("test-key", "-----BEGIN EC KEY-----\n"); - expect(invalidAuthenticator.authenticateRequest(VALID_CONFIG)).rejects.toThrow(); + it("includes a correlation context header", async () => { + const config = await authenticator.authenticateRequest(VALID_CONFIG, true); + const correlationContext = config.headers["Correlation-Context"] as string; + expect(correlationContext).toContain(",sdk_language=typescript,source=mockSource"); + expect(correlationContext).not.toContain("source_version"); }); - test("should throw error if private key cannot be parsed", async () => { - jest.spyOn(JWK, "asKey").mockRejectedValue(new Error("Invalid key")); + describe("when a source version is provided", () => { + beforeAll(() => { + sourceVersion = "1.0.0"; + }); + afterAll(() => { + sourceVersion = undefined; + }); + + it("includes the source version in the correlation context", async () => { + const config = await authenticator.authenticateRequest(VALID_CONFIG, true); + const correlationContext = config.headers["Correlation-Context"] as string; + expect(correlationContext).toContain( + "sdk_version=0.25.0,sdk_language=typescript,source=mockSource", + ); + }); + }); - await expect(instance.buildJWT("https://example.com")).rejects.toThrow(InvalidAPIKeyFormat); - await expect(instance.buildJWT("https://example.com")).rejects.toThrow( - "Could not parse the private key", + it("invalid pem key should raise an InvalidAPIKeyFormat error", async () => { + // Passing an invalid PEM that does not match the expected format. + const invalidAuthenticator = new CoinbaseAuthenticator( + "test-key", + "-----BEGIN EC KEY-----\n", // intentionally invalid + source, ); + await expect(invalidAuthenticator.authenticateRequest(VALID_CONFIG)).rejects.toThrow(); + }); + + describe("#buildJWT", () => { + let instance: CoinbaseAuthenticator; + + beforeEach(() => { + instance = new CoinbaseAuthenticator(apiKey, privateKey, source); + // Override private methods using a type cast. + (instance as any).extractPemKey = jest + .fn() + .mockReturnValue("-----BEGIN EC PRIVATE KEY-----\nMOCK_KEY\n-----END EC PRIVATE KEY-----"); + (instance as any).nonce = jest.fn().mockReturnValue("mockNonce"); + }); + + test("should throw error if private key cannot be parsed", async () => { + // Pass an invalid PEM so that createPrivateKey fails naturally. + const invalidInstance = new CoinbaseAuthenticator( + apiKey, + "-----BEGIN EC PRIVATE KEY-----\nINVALID\n-----END EC PRIVATE KEY-----", + source, + ); + await expect(invalidInstance.buildJWT("https://example.com")).rejects.toThrow( + InvalidAPIKeyFormatError, + ); + await expect(invalidInstance.buildJWT("https://example.com")).rejects.toThrow( + "Could not convert the EC private key to PKCS8 format", + ); + }); + + test("should throw error if key import fails", async () => { + // Spy on importPKCS8 to simulate a key import failure. + const joseModule = require("jose"); + const spy = jest.spyOn(joseModule, "importPKCS8").mockImplementation(async () => { + throw new Error("Import error"); + }); + await expect(instance.buildJWT("https://example.com")).rejects.toThrow( + InvalidAPIKeyFormatError, + ); + await expect(instance.buildJWT("https://example.com")).rejects.toThrow( + "Could not convert the EC private key to PKCS8 format", + ); + spy.mockRestore(); + }); + + test("should throw error if JWT signing fails", async () => { + const joseModule = require("jose"); + jest.spyOn(joseModule, "importPKCS8").mockResolvedValue({} as any); + const spy = jest + .spyOn(SignJWT.prototype, "sign") + .mockRejectedValue(new Error("Signing error")); + await expect(instance.buildJWT("https://example.com")).rejects.toThrow( + InvalidAPIKeyFormatError, + ); + await expect(instance.buildJWT("https://example.com")).rejects.toThrow( + "Could not convert the EC private key to PKCS8 format", + ); + spy.mockRestore(); + }); }); +}); - test("should throw error if key type is not EC", async () => { - const mockKey = { kty: "RSA" }; - jest.spyOn(JWK, "asKey").mockResolvedValue(mockKey as any); +describe("Authenticator tests for Edwards key", () => { + const filePath = "./config/test_ed25519_api_key.json"; + const keys = require(filePath); + let authenticator: CoinbaseAuthenticator; + let source: string; + let sourceVersion: string | undefined; + let privateKey: string; + let apiKey: string; - await expect(instance.buildJWT("https://example.com")).rejects.toThrow(InvalidAPIKeyFormat); + beforeEach(() => { + // Use the Edwards key from config (a valid Base64-encoded 64-byte string) + privateKey = keys.privateKey; + apiKey = keys.name; + source = "mockSource"; + sourceVersion = undefined; + jest.spyOn(console, "log").mockImplementation(() => {}); + authenticator = new CoinbaseAuthenticator(apiKey, privateKey, source, sourceVersion); }); - test("should throw error if JWT signing fails", async () => { - const mockKey = { kty: "EC" }; - jest.spyOn(JWK, "asKey").mockResolvedValue(mockKey as any); - const mockSign = { - update: jest.fn().mockReturnThis(), - final: jest.fn().mockRejectedValue(new Error("Signing error")), + it("should raise InvalidConfiguration error for invalid config", async () => { + const invalidConfig = { + method: "GET", + url: "", + headers: {} as AxiosHeaders, }; - jest.spyOn(JWS, "createSign").mockReturnValue(mockSign as any); + await expect(authenticator.authenticateRequest(invalidConfig)).rejects.toThrow(); + }); + + describe("With a valid JWT and correct correlation context header", () => { + beforeEach(() => { + // Override SignJWT.prototype.sign to simulate successful signing. + jest.spyOn(SignJWT.prototype, "sign").mockResolvedValue("dummy.jwt.token"); + (authenticator as any).nonce = jest.fn().mockReturnValue("mockNonce"); + }); + afterEach(() => { + (SignJWT.prototype.sign as jest.Mock).mockRestore(); + }); + + it("should return a valid signature", async () => { + const config = await authenticator.authenticateRequest(VALID_CONFIG, true); + const token = config.headers?.Authorization as string; + expect(token).toContain("Bearer "); + expect(token.length).toBeGreaterThan(10); + }); + + it("includes a correlation context header", async () => { + const config = await authenticator.authenticateRequest(VALID_CONFIG, true); + const correlationContext = config.headers["Correlation-Context"] as string; + expect(correlationContext).toContain(",sdk_language=typescript,source=mockSource"); + expect(correlationContext).not.toContain("source_version"); + }); + + describe("when a source version is provided", () => { + beforeAll(() => { + sourceVersion = "1.0.0"; + }); + afterAll(() => { + sourceVersion = undefined; + }); + + it("includes the source version in the correlation context", async () => { + const config = await authenticator.authenticateRequest(VALID_CONFIG, true); + const correlationContext = config.headers["Correlation-Context"] as string; + expect(correlationContext).toContain( + "sdk_version=0.25.0,sdk_language=typescript,source=mockSource", + ); + }); + }); + + it("should raise an InvalidAPIKeyFormat error if Edwards key length is not 64 bytes", async () => { + const invalidEdKey = privateKey.slice(0, -4); + const invalidAuthenticator = new CoinbaseAuthenticator(apiKey, invalidEdKey, source); + await expect(invalidAuthenticator.authenticateRequest(VALID_CONFIG)).rejects.toThrow( + InvalidAPIKeyFormatError, + ); + }); + + describe("#buildJWT", () => { + let instance: CoinbaseAuthenticator; + + beforeEach(() => { + instance = new CoinbaseAuthenticator(apiKey, privateKey, source); + (instance as any).nonce = jest.fn().mockReturnValue("mockNonce"); + }); + + test("should throw error if Edwards key length is not 64 bytes", async () => { + const invalidEdKey = privateKey.slice(0, -4); + instance = new CoinbaseAuthenticator(apiKey, invalidEdKey, source); + await expect(instance.buildJWT("https://example.com")).rejects.toThrow( + InvalidAPIKeyFormatError, + ); + }); - await expect(instance.buildJWT("https://example.com")).rejects.toThrow(InvalidAPIKeyFormat); + test("should return a valid JWT when building with Edwards key", async () => { + const jwt = await instance.buildJWT("https://example.com", "GET"); + expect(jwt).toContain("."); + const parts = jwt.split("."); + expect(parts.length).toBe(3); + }); + }); }); }); diff --git a/src/tests/coinbase_test.ts b/src/tests/coinbase_test.ts index 4a32f51b..4d5fa51b 100644 --- a/src/tests/coinbase_test.ts +++ b/src/tests/coinbase_test.ts @@ -2,14 +2,14 @@ import * as os from "os"; import * as fs from "fs"; import { randomUUID } from "crypto"; import { APIError } from "../coinbase/api_error"; -import { Coinbase } from "../index"; +import { Coinbase, UninitializedSDKError } from "../index"; +import { Wallet } from "../coinbase/wallet"; +import { NetworkIdentifier } from "../client"; import { VALID_WALLET_MODEL, addressesApiMock, generateRandomHash, - mockReturnRejectedValue, mockReturnValue, - usersApiMock, walletsApiMock, } from "./utils"; import { ethers } from "ethers"; @@ -20,11 +20,48 @@ import axios from "axios"; const PATH_PREFIX = "./src/tests/config"; describe("Coinbase tests", () => { + // General tests that don't depend on the actual key file contents. + describe(".networks", () => { + it("returns a map of networks that match the api generated NetworkIdentifier", () => { + expect(Coinbase.networks).toEqual(NetworkIdentifier); + }); + + it("returns the network ID when selecting a specific network", () => { + expect(Coinbase.networks.BaseSepolia).toEqual("base-sepolia"); + }); + }); + + it("should throw UninitializedSDKError when accessing API clients without initialization", async () => { + // Reset the apiClients to a fresh proxy state + Coinbase.apiClients = new Proxy({} as any, { + get(target, prop) { + if (!Reflect.has(target, prop)) { + throw new UninitializedSDKError(); + } + return Reflect.get(target, prop); + } + }); + + expect(() => { + Coinbase.apiClients.wallet; + }).toThrow(UninitializedSDKError); + + // Verify the error message + try { + Coinbase.apiClients.wallet; + } catch (error) { + expect((error as Error).message).toEqual(UninitializedSDKError.DEFAULT_MESSAGE); + } + + // Then try to call a method that uses the API client + await expect(Wallet.listWallets()).rejects.toThrow(UninitializedSDKError); + }); + it("should throw an error if the API key name or private key is empty", () => { - expect(() => new Coinbase({ apiKeyName: "", privateKey: "test" })).toThrow( + expect(() => Coinbase.configure({ apiKeyName: "", privateKey: "test" })).toThrow( "Invalid configuration: apiKeyName is empty", ); - expect(() => new Coinbase({ apiKeyName: "test", privateKey: "" })).toThrow( + expect(() => Coinbase.configure({ apiKeyName: "test", privateKey: "" })).toThrow( "Invalid configuration: privateKey is empty", ); }); @@ -35,16 +72,9 @@ describe("Coinbase tests", () => { ).toThrow("Invalid configuration: file not found at ./src/tests/config/does-not-exist.json"); }); - it("should initialize the Coinbase SDK from a JSON file", () => { - const cbInstance = Coinbase.configureFromJson({ - filePath: `${PATH_PREFIX}/test_api_key.json`, - }); - expect(cbInstance).toBeInstanceOf(Coinbase); - }); - it("should throw an error if there is an issue reading the file or parsing the JSON data", () => { expect(() => Coinbase.configureFromJson({ filePath: `${PATH_PREFIX}/invalid.json` })).toThrow( - "Invalid configuration: missing configuration values", + "Invalid configuration: missing API key identifier or privateKey", ); }); @@ -65,56 +95,89 @@ describe("Coinbase tests", () => { fs.unlinkSync(expandedPath); }); - describe("should able to interact with the API", () => { - let user, walletId, publicKey, addressId, transactionHash; - const cbInstance = Coinbase.configureFromJson({ - filePath: `${PATH_PREFIX}/test_api_key.json`, - debugging: true, - }); + // Helper function to run API interaction tests with a given config file. + const runApiInteractionTests = (filePath: string) => { + describe(`Using key file: ${filePath}`, () => { + let walletId: string, publicKey: string, addressId: string, transactionHash: string; + // Initialize an instance with debugging enabled. + const cbInstance = Coinbase.configureFromJson({ + filePath, + debugging: true, + }); - beforeEach(async () => { - jest.clearAllMocks(); - Coinbase.apiClients = { - user: usersApiMock, - wallet: walletsApiMock, - address: addressesApiMock, - }; - const ethAddress = ethers.Wallet.createRandom(); - - walletId = randomUUID(); - publicKey = ethAddress.publicKey; - addressId = randomUUID(); - transactionHash = generateRandomHash(8); - - const walletModel = { - id: walletId, - network_id: Coinbase.networks.BaseSepolia, - default_address: { - wallet_id: walletId, - address_id: addressId, - public_key: publicKey, + beforeEach(async () => { + jest.clearAllMocks(); + Coinbase.apiClients = { + wallet: walletsApiMock, + address: addressesApiMock, + }; + const ethAddress = ethers.Wallet.createRandom(); + + walletId = randomUUID(); + publicKey = ethAddress.publicKey; + addressId = randomUUID(); + transactionHash = generateRandomHash(8); + + const walletModel = { + id: walletId, network_id: Coinbase.networks.BaseSepolia, - }, - }; - - Coinbase.apiClients.user!.getCurrentUser = mockReturnValue({ id: 123 }); - Coinbase.apiClients.wallet!.createWallet = mockReturnValue(walletModel); - Coinbase.apiClients.wallet!.getWallet = mockReturnValue(walletModel); - Coinbase.apiClients.address!.requestFaucetFunds = mockReturnValue({ - transaction_hash: transactionHash, + default_address: { + wallet_id: walletId, + address_id: addressId, + public_key: publicKey, + network_id: Coinbase.networks.BaseSepolia, + }, + }; + + Coinbase.apiClients.wallet!.createWallet = mockReturnValue(walletModel); + Coinbase.apiClients.wallet!.getWallet = mockReturnValue(walletModel); + Coinbase.apiClients.address!.createAddress = mockReturnValue( + VALID_WALLET_MODEL.default_address, + ); }); - Coinbase.apiClients.address!.createAddress = mockReturnValue( - VALID_WALLET_MODEL.default_address, - ); - user = await cbInstance.getDefaultUser(); + it("enables interaction with the API clients", async () => { + const wallet = await Wallet.create({ networkId: NetworkIdentifier.BaseSepolia }); + expect(wallet.getId()).toEqual(walletId); + }); + }); + }; + + // Group tests by key type. + describe("Standard API Key tests", () => { + const keyFiles = [ + { description: "with name", path: `${PATH_PREFIX}/test_api_key.json` }, + { description: "with only id", path: `${PATH_PREFIX}/test_api_key_with_only_id.json` }, + ]; + + keyFiles.forEach(({ description, path: filePath }) => { + describe(`Standard API key ${description}`, () => { + it("should initialize the Coinbase SDK from a JSON file", () => { + const cbInstance = Coinbase.configureFromJson({ filePath }); + expect(cbInstance).toBeInstanceOf(Coinbase); + }); + runApiInteractionTests(filePath); + }); }); + }); - it("should return the correct user ID", async () => { - expect(user.getId()).toBe(123); - expect(user.toString()).toBe("User{ userId: 123 }"); - expect(Coinbase.apiClients.user!.getCurrentUser).toHaveBeenCalledWith(); - expect(usersApiMock.getCurrentUser).toHaveBeenCalledTimes(1); + describe("ED25519 API Key tests", () => { + const keyFiles = [ + { description: "with name", path: `${PATH_PREFIX}/test_ed25519_api_key.json` }, + { + description: "with only id", + path: `${PATH_PREFIX}/test_ed25519_api_key_with_only_id.json`, + }, + ]; + + keyFiles.forEach(({ description, path: filePath }) => { + describe(`ED25519 API key ${description}`, () => { + it("should initialize the Coinbase SDK from a JSON file", () => { + const cbInstance = Coinbase.configureFromJson({ filePath }); + expect(cbInstance).toBeInstanceOf(Coinbase); + }); + runApiInteractionTests(filePath); + }); }); }); }); @@ -122,12 +185,12 @@ describe("Coinbase tests", () => { describe("Axios Interceptors", () => { it("should raise an error if the user is not found", async () => { const mock = new MockAdapter(axios); - mock.onGet("/v1/users/me").reply(401, "unauthorized"); + mock.onGet("/v1/wallets").reply(401, "unauthorized"); const cbInstance = Coinbase.configureFromJson({ filePath: `${PATH_PREFIX}/test_api_key.json`, debugging: true, }); - await expect(cbInstance.getDefaultUser()).rejects.toThrow(APIError); + await expect(Wallet.listWallets()).rejects.toThrow(APIError); }); }); diff --git a/src/tests/config/test_api_key.json b/src/tests/config/test_api_key.json index 5ca133fe..c2698ded 100644 --- a/src/tests/config/test_api_key.json +++ b/src/tests/config/test_api_key.json @@ -1,4 +1,4 @@ { - "name": "organizations/ej811111-bf11-4e11-111c-3e3e1e33333b", + "name": "organizations/b6d44812-a3ea-4b0c-92c3-029a37010a2e/apiKeys/3e752529-b9be-4bd4-802e-bfe769c0ab56", "privateKey": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIBPl8LBKrDw2Is+bxQEXa2eHhDmvIgArOhSAdmYpYQrCoAoGCCqGSM49\nAwEHoUQDQgAEQSoVSr8ImpS18thpGe3KuL9efy+L+AFdFFfCVwGgCsKvTYVDKaGo\nVmN5Bl6EJkeIQjyarEtWbmY6komwEOdnHA==\n-----END EC PRIVATE KEY-----\n" } \ No newline at end of file diff --git a/src/tests/config/test_api_key_with_only_id.json b/src/tests/config/test_api_key_with_only_id.json new file mode 100644 index 00000000..1bd17592 --- /dev/null +++ b/src/tests/config/test_api_key_with_only_id.json @@ -0,0 +1,4 @@ +{ + "name": "3e752529-b9be-4bd4-802e-bfe769c0ab56", + "privateKey": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIBPl8LBKrDw2Is+bxQEXa2eHhDmvIgArOhSAdmYpYQrCoAoGCCqGSM49\nAwEHoUQDQgAEQSoVSr8ImpS18thpGe3KuL9efy+L+AFdFFfCVwGgCsKvTYVDKaGo\nVmN5Bl6EJkeIQjyarEtWbmY6komwEOdnHA==\n-----END EC PRIVATE KEY-----\n" +} \ No newline at end of file diff --git a/src/tests/config/test_ed25519_api_key.json b/src/tests/config/test_ed25519_api_key.json new file mode 100644 index 00000000..4d345adc --- /dev/null +++ b/src/tests/config/test_ed25519_api_key.json @@ -0,0 +1,4 @@ +{ + "name": "organizations/b6d44812-a3ea-4b0c-92c3-029a37010a2e/apiKeys/3e752529-b9be-4bd4-802e-bfe769c0ab56", + "privateKey": "hnW9bgWmEjiioG+H8RdcerLEvh7HgWiixtzBKX4T3YkHN7G3Vt5zUPqfPVnTQYeRfIXN1scvhXWo8guFoqElXg==" +} \ No newline at end of file diff --git a/src/tests/config/test_ed25519_api_key_with_only_id.json b/src/tests/config/test_ed25519_api_key_with_only_id.json new file mode 100644 index 00000000..8e717507 --- /dev/null +++ b/src/tests/config/test_ed25519_api_key_with_only_id.json @@ -0,0 +1,4 @@ +{ + "id": "3e752529-b9be-4bd4-802e-bfe769c0ab56", + "privateKey": "hnW9bgWmEjiioG+H8RdcerLEvh7HgWiixtzBKX4T3YkHN7G3Vt5zUPqfPVnTQYeRfIXN1scvhXWo8guFoqElXg==" +} \ No newline at end of file diff --git a/src/tests/contract_event_test.ts b/src/tests/contract_event_test.ts new file mode 100644 index 00000000..4a944dc5 --- /dev/null +++ b/src/tests/contract_event_test.ts @@ -0,0 +1,124 @@ +import { ContractEvent } from "../coinbase/contract_event"; + +describe("ContractEvent", () => { + const eventData = { + network_id: "ethereum-mainnet", + protocol_name: "uniswap", + contract_name: "Pool", + event_name: "Transfer", + sig: "Transfer(address,address,uint256)", + four_bytes: "0xddf252ad", + contract_address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", + block_time: "2023-04-01T12:00:00Z", + block_height: 201782330, + tx_hash: "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef", + tx_index: 109, + event_index: 362, + data: '{"from":"0x1234...","to":"0x5678...","value":"1000000000000000000"}', + }; + + describe(".networkId", () => { + it("should return the correct network ID", () => { + const event = new ContractEvent(eventData); + expect(event.networkId()).toEqual("ethereum-mainnet"); + }); + }); + + describe(".protocolName", () => { + it("should return the correct protocol name", () => { + const event = new ContractEvent(eventData); + expect(event.protocolName()).toEqual("uniswap"); + }); + }); + + describe(".contractName", () => { + it("should return the correct contract name", () => { + const event = new ContractEvent(eventData); + expect(event.contractName()).toEqual("Pool"); + }); + }); + + describe(".eventName", () => { + it("should return the correct event name", () => { + const event = new ContractEvent(eventData); + expect(event.eventName()).toEqual("Transfer"); + }); + }); + + describe(".sig", () => { + it("should return the correct signature", () => { + const event = new ContractEvent(eventData); + expect(event.sig()).toEqual("Transfer(address,address,uint256)"); + }); + }); + + describe(".fourBytes", () => { + it("should return the correct four bytes", () => { + const event = new ContractEvent(eventData); + expect(event.fourBytes()).toEqual("0xddf252ad"); + }); + }); + + describe(".contractAddress", () => { + it("should return the correct contract address", () => { + const event = new ContractEvent(eventData); + expect(event.contractAddress()).toEqual("0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"); + }); + }); + + describe(".blockTime", () => { + it("should return the correct block time", () => { + const event = new ContractEvent(eventData); + expect(event.blockTime()).toEqual(new Date("2023-04-01T12:00:00Z")); + }); + }); + + describe(".blockHeight", () => { + it("should return the correct block height", () => { + const event = new ContractEvent(eventData); + expect(event.blockHeight()).toEqual(201782330); + }); + }); + + describe(".txHash", () => { + it("should return the correct transaction hash", () => { + const event = new ContractEvent(eventData); + expect(event.txHash()).toEqual( + "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef", + ); + }); + }); + + describe(".txIndex", () => { + it("should return the correct transaction index", () => { + const event = new ContractEvent(eventData); + expect(event.txIndex()).toEqual(109); + }); + }); + + describe(".eventIndex", () => { + it("should return the correct event index", () => { + const event = new ContractEvent(eventData); + expect(event.eventIndex()).toEqual(362); + }); + }); + + describe(".data", () => { + it("should return the correct event data", () => { + const event = new ContractEvent(eventData); + expect(event.data()).toEqual( + '{"from":"0x1234...","to":"0x5678...","value":"1000000000000000000"}', + ); + }); + }); + + describe(".toString", () => { + it("should return the string representation of a contract event", () => { + const event = new ContractEvent(eventData); + const eventStr = event.toString(); + expect(eventStr).toEqual( + "ContractEvent { networkId: 'ethereum-mainnet' protocolName: 'uniswap' contractName: 'Pool' eventName: 'Transfer' contractAddress: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48' blockHeight: 201782330 txHash: '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef' }", + ); + }); + }); +}); diff --git a/src/tests/contract_invocation_test.ts b/src/tests/contract_invocation_test.ts new file mode 100644 index 00000000..ae82c253 --- /dev/null +++ b/src/tests/contract_invocation_test.ts @@ -0,0 +1,396 @@ +import { ethers } from "ethers"; +import { AxiosError } from "axios"; +import { Decimal } from "decimal.js"; +import { + ContractInvocation as ContractInvocationModel, + TransactionStatusEnum, +} from "../client/api"; +import { TransactionStatus } from "../coinbase/types"; +import { ContractInvocation } from "../coinbase/contract_invocation"; +import { Transaction } from "../coinbase/transaction"; +import { Coinbase } from "../coinbase/coinbase"; +import { + VALID_CONTRACT_INVOCATION_MODEL, + mockReturnValue, + mockReturnRejectedValue, + contractInvocationApiMock, + MINT_NFT_ARGS, + MINT_NFT_ABI, +} from "./utils"; + +import { TimeoutError } from "../coinbase/errors"; +import { APIError } from "../coinbase/api_error"; + +describe("Contract Invocation Class", () => { + let contractInvocationModel: ContractInvocationModel; + let contractInvocation: ContractInvocation; + + beforeEach(() => { + Coinbase.apiClients.contractInvocation = contractInvocationApiMock; + + contractInvocationModel = VALID_CONTRACT_INVOCATION_MODEL; + contractInvocation = ContractInvocation.fromModel(contractInvocationModel); + }); + + afterEach(() => { + jest.restoreAllMocks(); + }); + + describe("constructor", () => { + it("initializes a new ContractInvocation", () => { + expect(contractInvocation).toBeInstanceOf(ContractInvocation); + }); + + it("raises an error when the contractInvocation model is empty", () => { + expect(() => ContractInvocation.fromModel(undefined!)).toThrow( + "ContractInvocation model cannot be empty", + ); + }); + }); + + describe("#getId", () => { + it("returns the contract invocation ID", () => { + expect(contractInvocation.getId()).toEqual( + VALID_CONTRACT_INVOCATION_MODEL.contract_invocation_id, + ); + }); + }); + + describe("#getNetworkId", () => { + it("returns the network ID", () => { + expect(contractInvocation.getNetworkId()).toEqual(VALID_CONTRACT_INVOCATION_MODEL.network_id); + }); + }); + + describe("#getWalletId", () => { + it("returns the wallet ID", () => { + expect(contractInvocation.getWalletId()).toEqual(VALID_CONTRACT_INVOCATION_MODEL.wallet_id); + }); + }); + + describe("#getFromAddressId", () => { + it("returns the source address ID", () => { + expect(contractInvocation.getFromAddressId()).toEqual( + VALID_CONTRACT_INVOCATION_MODEL.address_id, + ); + }); + }); + + describe("#getContractAddressId", () => { + it("returns the contract address ID", () => { + expect(contractInvocation.getContractAddressId()).toEqual( + VALID_CONTRACT_INVOCATION_MODEL.contract_address, + ); + }); + }); + + describe("#getMethod", () => { + it("return the conrtact invocation's method", () => { + expect(contractInvocation.getMethod()).toEqual(VALID_CONTRACT_INVOCATION_MODEL.method); + }); + }); + + describe("#getArgs", () => { + it("returns the parsed arguments", () => { + expect(contractInvocation.getArgs()).toEqual(MINT_NFT_ARGS); + }); + }); + + describe("#getAbi", () => { + it("returns the parsed ABI", () => { + expect(contractInvocation.getAbi()).toEqual(MINT_NFT_ABI); + }); + }); + + describe("#getAmount", () => { + it("returns the amount", () => { + expect(contractInvocation.getAmount()).toEqual(new Decimal(0)); + }); + }); + + describe("#getTransactionHash", () => { + describe("when the transaction has a hash", () => { + let transactionHash = "0xtransactionHash"; + + beforeEach(() => { + contractInvocation = ContractInvocation.fromModel({ + ...VALID_CONTRACT_INVOCATION_MODEL, + transaction: { + ...VALID_CONTRACT_INVOCATION_MODEL.transaction!, + transaction_hash: transactionHash, + }, + }); + }); + + it("returns the transaction hash", () => { + expect(contractInvocation.getTransactionHash()).toEqual(transactionHash); + }); + }); + + describe("when the transaction does not have a hash", () => { + it("returns undefined", () => { + expect(contractInvocation.getTransactionHash()).toBeUndefined(); + }); + }); + }); + + describe("#getTransactionLink", () => { + describe("when the transaction has a transaction link", () => { + let transactionLink = `https://sepolia.basescan.org/tx/0xtransactionHash`; + + beforeEach(() => { + contractInvocation = ContractInvocation.fromModel({ + ...VALID_CONTRACT_INVOCATION_MODEL, + transaction: { + ...VALID_CONTRACT_INVOCATION_MODEL.transaction!, + transaction_link: transactionLink, + }, + }); + }); + + it("returns the transaction link", () => { + expect(contractInvocation.getTransactionLink()).toEqual(transactionLink); + }); + }); + + describe("when the transaction does not have a link", () => { + it("returns undefined", () => { + expect(contractInvocation.getTransactionLink()).toBeUndefined(); + }); + }); + }); + + describe("#getTransaction", () => { + it("returns the transaction", () => { + expect(contractInvocation.getTransaction()).toBeInstanceOf(Transaction); + }); + }); + + describe("#getRawTransaction", () => { + it("returns the ContractInvocation raw transaction", () => { + expect(contractInvocation.getRawTransaction()).toBeInstanceOf(ethers.Transaction); + }); + }); + + describe("#getStatus", () => { + let txStatus; + + beforeEach(() => { + contractInvocationModel = { + ...VALID_CONTRACT_INVOCATION_MODEL, + transaction: { + ...VALID_CONTRACT_INVOCATION_MODEL.transaction!, + status: txStatus, + }, + }; + + contractInvocation = ContractInvocation.fromModel(contractInvocationModel); + }); + + [ + TransactionStatus.PENDING, + TransactionStatus.BROADCAST, + TransactionStatus.COMPLETE, + TransactionStatus.FAILED, + ].forEach(status => { + describe(`when the transaction has status ${status}`, () => { + beforeAll(() => (txStatus = status)); + afterAll(() => (txStatus = undefined)); + + it("returns the correct status", async () => { + expect(contractInvocation.getStatus()).toEqual(status); + }); + }); + }); + }); + + describe("#broadcast", () => { + let signedPayload = "0xsignedHash"; + + beforeEach(() => { + // Ensure signed payload is present. + contractInvocation = ContractInvocation.fromModel({ + ...VALID_CONTRACT_INVOCATION_MODEL, + transaction: { + ...VALID_CONTRACT_INVOCATION_MODEL.transaction!, + signed_payload: signedPayload, + }, + }); + }); + + describe("when it was successful", () => { + let broadcastedInvocation; + + beforeEach(async () => { + Coinbase.apiClients.contractInvocation!.broadcastContractInvocation = mockReturnValue({ + ...VALID_CONTRACT_INVOCATION_MODEL, + transaction: { + ...VALID_CONTRACT_INVOCATION_MODEL.transaction!, + signed_payload: signedPayload, + status: TransactionStatus.BROADCAST, + }, + }); + + broadcastedInvocation = await contractInvocation.broadcast(); + }); + + it("returns the broadcasted contract invocation", async () => { + expect(broadcastedInvocation).toBeInstanceOf(ContractInvocation); + expect(broadcastedInvocation.getStatus()).toEqual(TransactionStatus.BROADCAST); + }); + + it("broadcasts the contract invocation", async () => { + expect( + Coinbase.apiClients.contractInvocation!.broadcastContractInvocation, + ).toHaveBeenCalledWith( + contractInvocation.getWalletId(), + contractInvocation.getFromAddressId(), + contractInvocation.getId(), + { + signed_payload: signedPayload.slice(2), + }, + ); + + expect( + Coinbase.apiClients.contractInvocation!.broadcastContractInvocation, + ).toHaveBeenCalledTimes(1); + }); + }); + + describe("when the transaction is not signed", () => { + beforeEach(() => { + contractInvocation = ContractInvocation.fromModel(VALID_CONTRACT_INVOCATION_MODEL); + }); + + it("throws an error", async () => { + expect(contractInvocation.broadcast()).rejects.toThrow( + "Cannot broadcast unsigned ContractInvocation", + ); + }); + }); + + describe("when broadcasting fails", () => { + beforeEach(() => { + Coinbase.apiClients.contractInvocation!.broadcastContractInvocation = + mockReturnRejectedValue( + new APIError({ + response: { + status: 400, + data: { + code: "invalid_signed_payload", + message: "failed to broadcast contract invocation: invalid signed payload", + }, + }, + } as AxiosError), + ); + }); + + it("throws an error", async () => { + expect(contractInvocation.broadcast()).rejects.toThrow(APIError); + }); + }); + }); + + describe("#sign", () => { + let signingKey: any = ethers.Wallet.createRandom(); + + it("return the signature", async () => { + const contractInvocation = ContractInvocation.fromModel({ + ...VALID_CONTRACT_INVOCATION_MODEL, + transaction: { + ...VALID_CONTRACT_INVOCATION_MODEL.transaction!, + signed_payload: "0xsignedHash", + }, + }); + + const signature = await contractInvocation.sign(signingKey); + + expect(signature).toEqual(contractInvocation.getTransaction()!.getSignature()!); + }); + }); + + describe("#wait", () => { + describe("when the transaction is complete", () => { + beforeEach(() => { + Coinbase.apiClients.contractInvocation!.getContractInvocation = mockReturnValue({ + ...VALID_CONTRACT_INVOCATION_MODEL, + transaction: { + ...VALID_CONTRACT_INVOCATION_MODEL.transaction!, + status: TransactionStatusEnum.Complete, + }, + }); + }); + + it("successfully waits and returns", async () => { + const completedContractInvocation = await contractInvocation.wait(); + expect(completedContractInvocation).toBeInstanceOf(ContractInvocation); + expect(completedContractInvocation.getStatus()).toEqual(TransactionStatus.COMPLETE); + }); + }); + + describe("when the transaction is failed", () => { + beforeEach(() => { + Coinbase.apiClients.contractInvocation!.getContractInvocation = mockReturnValue({ + ...VALID_CONTRACT_INVOCATION_MODEL, + transaction: { + ...VALID_CONTRACT_INVOCATION_MODEL.transaction!, + status: TransactionStatusEnum.Failed, + }, + status: TransactionStatus.FAILED, + }); + }); + + it("successfully waits and returns a failed invocation", async () => { + const completedContractInvocation = await contractInvocation.wait(); + expect(completedContractInvocation).toBeInstanceOf(ContractInvocation); + expect(completedContractInvocation.getStatus()).toEqual(TransactionStatus.FAILED); + }); + }); + + describe("when the transaction is pending", () => { + beforeEach(() => { + Coinbase.apiClients.contractInvocation!.getContractInvocation = mockReturnValue({ + ...VALID_CONTRACT_INVOCATION_MODEL, + transaction: { + ...VALID_CONTRACT_INVOCATION_MODEL.transaction!, + status: TransactionStatusEnum.Pending, + }, + }); + }); + + it("throws a timeout error", async () => { + expect( + contractInvocation.wait({ timeoutSeconds: 0.05, intervalSeconds: 0.05 }), + ).rejects.toThrow(new TimeoutError("ContractInvocation timed out")); + }); + }); + }); + + describe("#reload", () => { + it("returns the updated contract invocation", async () => { + Coinbase.apiClients.contractInvocation!.getContractInvocation = mockReturnValue({ + ...VALID_CONTRACT_INVOCATION_MODEL, + transaction: { + ...VALID_CONTRACT_INVOCATION_MODEL.transaction!, + status: TransactionStatusEnum.Complete, + }, + }); + await contractInvocation.reload(); + expect(contractInvocation.getStatus()).toEqual(TransactionStatus.COMPLETE); + expect(Coinbase.apiClients.contractInvocation!.getContractInvocation).toHaveBeenCalledTimes( + 1, + ); + }); + }); + + describe("#toString", () => { + it("returns the same value as toString", () => { + expect(contractInvocation.toString()).toEqual( + `ContractInvocation{contractInvocationId: '${contractInvocation.getId()}', networkId: '${contractInvocation.getNetworkId()}', ` + + `fromAddressId: '${contractInvocation.getFromAddressId()}', contractAddressId: '${contractInvocation.getContractAddressId()}', ` + + `method: '${contractInvocation.getMethod()}', args: '${contractInvocation.getArgs()}', transactionHash: '${contractInvocation.getTransactionHash()}', ` + + `transactionLink: '${contractInvocation.getTransactionLink()}', status: '${contractInvocation.getStatus()!}'}`, + ); + }); + }); +}); diff --git a/src/tests/crypto_amount_test.ts b/src/tests/crypto_amount_test.ts new file mode 100644 index 00000000..f10443ff --- /dev/null +++ b/src/tests/crypto_amount_test.ts @@ -0,0 +1,93 @@ +import { describe, it, expect } from "@jest/globals"; +import Decimal from "decimal.js"; +import { CryptoAmount } from "../coinbase/crypto_amount"; +import { Asset } from "../coinbase/asset"; +import { CryptoAmount as CryptoAmountModel } from "../client/api"; +import { Coinbase } from "../coinbase/coinbase"; +import { + contractInvocationApiMock, + getAssetMock, + VALID_ETH_CRYPTO_AMOUNT_MODEL, + VALID_USDC_CRYPTO_AMOUNT_MODEL, +} from "./utils"; +import { ContractInvocation } from "../coinbase/contract_invocation"; + +describe("CryptoAmount", () => { + let cryptoAmountModel: CryptoAmountModel; + let cryptoAmount: CryptoAmount; + + beforeEach(() => { + cryptoAmountModel = VALID_USDC_CRYPTO_AMOUNT_MODEL; + cryptoAmount = CryptoAmount.fromModel(cryptoAmountModel); + }); + + afterEach(() => { + jest.restoreAllMocks(); + }); + + describe(".fromModel", () => { + it("should correctly create CryptoAmount from model", () => { + expect(cryptoAmount).toBeInstanceOf(CryptoAmount); + expect(cryptoAmount.getAmount().equals(new Decimal(1).div(new Decimal(10).pow(6)))); + expect(cryptoAmount.getAsset().assetId).toEqual(Coinbase.assets.Usdc); + expect(cryptoAmount.getAsset().networkId).toEqual("base-sepolia"); + expect(cryptoAmount.getAsset().decimals).toEqual(6); + }); + }); + + describe(".fromModelAndAssetId", () => { + it("should correctly create CryptoAmount from model with gwei denomination", () => { + const cryptoAmount = CryptoAmount.fromModelAndAssetId( + VALID_ETH_CRYPTO_AMOUNT_MODEL, + Coinbase.assets.Gwei, + ); + expect(cryptoAmount.getAmount().equals(new Decimal(1).div(new Decimal(10).pow(9)))); + expect(cryptoAmount.getAsset().assetId).toEqual(Coinbase.assets.Gwei); + expect(cryptoAmount.getAsset().networkId).toEqual("base-sepolia"); + expect(cryptoAmount.getAsset().decimals).toEqual(9); + }); + + it("should correctly create CryptoAmount from model with wei denomination", () => { + const cryptoAmount = CryptoAmount.fromModelAndAssetId( + VALID_ETH_CRYPTO_AMOUNT_MODEL, + Coinbase.assets.Wei, + ); + expect(cryptoAmount.getAmount().equals(new Decimal(1))); + expect(cryptoAmount.getAsset().assetId).toEqual(Coinbase.assets.Wei); + expect(cryptoAmount.getAsset().networkId).toEqual("base-sepolia"); + expect(cryptoAmount.getAsset().decimals).toEqual(0); + }); + }); + + describe("#getAmount", () => { + it("should return the correct amount", () => { + expect(cryptoAmount.getAmount().equals(new Decimal(1).div(new Decimal(10).pow(6)))); + }); + }); + + describe("#getAsset", () => { + it("should return the correct asset", () => { + expect(cryptoAmount.getAsset().assetId).toEqual(Coinbase.assets.Usdc); + expect(cryptoAmount.getAsset().networkId).toEqual("base-sepolia"); + expect(cryptoAmount.getAsset().decimals).toEqual(6); + }); + }); + + describe("#getAssetId", () => { + it("should return the correct asset ID", () => { + expect(cryptoAmount.getAssetId()).toEqual(Coinbase.assets.Usdc); + }); + }); + + describe("#toAtomicAmount", () => { + it("should correctly convert to atomic amount", () => { + expect(cryptoAmount.toAtomicAmount().toString()).toEqual("1"); + }); + }); + + describe("#toString", () => { + it("should have correct string representation", () => { + expect(cryptoAmount.toString()).toEqual("CryptoAmount{amount: '0.000001', assetId: 'usdc'}"); + }); + }); +}); diff --git a/src/tests/e2e.ts b/src/tests/e2e.ts index 57f59064..c4390c91 100644 --- a/src/tests/e2e.ts +++ b/src/tests/e2e.ts @@ -1,16 +1,27 @@ import fs from "fs"; import dotenv from "dotenv"; -import { Coinbase } from "../coinbase/coinbase"; +import { + Coinbase, + Wallet, + StakingReward, + StakingBalance, + ExternalAddress, + ValidatorStatus, + Validator, + StakeOptionsMode, + TransactionStatus, +} from "../index"; + +import { StakingOperationStatusEnum } from "../client"; import { TransferStatus } from "../coinbase/types"; describe("Coinbase SDK E2E Test", () => { - let coinbase: Coinbase; beforeAll(() => { dotenv.config(); }); beforeEach(() => { - coinbase = new Coinbase({ + Coinbase.configure({ apiKeyName: process.env.NAME as string, privateKey: process.env.PRIVATE_KEY as string, }); @@ -28,92 +39,468 @@ describe("Coinbase SDK E2E Test", () => { expect(fs.existsSync("./dist/coinbase/coinbase.js")).toBe(true); }); - it("should be able to interact with the Coinbase SDK", async () => { - console.log("Fetching default user..."); - const user = await coinbase.getDefaultUser(); - expect(user.getId()).toBeDefined(); - console.log(`Fetched default user with ID: ${user.getId()}`); - - console.log("Creating new wallet..."); - const wallet = await user.createWallet(); - expect(wallet.toString()).toBeDefined(); - expect(wallet?.getId()).toBeDefined(); - console.log( - `Created new wallet with ID: ${wallet.getId()}, default address: ${wallet.getDefaultAddress()}`, - ); - - console.log("Importing wallet with balance..."); + /* + * CDP-266 Flaky test + * it("should be able to interact with the Coinbase SDK", async () => { + * console.log("Creating new wallet..."); + * const wallet = await Wallet.create(); + */ + + /* + * expect(wallet.toString()).toBeDefined(); + * expect(wallet?.getId()).toBeDefined(); + * console.log( + * `Created new wallet with ID: ${wallet.getId()}, default address: ${wallet.getDefaultAddress()}`, + * ); + */ + + /* + * console.log("Importing wallet with balance..."); + * const seedFile = JSON.parse(process.env.WALLET_DATA || ""); + * const walletId = Object.keys(seedFile)[0]; + * const seed = seedFile[walletId].seed; + */ + + /* + * const importedWallet = await Wallet.import({ + * seed, + * walletId, + * networkId: Coinbase.networks.BaseSepolia, + * }); + * expect(importedWallet).toBeDefined(); + * expect(importedWallet.getId()).toBe(walletId); + * console.log( + * `Imported wallet with ID: ${importedWallet.getId()}, default address: ${importedWallet.getDefaultAddress()}`, + * ); + * await importedWallet.saveSeedToFile("test_seed.json"); + */ + + /* + * try { + * const transaction = await importedWallet.faucet(); + * expect(transaction.toString()).toBeDefined(); + * } catch { + * console.log("Faucet request failed. Skipping..."); + * } + * console.log("Listing wallet addresses..."); + * const addresses = await importedWallet.listAddresses(); + * expect(addresses.length).toBeGreaterThan(0); + * console.log(`Listed addresses: ${addresses.join(", ")}`); + */ + + /* + * console.log("Fetching wallet balances..."); + * const balances = await importedWallet.listBalances(); + * expect(Array.from([...balances.keys()]).length).toBeGreaterThan(0); + * console.log(`Fetched balances: ${balances.toString()}`); + */ + + /* + * console.log("Exporting wallet..."); + * const exportedWallet = await wallet.export(); + * expect(exportedWallet.walletId).toBeDefined(); + * expect(exportedWallet.seed).toBeDefined(); + */ + + /* + * console.log("Saving seed to file..."); + * await wallet.saveSeedToFile("test_seed.json"); + * expect(fs.existsSync("test_seed.json")).toBe(true); + * console.log("Saved seed to test_seed.json"); + */ + + /* + * const unhydratedWallet = await Wallet.fetch(walletId); + * expect(unhydratedWallet.canSign()).toBe(false); + * await unhydratedWallet.loadSeedFromFile("test_seed.json"); + * expect(unhydratedWallet.canSign()).toBe(true); + * expect(unhydratedWallet.getId()).toBe(walletId); + */ + + /* + * console.log("Transfering 0.000000001 ETH from default address to second address..."); + * const transfer = await unhydratedWallet.createTransfer({ + * amount: 0.000000001, + * assetId: Coinbase.assets.Eth, + * destination: wallet, + * }); + */ + + // await transfer.wait(); + + /* + * expect(transfer.toString()).toBeDefined(); + * expect(await transfer.getStatus()).toBe(TransferStatus.COMPLETE); + * console.log(`Transferred 1 Gwei from ${unhydratedWallet} to ${wallet}`); + */ + + /* + * console.log("Fetching updated balances..."); + * const firstBalance = await unhydratedWallet.listBalances(); + * const secondBalance = await wallet.listBalances(); + * expect(firstBalance.get(Coinbase.assets.Eth)).not.toEqual("0"); + * expect(secondBalance.get(Coinbase.assets.Eth)).not.toEqual("0"); + * console.log(`First address balances: ${firstBalance}`); + * console.log(`Second address balances: ${secondBalance}`); + */ + + /* + * console.log("Fetching address transactions..."); + * let result; + * for (let i = 0; i < 5; i++) { + * // Try up to 5 times + * result = await (await unhydratedWallet.getDefaultAddress()).listTransactions({ limit: 1 }); + * if (result?.data.length > 0) break; + * // Wait 2 seconds between attempts + * console.log(`Waiting for transaction to be processed... (${i + 1} attempts)`); + * await new Promise(resolve => setTimeout(resolve, 2000)); + * } + * expect(result?.data.length).toBeGreaterThan(0); + */ + + /* + * console.log("Fetching address historical balances..."); + * const balance_result = await ( + * await unhydratedWallet.getDefaultAddress() + * ).listHistoricalBalances(Coinbase.assets.Eth, { limit: 2 }); + * expect(balance_result?.data.length).toBeGreaterThan(0); + * console.log(`First eth historical balance: ${balance_result?.data[0].amount.toString()}`); + */ + + /* + * const savedSeed = JSON.parse(fs.readFileSync("test_seed.json", "utf-8")); + * fs.unlinkSync("test_seed.json"); + */ + + /* + * expect(exportedWallet.seed.length).toBe(64); + * expect(savedSeed[exportedWallet.walletId!]).toEqual({ + * seed: exportedWallet.seed, + * encrypted: false, + * authTag: "", + * iv: "", + * networkId: exportedWallet.networkId, + * }); + * }, 60000); + */ + + it("Should be able to invoke a contract and retrieve the transaction receipt", async () => { const seedFile = JSON.parse(process.env.WALLET_DATA || ""); const walletId = Object.keys(seedFile)[0]; const seed = seedFile[walletId].seed; - const userWallet = await user.importWallet({ seed, walletId }); - expect(userWallet).toBeDefined(); - expect(userWallet.getId()).toBe(walletId); - console.log( - `Imported wallet with ID: ${userWallet.getId()}, default address: ${userWallet.getDefaultAddress()}`, - ); - await userWallet.saveSeed("test_seed.json"); - - try { - const transaction = await userWallet.faucet(); - expect(transaction.toString()).toBeDefined(); - } catch { - console.log("Faucet request failed. Skipping..."); + const importedWallet = await Wallet.import({ + seed, + walletId, + networkId: Coinbase.networks.BaseSepolia, + }); + + const faucetTransaction = await importedWallet.faucet(Coinbase.assets.Usdc); + await faucetTransaction.wait(); + + const secondWallet = await Wallet.create(); + const secondWalletAddress = (await secondWallet.getDefaultAddress()).getId(); + + const transferArgs = { + to: secondWalletAddress, + value: "1", + }; + + const contractInvocation = await importedWallet.invokeContract({ + contractAddress: "0x036CbD53842c5426634e7929541eC2318f3dCF7e", + method: "transfer", + args: transferArgs, + }); + + await contractInvocation.wait(); + + const transactionContent = contractInvocation.getTransaction().content(); + const receipt = transactionContent!.receipt; + + expect(receipt).toBeDefined(); + + if (!receipt?.logs) { + fail("No logs found in receipt"); } - console.log("Listing wallet addresses..."); - const addresses = await userWallet.listAddresses(); - expect(addresses.length).toBeGreaterThan(0); - console.log(`Listed addresses: ${addresses.join(", ")}`); - - console.log("Fetching wallet balances..."); - const balances = await userWallet.listBalances(); - expect(Array.from([...balances.keys()]).length).toBeGreaterThan(0); - console.log(`Fetched balances: ${balances.toString()}`); - - console.log("Exporting wallet..."); - const exportedWallet = await wallet.export(); - expect(exportedWallet.walletId).toBeDefined(); - expect(exportedWallet.seed).toBeDefined(); - - console.log("Saving seed to file..."); - await wallet.saveSeed("test_seed.json"); - expect(fs.existsSync("test_seed.json")).toBe(true); - console.log("Saved seed to test_seed.json"); - - const unhydratedWallet = await user.getWallet(walletId); - expect(unhydratedWallet.canSign()).toBe(false); - await unhydratedWallet.loadSeed("test_seed.json"); - expect(unhydratedWallet.canSign()).toBe(true); - expect(unhydratedWallet.getId()).toBe(walletId); - - console.log("Transfering 0.000000001 ETH from default address to second address..."); - const transfer = await unhydratedWallet.createTransfer({ - amount: 0.000000001, - assetId: Coinbase.assets.Eth, - destination: wallet, + + const logs = receipt.logs; + + expect(logs).toBeDefined(); + expect(logs.length).toEqual(1); + + const log = logs[0]; + expect(log.address).toEqual("0x036CbD53842c5426634e7929541eC2318f3dCF7e"); + expect(log.topics?.[0]).toEqual("Transfer"); + expect(log.topics?.[1]).toEqual(`from: ${(await importedWallet.getDefaultAddress()).getId()}`); + expect(log.topics?.[2]).toEqual(`to: ${(await secondWallet.getDefaultAddress()).getId()}`); + expect(log.data).toEqual("0x0000000000000000000000000000000000000000000000000000000000000001"); + }, 60000); + + it.skip("should be able to make gasless transfers", async () => { + // Import wallet with balance + const seedFile = JSON.parse(process.env.WALLET_DATA || ""); + const walletId = Object.keys(seedFile)[0]; + const seed = seedFile[walletId].seed; + + const sourceWallet = await Wallet.import({ + seed, + walletId, + networkId: Coinbase.networks.BaseSepolia, }); + + // Create destination wallet + const destinationWallet = await Wallet.create(); + + // Initialize transfer amount + const transferAmount = 0.000001; + + console.log(`Making gasless transfer of ${transferAmount} USDC...`); + const transfer = await sourceWallet.createTransfer({ + amount: transferAmount, + assetId: Coinbase.assets.Usdc, + destination: destinationWallet, + gasless: true, + }); + + await transfer.wait(); + await new Promise(resolve => setTimeout(resolve, 60000)); + expect(transfer.toString()).toBeDefined(); expect(await transfer.getStatus()).toBe(TransferStatus.COMPLETE); - console.log(`Transferred 1 Gwei from ${unhydratedWallet} to ${wallet}`); - - console.log("Fetching updated balances..."); - const firstBalance = await unhydratedWallet.listBalances(); - const secondBalance = await wallet.listBalances(); - expect(firstBalance.get(Coinbase.assets.Eth)).not.toEqual("0"); - expect(secondBalance.get(Coinbase.assets.Eth)).not.toEqual("0"); - console.log(`First address balances: ${firstBalance}`); - console.log(`Second address balances: ${secondBalance}`); - - const savedSeed = JSON.parse(fs.readFileSync("test_seed.json", "utf-8")); - fs.unlinkSync("test_seed.json"); - - expect(exportedWallet.seed.length).toBe(64); - expect(savedSeed[exportedWallet.walletId]).toEqual({ - seed: exportedWallet.seed, - encrypted: false, - authTag: "", - iv: "", + console.log(`Completed gasless transfer from ${sourceWallet} to ${destinationWallet}`); + + // Verify balances + const sourceBalance = await sourceWallet.listBalances(); + const destBalance = await destinationWallet.listBalances(); + expect(sourceBalance.get(Coinbase.assets.Usdc)).not.toEqual("0"); + expect(destBalance.get(Coinbase.assets.Usdc)?.toString()).toEqual(`${transferAmount}`); + console.log(`Source balance: ${sourceBalance}`); + console.log(`Destination balance: ${destBalance}`); + }, 200000); +}); + +describe("Coinbase SDK Stake E2E Test", () => { + const requiredEnvVars = [ + "STAKE_API_KEY_NAME", + "STAKE_API_PRIVATE_KEY", + "STAKE_ADDRESS_ID_1", + "STAKE_ADDRESS_ID_2", + "STAKE_VALIDATOR_ADDRESS_1", + ]; + + beforeAll(() => { + dotenv.config(); + + requiredEnvVars.forEach(envVar => { + if (!process.env[envVar]) { + throw new Error(`Required environment variable ${envVar} is not set`); + } }); - }, 60000); + + Coinbase.configure({ + apiKeyName: process.env.STAKE_API_KEY_NAME as string, + privateKey: process.env.STAKE_API_PRIVATE_KEY as string, + }); + }); + + it("should be able to access environment variables", () => { + requiredEnvVars.forEach(envVar => { + expect(process.env[envVar]).toBeDefined(); + }); + }); + + describe("Stake: Reward Tests", () => { + it("should list shared eth staking rewards via StakingReward.list", async () => { + const networkId = Coinbase.networks.EthereumMainnet; + const assetId = Coinbase.assets.Eth; + const addressIds = [process.env.STAKE_ADDRESS_ID_1 as string]; + // May 1, 2024 - May 20, 2024 + const startTime = new Date(2024, 4, 1, 0, 0, 0).toISOString(); + const endTime = new Date(2024, 4, 20, 23, 59, 59).toISOString(); + const rewards = await StakingReward.list(networkId, assetId, addressIds, startTime, endTime); + + expect(rewards).toBeDefined(); + expect(rewards.length).toEqual(20); + }); + + it("should list shared eth staking rewards via ExternalAddress", async () => { + // May 1, 2024 - May 20, 2024 + const startTime = new Date(2024, 4, 1, 0, 0, 0).toISOString(); + const endTime = new Date(2024, 4, 20, 23, 59, 59).toISOString(); + + const address = new ExternalAddress( + Coinbase.networks.EthereumMainnet, + process.env.STAKE_ADDRESS_ID_1 as string, + ); + + const rewards = await address.stakingRewards(Coinbase.assets.Eth, startTime, endTime); + + expect(rewards).toBeDefined(); + expect(rewards.length).toEqual(20); + }); + }); + + describe("Stake: Balance Tests", () => { + it("should list shared eth staking balances via StakingBalance.list", async () => { + const networkId = Coinbase.networks.EthereumMainnet; + const assetId = Coinbase.assets.Eth; + const addressId = process.env.STAKE_VALIDATOR_ADDRESS_1 as string; + // Nov 1, 2024 - Nov 20, 2024 + const startTime = new Date(2024, 10, 1, 0, 0, 0).toISOString(); + const endTime = new Date(2024, 10, 20, 23, 59, 59).toISOString(); + const stakingBalances = await StakingBalance.list( + networkId, + assetId, + addressId, + startTime, + endTime, + ); + + expect(stakingBalances).toBeDefined(); + expect(stakingBalances.length).toEqual(20); + }); + }); + + /* + * CDP-266 Flaky tests + * describe("Stake: Validator Tests", () => { + * it("should list validators", async () => { + * const networkId = Coinbase.networks.EthereumMainnet; + * const assetId = Coinbase.assets.Eth; + * const status = ValidatorStatus.ACTIVE; + */ + + // const validators = await Validator.list(networkId, assetId, status); + + /* + * expect(validators).toBeDefined(); + * expect(validators.length).toEqual(1); + * const validator = validators[0]; + * expect(validator.getStatus()).toEqual(ValidatorStatus.ACTIVE); + * expect(validator.getValidatorId()).toEqual(process.env.STAKE_VALIDATOR_ADDRESS_1 as string); + * }); + */ + + /* + * it("should fetch a validator", async () => { + * const networkId = Coinbase.networks.EthereumMainnet; + * const assetId = Coinbase.assets.Eth; + * const validatorId = process.env.STAKE_VALIDATOR_ADDRESS_1 as string; + */ + + // const validator = await Validator.fetch(networkId, assetId, validatorId); + + /* + * expect(validator).toBeDefined(); + * expect(validator.getStatus()).toEqual(ValidatorStatus.ACTIVE); + * expect(validator.getValidatorId()).toEqual(validatorId); + * }); + * }); + */ + + describe.skip("Stake: Context Tests", () => { + it("should return stakeable balances for shared ETH staking", async () => { + const address = new ExternalAddress( + Coinbase.networks.EthereumMainnet, + process.env.STAKE_ADDRESS_ID_2 as string, + ); + + const stakeableBalance = await address.stakeableBalance( + Coinbase.assets.Eth, + StakeOptionsMode.PARTIAL, + ); + + expect(stakeableBalance).toBeDefined(); + expect(stakeableBalance.toNumber()).toBeGreaterThanOrEqual(0); + }); + + it("should return unstakeable balances for shared ETH staking", async () => { + const address = new ExternalAddress( + Coinbase.networks.EthereumMainnet, + process.env.STAKE_ADDRESS_ID_1 as string, + ); + + const stakeableBalance = await address.unstakeableBalance( + Coinbase.assets.Eth, + StakeOptionsMode.PARTIAL, + ); + + expect(stakeableBalance).toBeDefined(); + expect(stakeableBalance.toNumber()).toBeGreaterThanOrEqual(0); + }); + + it("should return claimable balances for shared ETH staking", async () => { + const address = new ExternalAddress( + Coinbase.networks.EthereumMainnet, + process.env.STAKE_ADDRESS_ID_1 as string, + ); + + const stakeableBalance = await address.claimableBalance( + Coinbase.assets.Eth, + StakeOptionsMode.PARTIAL, + ); + + expect(stakeableBalance).toBeDefined(); + expect(stakeableBalance.toNumber()).toBeGreaterThanOrEqual(0); + }); + + /* + * CDP-266 Flaky test + * it("should return unstakeable balances for Dedicated ETH staking", async () => { + * // This address is expected to have 1 validator associated with it, thus returning a 32 unstake balance. + */ + + /* + * const address = new ExternalAddress( + * Coinbase.networks.EthereumMainnet, + * process.env.STAKE_ADDRESS_ID_2 as string, + * ); + */ + + /* + * const stakeableBalance = await address.unstakeableBalance( + * Coinbase.assets.Eth, + * StakeOptionsMode.NATIVE, + * ); + */ + + /* + * expect(stakeableBalance).toBeDefined(); + * expect(stakeableBalance.toNumber()).toBeGreaterThanOrEqual(32); + * }); + */ + }); + + // Skip until shared eth staking incident is resolved. + describe.skip("Stake: Build Tests", () => { + it("should return an unsigned tx for shared ETH staking", async () => { + const address = new ExternalAddress( + Coinbase.networks.EthereumMainnet, + process.env.STAKE_ADDRESS_ID_2 as string, + ); + + const stakingOperation = await address.buildStakeOperation( + 0.0001, + Coinbase.assets.Eth, + StakeOptionsMode.PARTIAL, + ); + + await stakingOperation.wait({ timeoutSeconds: 5, intervalSeconds: 1 }); + + expect(stakingOperation).toBeDefined(); + expect(stakingOperation.getID()).toBeDefined(); + expect(stakingOperation.getStatus()).toEqual(StakingOperationStatusEnum.Complete); + expect(stakingOperation.getAddressID()).toEqual(process.env.STAKE_ADDRESS_ID_2 as string); + expect(stakingOperation.getNetworkID()).toEqual(Coinbase.networks.EthereumMainnet); + expect(stakingOperation.isCompleteState()).toBe(true); + expect(stakingOperation.getSignedVoluntaryExitMessages()).toEqual([]); + expect(stakingOperation.getTransactions().length).toEqual(1); + expect(stakingOperation.getTransactions()[0].isSigned()).toBe(false); + expect(stakingOperation.getTransactions()[0].getNetworkId()).toEqual( + Coinbase.networks.EthereumMainnet, + ); + expect(stakingOperation.getTransactions()[0].getUnsignedPayload()).toBeDefined(); + expect(stakingOperation.getTransactions()[0].getStatus()).toEqual(TransactionStatus.PENDING); + }); + }); }); diff --git a/src/tests/error_test.ts b/src/tests/error_test.ts index 6e4fa45f..017d3229 100644 --- a/src/tests/error_test.ts +++ b/src/tests/error_test.ts @@ -1,69 +1,69 @@ import { ArgumentError, - InternalError, - InvalidAPIKeyFormat, - InvalidConfiguration, - InvalidUnsignedPayload, + InvalidAPIKeyFormatError, + InvalidConfigurationError, + InvalidUnsignedPayloadError, + AlreadySignedError, } from "../coinbase/errors"; describe("Error Classes", () => { - test("InvalidAPIKeyFormat should have the correct message and name", () => { - const error = new InvalidAPIKeyFormat(); - expect(error.message).toBe(InvalidAPIKeyFormat.DEFAULT_MESSAGE); - expect(error.name).toBe("InvalidAPIKeyFormat"); + it("InvalidAPIKeyFormatError should have the correct message and name", () => { + const error = new InvalidAPIKeyFormatError(); + expect(error.message).toBe(InvalidAPIKeyFormatError.DEFAULT_MESSAGE); + expect(error.name).toBe("InvalidAPIKeyFormatError"); }); - test("InvalidAPIKeyFormat should accept a custom message", () => { + it("InvalidAPIKeyFormatError should accept a custom message", () => { const customMessage = "Custom invalid API key format message"; - const error = new InvalidAPIKeyFormat(customMessage); + const error = new InvalidAPIKeyFormatError(customMessage); expect(error.message).toBe(customMessage); }); - test("ArgumentError should have the correct message and name", () => { + it("ArgumentError should have the correct message and name", () => { const error = new ArgumentError(); expect(error.message).toBe(ArgumentError.DEFAULT_MESSAGE); expect(error.name).toBe("ArgumentError"); }); - test("ArgumentError should accept a custom message", () => { + it("ArgumentError should accept a custom message", () => { const customMessage = "Custom argument error message"; const error = new ArgumentError(customMessage); expect(error.message).toBe(customMessage); }); - test("InternalError should have the correct message and name", () => { - const error = new InternalError(); - expect(error.message).toBe(InternalError.DEFAULT_MESSAGE); - expect(error.name).toBe("InternalError"); + it("InvalidConfigurationError should have the correct message and name", () => { + const error = new InvalidConfigurationError(); + expect(error.message).toBe(InvalidConfigurationError.DEFAULT_MESSAGE); + expect(error.name).toBe("InvalidConfigurationError"); }); - test("InternalError should accept a custom message", () => { - const customMessage = "Custom internal error message"; - const error = new InternalError(customMessage); + it("InvalidConfigurationError should accept a custom message", () => { + const customMessage = "Custom invalid configuration message"; + const error = new InvalidConfigurationError(customMessage); expect(error.message).toBe(customMessage); }); - test("InvalidConfiguration should have the correct message and name", () => { - const error = new InvalidConfiguration(); - expect(error.message).toBe(InvalidConfiguration.DEFAULT_MESSAGE); - expect(error.name).toBe("InvalidConfiguration"); + it("InvalidUnsignedPayloadError should have the correct message and name", () => { + const error = new InvalidUnsignedPayloadError(); + expect(error.message).toBe(InvalidUnsignedPayloadError.DEFAULT_MESSAGE); + expect(error.name).toBe("InvalidUnsignedPayloadError"); }); - test("InvalidConfiguration should accept a custom message", () => { - const customMessage = "Custom invalid configuration message"; - const error = new InvalidConfiguration(customMessage); + it("InvalidUnsignedPayloadError should accept a custom message", () => { + const customMessage = "Custom invalid unsigned payload message"; + const error = new InvalidUnsignedPayloadError(customMessage); expect(error.message).toBe(customMessage); }); - test("InvalidUnsignedPayload should have the correct message and name", () => { - const error = new InvalidUnsignedPayload(); - expect(error.message).toBe(InvalidUnsignedPayload.DEFAULT_MESSAGE); - expect(error.name).toBe("InvalidUnsignedPayload"); + it("AlreadySignedError should have the correct message and name", () => { + const error = new AlreadySignedError(); + expect(error.message).toBe(AlreadySignedError.DEFAULT_MESSAGE); + expect(error.name).toBe("AlreadySignedError"); }); - test("InvalidUnsignedPayload should accept a custom message", () => { - const customMessage = "Custom invalid unsigned payload message"; - const error = new InvalidUnsignedPayload(customMessage); + it("AlreadySignedError should accept a custom message", () => { + const customMessage = "Custom already signed error message"; + const error = new AlreadySignedError(customMessage); expect(error.message).toBe(customMessage); }); }); diff --git a/src/tests/external_address_test.ts b/src/tests/external_address_test.ts index 997ceac1..16f3d43d 100644 --- a/src/tests/external_address_test.ts +++ b/src/tests/external_address_test.ts @@ -2,36 +2,47 @@ import { Coinbase } from "../coinbase/coinbase"; import { assetsApiMock, externalAddressApiMock, - generateRandomHash, getAssetMock, mockReturnValue, + newAddressModel, stakeApiMock, - VALID_ADDRESS_MODEL, + VALID_FAUCET_TRANSACTION_MODEL, } from "./utils"; import { AddressBalanceList, Balance, + FetchHistoricalStakingBalances200Response, + FetchStakingRewards200Response, StakingContext as StakingContextModel, StakingOperation as StakingOperationModel, + StakingOperationStatusEnum, + StakingRewardFormat, + StakingRewardStateEnum, } from "../client"; import Decimal from "decimal.js"; import { ExternalAddress } from "../coinbase/address/external_address"; import { StakeOptionsMode } from "../coinbase/types"; -import { StakingOperation } from "../coinbase/staking_operation"; +import { + ConsensusLayerExitOptionBuilder, + ExecutionLayerWithdrawalOptionsBuilder, + StakingOperation, +} from "../coinbase/staking_operation"; import { Asset } from "../coinbase/asset"; +import { randomUUID } from "crypto"; +import { StakingReward } from "../coinbase/staking_reward"; +import { StakingBalance } from "../coinbase/staking_balance"; describe("ExternalAddress", () => { - const address = new ExternalAddress( - VALID_ADDRESS_MODEL.network_id, - VALID_ADDRESS_MODEL.address_id, - ); + const newAddress = newAddressModel("", randomUUID(), Coinbase.networks.EthereumHoodi); + + const address = new ExternalAddress(newAddress.network_id, newAddress.address_id); const STAKING_CONTEXT_MODEL: StakingContextModel = { context: { stakeable_balance: { - amount: "3000000000000000000", + amount: "128000000000000000000", asset: { asset_id: Coinbase.assets.Eth, - network_id: Coinbase.networks.BaseSepolia, + network_id: Coinbase.networks.EthereumHoodi, decimals: 18, contract_address: "0x", }, @@ -40,7 +51,16 @@ describe("ExternalAddress", () => { amount: "2000000000000000000", asset: { asset_id: Coinbase.assets.Eth, - network_id: Coinbase.networks.BaseSepolia, + network_id: Coinbase.networks.EthereumHoodi, + decimals: 18, + contract_address: "0x", + }, + }, + pending_claimable_balance: { + amount: "1000000000000000000", + asset: { + asset_id: Coinbase.assets.Eth, + network_id: Coinbase.networks.EthereumHoodi, decimals: 18, contract_address: "0x", }, @@ -49,7 +69,7 @@ describe("ExternalAddress", () => { amount: "1000000000000000000", asset: { asset_id: Coinbase.assets.Eth, - network_id: Coinbase.networks.BaseSepolia, + network_id: Coinbase.networks.EthereumHoodi, decimals: 18, contract_address: "0x", }, @@ -57,6 +77,10 @@ describe("ExternalAddress", () => { }, }; const STAKING_OPERATION_MODEL: StakingOperationModel = { + id: randomUUID(), + network_id: Coinbase.networks.EthereumHoodi, + address_id: "0x1234567890", + status: StakingOperationStatusEnum.Initialized, transactions: [ { from_address_id: address.getId(), @@ -77,6 +101,99 @@ describe("ExternalAddress", () => { }, ], }; + const startTime = "2024-05-01T00:00:00Z"; + const endTime = "2024-05-21T00:00:00Z"; + const STAKING_REWARD_RESPONSE: FetchStakingRewards200Response = { + data: [ + { + address_id: address.getId(), + date: "2024-05-01", + amount: "361", + state: StakingRewardStateEnum.Pending, + format: StakingRewardFormat.Usd, + usd_value: { + amount: "361", + conversion_price: "3000", + conversion_time: "2024-05-01T00:00:00Z", + }, + }, + { + address_id: address.getId(), + date: "2024-05-02", + amount: "203", + state: StakingRewardStateEnum.Pending, + format: StakingRewardFormat.Usd, + usd_value: { + amount: "203", + conversion_price: "3000", + conversion_time: "2024-05-02T00:00:00Z", + }, + }, + { + address_id: address.getId(), + date: "2024-05-03", + amount: "226", + state: StakingRewardStateEnum.Pending, + format: StakingRewardFormat.Usd, + usd_value: { + amount: "226", + conversion_price: "3000", + conversion_time: "2024-05-03T00:00:00Z", + }, + }, + ], + has_more: false, + next_page: "", + }; + + const HISTORICAL_STAKING_BALANCES_RESPONSE: FetchHistoricalStakingBalances200Response = { + data: [ + { + address: address.getId(), + date: "2024-05-01", + bonded_stake: { + amount: "32", + asset: { + asset_id: Coinbase.assets.Eth, + network_id: address.getNetworkId(), + decimals: 18, + }, + }, + unbonded_balance: { + amount: "2", + asset: { + asset_id: Coinbase.assets.Eth, + network_id: address.getNetworkId(), + decimals: 18, + }, + }, + participant_type: "validator", + }, + { + address: address.getId(), + date: "2024-05-02", + bonded_stake: { + amount: "33", + asset: { + asset_id: Coinbase.assets.Eth, + network_id: address.getNetworkId(), + decimals: 18, + }, + }, + unbonded_balance: { + amount: "3", + asset: { + asset_id: Coinbase.assets.Eth, + network_id: address.getNetworkId(), + decimals: 18, + }, + }, + participant_type: "validator", + }, + ], + has_more: false, + next_page: "", + }; beforeAll(() => { Coinbase.apiClients.stake = stakeApiMock; @@ -87,7 +204,7 @@ describe("ExternalAddress", () => { jest.clearAllMocks(); }); - describe(".buildStakeOperation", () => { + describe("#buildStakeOperation", () => { it("should successfully build a stake operation", async () => { Coinbase.apiClients.stake!.getStakingContext = mockReturnValue(STAKING_CONTEXT_MODEL); Coinbase.apiClients.stake!.buildStakingOperation = mockReturnValue(STAKING_OPERATION_MODEL); @@ -120,31 +237,88 @@ describe("ExternalAddress", () => { expect(op).toBeInstanceOf(StakingOperation); }); - it("should return an error for not enough amount to stake", async () => { - Coinbase.apiClients.stake!.getStakingContext = mockReturnValue(STAKING_CONTEXT_MODEL); + describe("native eth staking", () => { + it("should successfully build an 0x01 stake operation", async () => { + Coinbase.apiClients.stake!.getStakingContext = mockReturnValue(STAKING_CONTEXT_MODEL); + Coinbase.apiClients.stake!.buildStakingOperation = mockReturnValue(STAKING_OPERATION_MODEL); + Coinbase.apiClients.asset!.getAsset = getAssetMock(); + const op = await address.buildStakeOperation( + new Decimal("32"), + Coinbase.assets.Eth, + StakeOptionsMode.NATIVE, + { + withdrawal_credential_type: "0x01", + }, + ); - await expect( - address.buildStakeOperation(new Decimal("3.1"), Coinbase.assets.Eth), - ).rejects.toThrow(Error); - expect(Coinbase.apiClients.stake!.getStakingContext).toHaveBeenCalledWith({ - address_id: address.getId(), - network_id: address.getNetworkId(), - asset_id: Coinbase.assets.Eth, - options: { - mode: StakeOptionsMode.DEFAULT, - }, + expect(Coinbase.apiClients.stake!.getStakingContext).toHaveBeenCalledWith({ + address_id: address.getId(), + network_id: address.getNetworkId(), + asset_id: Coinbase.assets.Eth, + options: { + mode: StakeOptionsMode.NATIVE, + withdrawal_credential_type: "0x01", + }, + }); + expect(Coinbase.apiClients.stake!.buildStakingOperation).toHaveBeenCalledWith({ + address_id: address.getId(), + network_id: address.getNetworkId(), + asset_id: Coinbase.assets.Eth, + action: "stake", + options: { + mode: StakeOptionsMode.NATIVE, + amount: "32000000000000000000", + withdrawal_credential_type: "0x01", + }, + }); + + expect(op).toBeInstanceOf(StakingOperation); + }); + + it("should successfully build an 0x02 stake operation", async () => { + Coinbase.apiClients.stake!.getStakingContext = mockReturnValue(STAKING_CONTEXT_MODEL); + Coinbase.apiClients.stake!.buildStakingOperation = mockReturnValue(STAKING_OPERATION_MODEL); + Coinbase.apiClients.asset!.getAsset = getAssetMock(); + const op = await address.buildStakeOperation( + new Decimal("64"), + Coinbase.assets.Eth, + StakeOptionsMode.NATIVE, + { + withdrawal_credential_type: "0x02", + }, + ); + + expect(Coinbase.apiClients.stake!.getStakingContext).toHaveBeenCalledWith({ + address_id: address.getId(), + network_id: address.getNetworkId(), + asset_id: Coinbase.assets.Eth, + options: { + mode: StakeOptionsMode.NATIVE, + withdrawal_credential_type: "0x02", + }, + }); + expect(Coinbase.apiClients.stake!.buildStakingOperation).toHaveBeenCalledWith({ + address_id: address.getId(), + network_id: address.getNetworkId(), + asset_id: Coinbase.assets.Eth, + action: "stake", + options: { + mode: StakeOptionsMode.NATIVE, + amount: "64000000000000000000", + withdrawal_credential_type: "0x02", + }, + }); + + expect(op).toBeInstanceOf(StakingOperation); }); - expect(Coinbase.apiClients.stake!.buildStakingOperation).toHaveBeenCalledTimes(0); }); - it("should return an error for trying to stake less than or equal to zero", async () => { + it("should return an error for not enough amount to stake", async () => { Coinbase.apiClients.stake!.getStakingContext = mockReturnValue(STAKING_CONTEXT_MODEL); - Coinbase.apiClients.stake!.buildStakingOperation = mockReturnValue(STAKING_OPERATION_MODEL); await expect( - address.buildStakeOperation(new Decimal("0"), Coinbase.assets.Eth), + address.buildStakeOperation(new Decimal("300"), Coinbase.assets.Eth), ).rejects.toThrow(Error); - expect(Coinbase.apiClients.stake!.getStakingContext).toHaveBeenCalledWith({ address_id: address.getId(), network_id: address.getNetworkId(), @@ -157,7 +331,7 @@ describe("ExternalAddress", () => { }); }); - describe(".buildUnstakeOperation", () => { + describe("#buildUnstakeOperation", () => { it("should successfully build a unstake operation", async () => { Coinbase.apiClients.stake!.getStakingContext = mockReturnValue(STAKING_CONTEXT_MODEL); Coinbase.apiClients.stake!.buildStakingOperation = mockReturnValue(STAKING_OPERATION_MODEL); @@ -202,27 +376,148 @@ describe("ExternalAddress", () => { expect(Coinbase.apiClients.stake!.buildStakingOperation).toHaveBeenCalledTimes(0); }); - it("should return an error for trying to unstake less than or equal to zero", async () => { - Coinbase.apiClients.stake!.getStakingContext = mockReturnValue(STAKING_CONTEXT_MODEL); - Coinbase.apiClients.stake!.buildStakingOperation = mockReturnValue(STAKING_OPERATION_MODEL); + describe("native eth consensus layer exits", () => { + it("should successfully build an unstake operation", async () => { + Coinbase.apiClients.stake!.buildStakingOperation = mockReturnValue(STAKING_OPERATION_MODEL); + Coinbase.apiClients.asset!.getAsset = getAssetMock(); + + const builder = new ConsensusLayerExitOptionBuilder(); + builder.addValidator("0x123"); + builder.addValidator("0x456"); + builder.addValidator("0x456"); + builder.addValidator("0x789"); + builder.addValidator("0x789"); + const options = await builder.build(); + + const op = await address.buildUnstakeOperation( + new Decimal("0"), + Coinbase.assets.Eth, + StakeOptionsMode.NATIVE, + options, + ); + + expect(Coinbase.apiClients.stake!.buildStakingOperation).toHaveBeenCalledWith({ + address_id: address.getId(), + network_id: address.getNetworkId(), + asset_id: Coinbase.assets.Eth, + action: "unstake", + options: { + mode: StakeOptionsMode.NATIVE, + amount: "0", + unstake_type: "consensus", + validator_pub_keys: "0x123,0x456,0x789", + }, + }); + expect(op).toBeInstanceOf(StakingOperation); + }); - await expect( - address.buildUnstakeOperation(new Decimal("0"), Coinbase.assets.Eth), - ).rejects.toThrow(Error); + it("should respect existing options", async () => { + Coinbase.apiClients.stake!.buildStakingOperation = mockReturnValue(STAKING_OPERATION_MODEL); + Coinbase.apiClients.asset!.getAsset = getAssetMock(); + + let options: { [key: string]: string } = { some_other_option: "value" }; + + const builder = new ConsensusLayerExitOptionBuilder(); + builder.addValidator("0x123"); + builder.addValidator("0x456"); + builder.addValidator("0x456"); + builder.addValidator("0x789"); + builder.addValidator("0x789"); + options = await builder.build(options); + + const op = await address.buildUnstakeOperation( + new Decimal("0"), + Coinbase.assets.Eth, + StakeOptionsMode.NATIVE, + options, + ); + + expect(Coinbase.apiClients.stake!.buildStakingOperation).toHaveBeenCalledWith({ + address_id: address.getId(), + network_id: address.getNetworkId(), + asset_id: Coinbase.assets.Eth, + action: "unstake", + options: { + mode: StakeOptionsMode.NATIVE, + some_other_option: "value", + amount: "0", + unstake_type: "consensus", + validator_pub_keys: "0x123,0x456,0x789", + }, + }); + expect(op).toBeInstanceOf(StakingOperation); + }); + }); - expect(Coinbase.apiClients.stake!.getStakingContext).toHaveBeenCalledWith({ - address_id: address.getId(), - network_id: address.getNetworkId(), - asset_id: Coinbase.assets.Eth, - options: { - mode: StakeOptionsMode.DEFAULT, - }, + describe("native eth execution layer withdrawals", () => { + it("should successfully build an unstake operation", async () => { + Coinbase.apiClients.stake!.buildStakingOperation = mockReturnValue(STAKING_OPERATION_MODEL); + Coinbase.apiClients.asset!.getAsset = getAssetMock(); + + const builder = new ExecutionLayerWithdrawalOptionsBuilder(address.getNetworkId()); + builder.addValidatorWithdrawal("0x123", new Decimal("1000")); + builder.addValidatorWithdrawal("0x456", new Decimal("2000")); + const options = await builder.build(); + + const op = await address.buildUnstakeOperation( + new Decimal("0"), + Coinbase.assets.Eth, + StakeOptionsMode.NATIVE, + options, + ); + + expect(Coinbase.apiClients.stake!.buildStakingOperation).toHaveBeenCalledWith({ + address_id: address.getId(), + network_id: address.getNetworkId(), + asset_id: Coinbase.assets.Eth, + action: "unstake", + options: { + mode: StakeOptionsMode.NATIVE, + amount: "0", + unstake_type: "execution", + validator_unstake_amounts: + '{"0x123":"1000000000000000000000","0x456":"2000000000000000000000"}', + }, + }); + expect(op).toBeInstanceOf(StakingOperation); + }); + + it("should respect existing options", async () => { + Coinbase.apiClients.stake!.buildStakingOperation = mockReturnValue(STAKING_OPERATION_MODEL); + Coinbase.apiClients.asset!.getAsset = getAssetMock(); + + let options: { [key: string]: string } = { some_other_option: "value" }; + + const builder = new ExecutionLayerWithdrawalOptionsBuilder(address.getNetworkId()); + builder.addValidatorWithdrawal("0x123", new Decimal("1000")); + options = await builder.build(options); + + const op = await address.buildUnstakeOperation( + new Decimal("0"), + Coinbase.assets.Eth, + StakeOptionsMode.NATIVE, + options, + ); + + expect(Coinbase.apiClients.stake!.buildStakingOperation).toHaveBeenCalledWith({ + address_id: address.getId(), + network_id: address.getNetworkId(), + asset_id: Coinbase.assets.Eth, + action: "unstake", + options: { + mode: StakeOptionsMode.NATIVE, + some_other_option: "value", + amount: "0", + unstake_type: "execution", + validator_unstake_amounts: '{"0x123":"1000000000000000000000"}', + }, + }); + expect(op).toBeInstanceOf(StakingOperation); }); - expect(Coinbase.apiClients.stake!.buildStakingOperation).toHaveBeenCalledTimes(0); }); }); - describe(".buildClaimStakeOperation", () => { + describe("#buildClaimStakeOperation", () => { it("should successfully build a claim stake operation", async () => { Coinbase.apiClients.stake!.getStakingContext = mockReturnValue(STAKING_CONTEXT_MODEL); Coinbase.apiClients.stake!.buildStakingOperation = mockReturnValue(STAKING_OPERATION_MODEL); @@ -267,27 +562,91 @@ describe("ExternalAddress", () => { expect(Coinbase.apiClients.stake!.buildStakingOperation).toHaveBeenCalledTimes(0); }); - it("should return an error for trying to claim stake less than or equal to zero", async () => { - Coinbase.apiClients.stake!.getStakingContext = mockReturnValue(STAKING_CONTEXT_MODEL); - Coinbase.apiClients.stake!.buildStakingOperation = mockReturnValue(STAKING_OPERATION_MODEL); - + it("should return an error for trying to claim stake for native eth", async () => { await expect( - address.buildClaimStakeOperation(new Decimal("0"), Coinbase.assets.Eth), + address.buildClaimStakeOperation( + new Decimal("0"), + Coinbase.assets.Eth, + StakeOptionsMode.NATIVE, + ), ).rejects.toThrow(Error); + }); + }); - expect(Coinbase.apiClients.stake!.getStakingContext).toHaveBeenCalledWith({ - address_id: address.getId(), + describe("#buildValidatorConsolidationOperation", () => { + it("should successfully build a validator consolidation operation", async () => { + const mockResponse = { data: "mockStakingOperationResponse" }; + Coinbase.apiClients.stake!.buildStakingOperation = jest.fn().mockResolvedValue(mockResponse); + + const options = { someOption: "value" }; + const op = await address.buildValidatorConsolidationOperation(options); + + expect(Coinbase.apiClients.stake!.buildStakingOperation).toHaveBeenCalledWith({ network_id: address.getNetworkId(), - asset_id: Coinbase.assets.Eth, + asset_id: "eth", + address_id: address.getId(), + action: "consolidate", options: { - mode: StakeOptionsMode.DEFAULT, + someOption: "value", + amount: "0", + mode: StakeOptionsMode.NATIVE, }, }); - expect(Coinbase.apiClients.stake!.buildStakingOperation).toHaveBeenCalledTimes(0); + + expect(op).toBeInstanceOf(StakingOperation); + }); + }); + + describe("#stakingRewards", () => { + it("should return staking rewards successfully", async () => { + Coinbase.apiClients.stake!.fetchStakingRewards = mockReturnValue(STAKING_REWARD_RESPONSE); + Coinbase.apiClients.asset!.getAsset = getAssetMock(); + const response = await address.stakingRewards(Coinbase.assets.Eth, startTime, endTime); + + expect(response).toBeInstanceOf(Array); + expect(response.length).toEqual(3); + expect(Coinbase.apiClients.stake!.fetchStakingRewards).toHaveBeenCalledWith( + { + network_id: address.getNetworkId(), + asset_id: Coinbase.assets.Eth, + address_ids: [address.getId()], + start_time: startTime, + end_time: endTime, + format: StakingRewardFormat.Usd, + }, + 100, + undefined, + ); + }); + }); + + describe("#historicalStakingBalances", () => { + it("should return staking balances successfully", async () => { + Coinbase.apiClients.stake!.fetchHistoricalStakingBalances = mockReturnValue( + HISTORICAL_STAKING_BALANCES_RESPONSE, + ); + Coinbase.apiClients.asset!.getAsset = getAssetMock(); + const response = await address.historicalStakingBalances( + Coinbase.assets.Eth, + startTime, + endTime, + ); + + expect(response).toBeInstanceOf(Array); + expect(response.length).toEqual(2); + expect(Coinbase.apiClients.stake!.fetchHistoricalStakingBalances).toHaveBeenCalledWith( + address.getNetworkId(), + Coinbase.assets.Eth, + address.getId(), + startTime, + endTime, + 100, + undefined, + ); }); }); - describe(".listBalances", () => { + describe("#listBalances", () => { beforeEach(() => { const mockBalanceResponse: AddressBalanceList = { data: [ @@ -295,7 +654,7 @@ describe("ExternalAddress", () => { amount: "1000000000000000000", asset: { asset_id: Coinbase.assets.Eth, - network_id: Coinbase.networks.BaseSepolia, + network_id: Coinbase.networks.EthereumHoodi, decimals: 18, }, }, @@ -303,7 +662,7 @@ describe("ExternalAddress", () => { amount: "5000000", asset: { asset_id: "usdc", - network_id: Coinbase.networks.BaseSepolia, + network_id: Coinbase.networks.EthereumHoodi, decimals: 6, }, }, @@ -349,13 +708,13 @@ describe("ExternalAddress", () => { }); }); - describe(".getBalance", () => { + describe("#getBalance", () => { beforeEach(() => { const mockWalletBalance: Balance = { amount: "5000000000000000000", asset: { asset_id: Coinbase.assets.Eth, - network_id: Coinbase.networks.BaseSepolia, + network_id: Coinbase.networks.EthereumHoodi, decimals: 18, }, }; @@ -417,16 +776,28 @@ describe("ExternalAddress", () => { }); }); - describe(".faucet", () => { + describe("#faucet", () => { beforeEach(() => { - Coinbase.apiClients.externalAddress!.requestExternalFaucetFunds = mockReturnValue({ - transaction_hash: generateRandomHash(8), - }); + Coinbase.apiClients.externalAddress!.requestExternalFaucetFunds = mockReturnValue( + VALID_FAUCET_TRANSACTION_MODEL, + ); }); it("should successfully request funds from the faucet", async () => { - const transaction = await address.faucet(); - expect(transaction.getTransactionHash()).toEqual(expect.any(String)); + const faucetTx = await address.faucet(); + + const { transaction_hash: txHash, transaction_link: txLink } = + VALID_FAUCET_TRANSACTION_MODEL.transaction; + + expect(faucetTx.getTransactionHash()).toEqual(txHash); + expect(faucetTx.getTransactionLink()).toEqual(txLink); + + expect(Coinbase.apiClients.externalAddress!.requestExternalFaucetFunds).toHaveBeenCalledWith( + address.getNetworkId(), + address.getId(), + undefined, + true, // Skip wait should be true. + ); }); it("should throw an error if the faucet request fails", async () => { @@ -435,11 +806,11 @@ describe("ExternalAddress", () => { }); }); - describe(".stakeableBalance", () => { + describe("#stakeableBalance", () => { it("should return the stakeable balance successfully with default params", async () => { Coinbase.apiClients.stake!.getStakingContext = mockReturnValue(STAKING_CONTEXT_MODEL); const stakeableBalance = await address.stakeableBalance(Coinbase.assets.Eth); - expect(stakeableBalance).toEqual(new Decimal("3")); + expect(stakeableBalance).toEqual(new Decimal("128")); expect(Coinbase.apiClients.stake!.getStakingContext).toHaveBeenCalledWith({ address_id: address.getId(), network_id: address.getNetworkId(), @@ -457,7 +828,7 @@ describe("ExternalAddress", () => { StakeOptionsMode.PARTIAL, {}, ); - expect(stakeableBalance).toEqual(new Decimal("3")); + expect(stakeableBalance).toEqual(new Decimal("128")); expect(Coinbase.apiClients.stake!.getStakingContext).toHaveBeenCalledWith({ address_id: address.getId(), network_id: address.getNetworkId(), @@ -469,7 +840,7 @@ describe("ExternalAddress", () => { }); }); - describe(".unstakeableBalance", () => { + describe("#unstakeableBalance", () => { it("should return the unstakeable balance successfully with default params", async () => { Coinbase.apiClients.stake!.getStakingContext = mockReturnValue(STAKING_CONTEXT_MODEL); const unstakeableBalance = await address.unstakeableBalance(Coinbase.assets.Eth); @@ -503,7 +874,41 @@ describe("ExternalAddress", () => { }); }); - describe(".claimableBalance", () => { + describe("#pendingClaimableBalance", () => { + it("should return the pending claimable balance successfully with default params", async () => { + Coinbase.apiClients.stake!.getStakingContext = mockReturnValue(STAKING_CONTEXT_MODEL); + const pendingClaimableBalance = await address.pendingClaimableBalance(Coinbase.assets.Eth); + expect(pendingClaimableBalance).toEqual(new Decimal("1")); + expect(Coinbase.apiClients.stake!.getStakingContext).toHaveBeenCalledWith({ + address_id: address.getId(), + network_id: address.getNetworkId(), + asset_id: Coinbase.assets.Eth, + options: { + mode: StakeOptionsMode.DEFAULT, + }, + }); + }); + + it("should return the pending claimable balance successfully in DEFAULT/PARTIAL mode", async () => { + Coinbase.apiClients.stake!.getStakingContext = mockReturnValue(STAKING_CONTEXT_MODEL); + const pendingClaimableBalance = await address.pendingClaimableBalance( + Coinbase.assets.Eth, + StakeOptionsMode.PARTIAL, + {}, + ); + expect(pendingClaimableBalance).toEqual(new Decimal("1")); + expect(Coinbase.apiClients.stake!.getStakingContext).toHaveBeenCalledWith({ + address_id: address.getId(), + network_id: address.getNetworkId(), + asset_id: Coinbase.assets.Eth, + options: { + mode: StakeOptionsMode.PARTIAL, + }, + }); + }); + }); + + describe("#claimableBalance", () => { it("should return the claimable balance successfully with default params", async () => { Coinbase.apiClients.stake!.getStakingContext = mockReturnValue(STAKING_CONTEXT_MODEL); const claimableBalance = await address.claimableBalance(Coinbase.assets.Eth); @@ -536,4 +941,23 @@ describe("ExternalAddress", () => { }); }); }); + + describe("#broadcastExternalTransaction", () => { + it("should successfully broadcast an external transaction", async () => { + Coinbase.apiClients.externalAddress!.broadcastExternalTransaction = mockReturnValue({ + transaction_hash: "transactionHash", + transaction_link: "transactionLink", + }); + const response = await address.broadcastExternalTransaction("signedPayload"); + expect(response).toEqual({ + transactionHash: "transactionHash", + transactionLink: "transactionLink", + }); + expect( + Coinbase.apiClients.externalAddress!.broadcastExternalTransaction, + ).toHaveBeenCalledWith(address.getNetworkId(), address.getId(), { + signed_payload: "signedPayload", + }); + }); + }); }); diff --git a/src/tests/faucet_transaction_test.ts b/src/tests/faucet_transaction_test.ts index 0d9df581..78e3b52a 100644 --- a/src/tests/faucet_transaction_test.ts +++ b/src/tests/faucet_transaction_test.ts @@ -1,21 +1,193 @@ import { FaucetTransaction } from "../coinbase/faucet_transaction"; +import { TransactionStatusEnum } from "../client/api"; +import { Coinbase } from "../coinbase/coinbase"; +import { + VALID_FAUCET_TRANSACTION_MODEL, + mockReturnValue, + mockReturnRejectedValue, + externalAddressApiMock, +} from "./utils"; describe("FaucetTransaction tests", () => { - it("should create a new FaucetTransaction instance and return the transaction hash", () => { - const faucetTransaction = new FaucetTransaction({ - transaction_hash: "abc", - transaction_link: "https://sepolia.basescan.org/tx/abc", + let faucetTransaction: FaucetTransaction; + let model; + const { + transaction_hash: txHash, + transaction_link: txLink, + network_id: networkId, + to_address_id: toAddressId, + } = VALID_FAUCET_TRANSACTION_MODEL.transaction!; + + beforeEach(() => { + Coinbase.apiClients.externalAddress = externalAddressApiMock; + + faucetTransaction = new FaucetTransaction(VALID_FAUCET_TRANSACTION_MODEL); + }); + + describe("constructor", () => { + it("initializes a FaucetTransaction", () => { + expect(faucetTransaction).toBeInstanceOf(FaucetTransaction); }); - expect(faucetTransaction).toBeInstanceOf(FaucetTransaction); - expect(faucetTransaction.getTransactionHash()).toBe("abc"); - expect(faucetTransaction.getTransactionLink()).toBe("https://sepolia.basescan.org/tx/abc"); - expect(faucetTransaction.toString()).toBe( - "Coinbase::FaucetTransaction{transaction_hash: 'abc', transaction_link: 'https://sepolia.basescan.org/tx/abc'}", - ); + it("throws an Error if model is not provided", () => { + expect(() => new FaucetTransaction(null!)).toThrow(`FaucetTransaction model cannot be empty`); + }); + }); + + describe("#getTransactionHash", () => { + it("returns the transaction hash", () => { + expect(faucetTransaction.getTransactionHash()).toBe(txHash); + }); + }); + + describe("#getTransactionLink", () => { + it("returns the transaction link", () => { + expect(faucetTransaction.getTransactionLink()).toBe(txLink); + }); }); - it("should throw an InternalError if model is not provided", () => { - expect(() => new FaucetTransaction(null!)).toThrow(`FaucetTransaction model cannot be empty`); + describe("#getNetworkId", () => { + it("returns the network ID", () => { + expect(faucetTransaction.getNetworkId()).toBe(networkId); + }); + }); + + describe("#getAddressId", () => { + it("returns the transaction to address ID", () => { + expect(faucetTransaction.getAddressId()).toBe(toAddressId); + }); + }); + + describe("#reload", () => { + let txStatus; + let reloadedFaucetTx: FaucetTransaction; + + beforeEach(async () => { + Coinbase.apiClients.externalAddress!.getFaucetTransaction = mockReturnValue({ + ...VALID_FAUCET_TRANSACTION_MODEL, + transaction: { + ...VALID_FAUCET_TRANSACTION_MODEL.transaction!, + status: txStatus, + }, + }); + + reloadedFaucetTx = await faucetTransaction.reload(); + }); + + [ + TransactionStatusEnum.Pending, + TransactionStatusEnum.Complete, + TransactionStatusEnum.Failed, + ].forEach(status => { + describe(`when the transaction is ${status}`, () => { + beforeAll(() => (txStatus = status)); + + it("returns a FaucetTransaction", () => { + expect(reloadedFaucetTx).toBeInstanceOf(FaucetTransaction); + }); + + it("updates the FaucetTransaction", () => { + expect(faucetTransaction.getStatus()).toBe(status); + }); + + it("calls the API to get the FaucetTransaction", () => { + expect(Coinbase.apiClients.externalAddress!.getFaucetTransaction).toHaveBeenCalledWith( + networkId, + toAddressId, + txHash, + ); + expect(Coinbase.apiClients.externalAddress!.getFaucetTransaction).toHaveBeenCalledTimes( + 1, + ); + }); + }); + }); + }); + + describe("#wait", () => { + describe("when the transaction eventually completes", () => { + beforeEach(() => { + Coinbase.apiClients.externalAddress!.getFaucetTransaction = jest + .fn() + .mockResolvedValueOnce({ data: VALID_FAUCET_TRANSACTION_MODEL }) // Pending + .mockResolvedValueOnce({ + data: { + ...VALID_FAUCET_TRANSACTION_MODEL, + transaction: { + ...VALID_FAUCET_TRANSACTION_MODEL.transaction!, + status: TransactionStatusEnum.Complete, + }, + }, + }); + }); + + it("returns the completed FaucetTransaction", async () => { + const completedFaucetTx = await faucetTransaction.wait(); + + expect(completedFaucetTx).toBeInstanceOf(FaucetTransaction); + expect(completedFaucetTx.getStatus()).toBe(TransactionStatusEnum.Complete); + }); + + it("calls the API to get the FaucetTransaction", async () => { + await faucetTransaction.wait(); + + expect(Coinbase.apiClients.externalAddress!.getFaucetTransaction).toHaveBeenCalledWith( + networkId, + toAddressId, + txHash, + ); + expect(Coinbase.apiClients.externalAddress!.getFaucetTransaction).toHaveBeenCalledTimes(2); + }); + }); + + describe("when the transaction eventually fails", () => { + beforeEach(() => { + Coinbase.apiClients.externalAddress!.getFaucetTransaction = jest + .fn() + .mockResolvedValueOnce({ data: VALID_FAUCET_TRANSACTION_MODEL }) // Pending + .mockResolvedValueOnce({ + data: { + ...VALID_FAUCET_TRANSACTION_MODEL, + transaction: { + ...VALID_FAUCET_TRANSACTION_MODEL.transaction!, + status: TransactionStatusEnum.Failed, + }, + }, + }); + }); + + it("returns the failed FaucetTransaction", async () => { + const failedFaucetTx = await faucetTransaction.wait(); + + expect(failedFaucetTx).toBeInstanceOf(FaucetTransaction); + expect(failedFaucetTx.getStatus()).toBe(TransactionStatusEnum.Failed); + }); + + it("calls the API to get the FaucetTransaction", async () => { + await faucetTransaction.wait(); + + expect(Coinbase.apiClients.externalAddress!.getFaucetTransaction).toHaveBeenCalledWith( + networkId, + toAddressId, + txHash, + ); + expect(Coinbase.apiClients.externalAddress!.getFaucetTransaction).toHaveBeenCalledTimes(2); + }); + }); + + describe("when the transaction times out", () => { + beforeEach(() => { + // Returns pending for every request. + Coinbase.apiClients.externalAddress!.getFaucetTransaction = jest + .fn() + .mockResolvedValueOnce({ data: VALID_FAUCET_TRANSACTION_MODEL }); // Pending + }); + + it("throws a TimeoutError", async () => { + expect( + faucetTransaction.wait({ timeoutSeconds: 0.001, intervalSeconds: 0.001 }), + ).rejects.toThrow(new Error("FaucetTransaction timed out")); + }); + }); }); }); diff --git a/src/tests/fiat_amount_test.ts b/src/tests/fiat_amount_test.ts new file mode 100644 index 00000000..c0e748c5 --- /dev/null +++ b/src/tests/fiat_amount_test.ts @@ -0,0 +1,41 @@ +import { FiatAmount } from "../coinbase/fiat_amount"; +import { FiatAmount as FiatAmountModel } from "../client/api"; + +describe("FiatAmount", () => { + describe(".fromModel", () => { + it("should convert a FiatAmount model to a FiatAmount", () => { + const model: FiatAmountModel = { + amount: "100.50", + currency: "USD", + }; + + const fiatAmount = FiatAmount.fromModel(model); + + expect(fiatAmount.getAmount()).toBe("100.50"); + expect(fiatAmount.getCurrency()).toBe("USD"); + }); + }); + + describe("#getAmount", () => { + it("should return the correct amount", () => { + const fiatAmount = new FiatAmount("50.25", "USD"); + expect(fiatAmount.getAmount()).toBe("50.25"); + }); + }); + + describe("#getCurrency", () => { + it("should return the correct currency", () => { + const fiatAmount = new FiatAmount("50.25", "USD"); + expect(fiatAmount.getCurrency()).toBe("USD"); + }); + }); + + describe("#toString", () => { + it("should return the correct string representation", () => { + const fiatAmount = new FiatAmount("75.00", "USD"); + const expectedStr = "FiatAmount(amount: '75.00', currency: 'USD')"; + + expect(fiatAmount.toString()).toBe(expectedStr); + }); + }); +}); diff --git a/src/tests/fund_operation_test.ts b/src/tests/fund_operation_test.ts new file mode 100644 index 00000000..ee8b32cd --- /dev/null +++ b/src/tests/fund_operation_test.ts @@ -0,0 +1,272 @@ +import { + FundOperation as FundOperationModel, + Asset as AssetModel, + FundOperationList, + FundOperationStatusEnum, +} from "../client/api"; +import { Coinbase } from "../coinbase/coinbase"; +import { + VALID_ASSET_MODEL, + mockReturnValue, + fundOperationsApiMock, + assetApiMock, + VALID_FUND_OPERATION_MODEL, + VALID_FUND_QUOTE_MODEL, +} from "./utils"; +import { Asset } from "../coinbase/asset"; +import { FundOperation } from "../coinbase/fund_operation"; +import Decimal from "decimal.js"; +import { FundQuote } from "../coinbase/fund_quote"; +import { CryptoAmount } from "../coinbase/crypto_amount"; +import { TimeoutError } from "../coinbase/errors"; +import { FundOperationStatus } from "../coinbase/types"; + +describe("FundOperation", () => { + let assetModel: AssetModel; + let asset: Asset; + let fundOperationModel: FundOperationModel; + let fundOperation: FundOperation; + + beforeEach(() => { + Coinbase.apiClients.asset = assetApiMock; + Coinbase.apiClients.fund = fundOperationsApiMock; + + assetModel = VALID_ASSET_MODEL; + asset = Asset.fromModel(assetModel); + + fundOperationModel = VALID_FUND_OPERATION_MODEL; + fundOperation = FundOperation.fromModel(fundOperationModel); + + Coinbase.apiClients.asset!.getAsset = mockReturnValue(assetModel); + Coinbase.apiClients.fund!.createFundOperation = mockReturnValue(fundOperationModel); + }); + + afterEach(() => { + jest.restoreAllMocks(); + }); + + describe("constructor", () => { + it("should initialize a FundOperation object", () => { + expect(fundOperation).toBeInstanceOf(FundOperation); + }); + }); + + describe(".create", () => { + it("should create a new fund operation without quote", async () => { + const newFundOperation = await FundOperation.create( + fundOperationModel.wallet_id, + fundOperationModel.address_id, + new Decimal(fundOperationModel.crypto_amount.amount), + fundOperationModel.crypto_amount.asset.asset_id, + fundOperationModel.network_id, + ); + expect(newFundOperation).toBeInstanceOf(FundOperation); + expect(Coinbase.apiClients.fund!.createFundOperation).toHaveBeenCalledWith( + fundOperationModel.wallet_id, + fundOperationModel.address_id, + { + fund_quote_id: undefined, + amount: new Decimal(fundOperationModel.crypto_amount.amount) + .mul(10 ** asset.decimals) + .toString(), + asset_id: fundOperationModel.crypto_amount.asset.asset_id, + }, + ); + }); + it("should create a new fund operation with quote", async () => { + const newFundOperation = await FundOperation.create( + fundOperationModel.wallet_id, + fundOperationModel.address_id, + new Decimal(fundOperationModel.crypto_amount.amount), + fundOperationModel.crypto_amount.asset.asset_id, + fundOperationModel.network_id, + FundQuote.fromModel(VALID_FUND_QUOTE_MODEL), + ); + expect(newFundOperation).toBeInstanceOf(FundOperation); + expect(Coinbase.apiClients.fund!.createFundOperation).toHaveBeenCalledWith( + fundOperationModel.wallet_id, + fundOperationModel.address_id, + { + fund_quote_id: VALID_FUND_QUOTE_MODEL.fund_quote_id, + amount: new Decimal(fundOperationModel.crypto_amount.amount) + .mul(10 ** asset.decimals) + .toString(), + asset_id: fundOperationModel.crypto_amount.asset.asset_id, + }, + ); + }); + }); + + describe(".listFundOperations", () => { + it("should list fund operations", async () => { + const response = { + data: [VALID_FUND_OPERATION_MODEL], + has_more: false, + next_page: "", + total_count: 0, + } as FundOperationList; + Coinbase.apiClients.fund!.listFundOperations = mockReturnValue(response); + const paginationResponse = await FundOperation.listFundOperations( + fundOperationModel.wallet_id, + fundOperationModel.address_id, + ); + const fundOperations = paginationResponse.data; + expect(fundOperations).toHaveLength(1); + expect(fundOperations[0]).toBeInstanceOf(FundOperation); + expect(Coinbase.apiClients.fund!.listFundOperations).toHaveBeenCalledTimes(1); + expect(Coinbase.apiClients.fund!.listFundOperations).toHaveBeenCalledWith( + fundOperationModel.wallet_id, + fundOperationModel.address_id, + 100, + undefined, + ); + }); + it("should handle pagination", async () => { + const response = { + data: [VALID_FUND_OPERATION_MODEL], + has_more: true, + next_page: "abc", + total_count: 0, + } as FundOperationList; + Coinbase.apiClients.fund!.listFundOperations = mockReturnValue(response); + const paginationResponse = await FundOperation.listFundOperations( + fundOperationModel.wallet_id, + fundOperationModel.address_id, + ); + expect(paginationResponse.nextPage).toEqual("abc"); + expect(paginationResponse.hasMore).toEqual(true); + const fundOperations = paginationResponse.data; + expect(fundOperations).toHaveLength(1); + expect(fundOperations[0]).toBeInstanceOf(FundOperation); + expect(Coinbase.apiClients.fund!.listFundOperations).toHaveBeenCalledTimes(1); + expect(Coinbase.apiClients.fund!.listFundOperations).toHaveBeenCalledWith( + fundOperationModel.wallet_id, + fundOperationModel.address_id, + 100, + undefined, + ); + }); + }); + + describe("#getId", () => { + it("should return the fund operation ID", () => { + expect(fundOperation.getId()).toEqual(fundOperationModel.fund_operation_id); + }); + }); + + describe("#getNetworkId", () => { + it("should return the network ID", () => { + expect(fundOperation.getNetworkId()).toEqual(fundOperationModel.network_id); + }); + }); + + describe("#getWalletId", () => { + it("should return the wallet ID", () => { + expect(fundOperation.getWalletId()).toEqual(fundOperationModel.wallet_id); + }); + }); + + describe("#getAddressId", () => { + it("should return the address ID", () => { + expect(fundOperation.getAddressId()).toEqual(fundOperationModel.address_id); + }); + }); + + describe("#getAsset", () => { + it("should return the asset", () => { + expect(fundOperation.getAsset()).toEqual(asset); + }); + }); + + describe("#getAmount", () => { + it("should return the amount", () => { + expect(fundOperation.getAmount()).toEqual( + CryptoAmount.fromModel(fundOperationModel.crypto_amount), + ); + }); + }); + + describe("#getFiatAmount", () => { + it("should return the fiat amount", () => { + expect(fundOperation.getFiatAmount()).toEqual( + new Decimal(fundOperationModel.fiat_amount.amount), + ); + }); + }); + + describe("#getFiatCurrency", () => { + it("should return the fiat currency", () => { + expect(fundOperation.getFiatCurrency()).toEqual(fundOperationModel.fiat_amount.currency); + }); + }); + + describe("#getStatus", () => { + it("should return the current status", () => { + expect(fundOperation.getStatus()).toEqual(fundOperationModel.status); + }); + }); + + describe("#reload", () => { + it("should return PENDING when the fund operation has not been created", async () => { + Coinbase.apiClients.fund!.getFundOperation = mockReturnValue({ + ...VALID_FUND_OPERATION_MODEL, + status: FundOperationStatusEnum.Pending, + }); + await fundOperation.reload(); + expect(fundOperation.getStatus()).toEqual(FundOperationStatus.PENDING); + expect(Coinbase.apiClients.fund!.getFundOperation).toHaveBeenCalledTimes(1); + }); + + it("should return COMPLETE when the fund operation is complete", async () => { + Coinbase.apiClients.fund!.getFundOperation = mockReturnValue({ + ...VALID_FUND_OPERATION_MODEL, + status: FundOperationStatusEnum.Complete, + }); + await fundOperation.reload(); + expect(fundOperation.getStatus()).toEqual(FundOperationStatus.COMPLETE); + expect(Coinbase.apiClients.fund!.getFundOperation).toHaveBeenCalledTimes(1); + }); + + it("should return FAILED when the fund operation has failed", async () => { + Coinbase.apiClients.fund!.getFundOperation = mockReturnValue({ + ...VALID_FUND_OPERATION_MODEL, + status: FundOperationStatusEnum.Failed, + }); + await fundOperation.reload(); + expect(fundOperation.getStatus()).toEqual(FundOperationStatus.FAILED); + expect(Coinbase.apiClients.fund!.getFundOperation).toHaveBeenCalledTimes(1); + }); + }); + + describe("#wait", () => { + it("should wait for operation to complete", async () => { + Coinbase.apiClients.fund!.getFundOperation = mockReturnValue({ + ...VALID_FUND_OPERATION_MODEL, + status: FundOperationStatusEnum.Complete, + }); + const completedFundOperation = await fundOperation.wait(); + expect(completedFundOperation).toBeInstanceOf(FundOperation); + expect(completedFundOperation.getStatus()).toEqual(FundOperationStatus.COMPLETE); + expect(Coinbase.apiClients.fund!.getFundOperation).toHaveBeenCalledTimes(1); + }); + it("should return the failed fund operation when the operation has failed", async () => { + Coinbase.apiClients.fund!.getFundOperation = mockReturnValue({ + ...VALID_FUND_OPERATION_MODEL, + status: FundOperationStatusEnum.Failed, + }); + const completedFundOperation = await fundOperation.wait(); + expect(completedFundOperation).toBeInstanceOf(FundOperation); + expect(completedFundOperation.getStatus()).toEqual(FundOperationStatus.FAILED); + expect(Coinbase.apiClients.fund!.getFundOperation).toHaveBeenCalledTimes(1); + }); + it("should throw an error when the fund operation has not been created", async () => { + Coinbase.apiClients.fund!.getFundOperation = mockReturnValue({ + ...VALID_FUND_OPERATION_MODEL, + status: FundOperationStatus.PENDING, + }); + await expect( + fundOperation.wait({ timeoutSeconds: 0.05, intervalSeconds: 0.05 }), + ).rejects.toThrow(new TimeoutError("Fund operation timed out")); + }); + }); +}); diff --git a/src/tests/fund_quote_test.ts b/src/tests/fund_quote_test.ts new file mode 100644 index 00000000..862a99eb --- /dev/null +++ b/src/tests/fund_quote_test.ts @@ -0,0 +1,156 @@ +import { FundQuote } from "../coinbase/fund_quote"; +import { FundQuote as FundQuoteModel, Asset as AssetModel } from "../client/api"; +import { Coinbase } from "../coinbase/coinbase"; +import { + VALID_FUND_QUOTE_MODEL, + VALID_ASSET_MODEL, + mockReturnValue, + fundOperationsApiMock, + assetApiMock, +} from "./utils"; +import { Asset } from "../coinbase/asset"; +import Decimal from "decimal.js"; +import { CryptoAmount } from "../coinbase/crypto_amount"; +import { FundOperation } from "../coinbase/fund_operation"; + +describe("FundQuote", () => { + let assetModel: AssetModel; + let asset: Asset; + let fundQuoteModel: FundQuoteModel; + let fundQuote: FundQuote; + + beforeEach(() => { + Coinbase.apiClients.asset = assetApiMock; + Coinbase.apiClients.fund = fundOperationsApiMock; + + assetModel = VALID_ASSET_MODEL; + asset = Asset.fromModel(assetModel); + + fundQuoteModel = VALID_FUND_QUOTE_MODEL; + fundQuote = FundQuote.fromModel(fundQuoteModel); + + Coinbase.apiClients.asset!.getAsset = mockReturnValue(assetModel); + Coinbase.apiClients.fund!.createFundQuote = mockReturnValue(fundQuoteModel); + }); + + afterEach(() => { + jest.restoreAllMocks(); + }); + + describe("constructor", () => { + it("should initialize a FundQuote object", () => { + expect(fundQuote).toBeInstanceOf(FundQuote); + }); + }); + + describe(".create", () => { + it("should create a new fund quote", async () => { + const newFundQuote = await FundQuote.create( + fundQuoteModel.wallet_id, + fundQuoteModel.address_id, + new Decimal(fundQuoteModel.crypto_amount.amount), + fundQuoteModel.crypto_amount.asset.asset_id, + fundQuoteModel.network_id, + ); + expect(newFundQuote).toBeInstanceOf(FundQuote); + expect(Coinbase.apiClients.asset!.getAsset).toHaveBeenCalledWith( + fundQuoteModel.network_id, + fundQuoteModel.crypto_amount.asset.asset_id, + ); + expect(Coinbase.apiClients.fund!.createFundQuote).toHaveBeenCalledWith( + fundQuoteModel.wallet_id, + fundQuoteModel.address_id, + { + asset_id: Asset.primaryDenomination(fundQuoteModel.crypto_amount.asset.asset_id), + amount: asset.toAtomicAmount(new Decimal(fundQuoteModel.crypto_amount.amount)).toString(), + }, + ); + }); + }); + + describe("#getId", () => { + it("should return the fund quote ID", () => { + expect(fundQuote.getId()).toEqual(fundQuoteModel.fund_quote_id); + }); + }); + + describe("#getNetworkId", () => { + it("should return the network ID", () => { + expect(fundQuote.getNetworkId()).toEqual(fundQuoteModel.network_id); + }); + }); + + describe("#getWalletId", () => { + it("should return the wallet ID", () => { + expect(fundQuote.getWalletId()).toEqual(fundQuoteModel.wallet_id); + }); + }); + + describe("#getAddressId", () => { + it("should return the address ID", () => { + expect(fundQuote.getAddressId()).toEqual(fundQuoteModel.address_id); + }); + }); + + describe("#getAsset", () => { + it("should return the asset", () => { + expect(fundQuote.getAsset()).toEqual(asset); + }); + }); + + describe("#getAmount", () => { + it("should return the crypto amount", () => { + const cryptoAmount = fundQuote.getAmount(); + expect(cryptoAmount.getAmount()).toEqual( + new Decimal(fundQuoteModel.crypto_amount.amount).div(new Decimal(10).pow(asset.decimals)), + ); + expect(cryptoAmount.getAsset()).toEqual(asset); + }); + }); + + describe("#getFiatAmount", () => { + it("should return the fiat amount", () => { + expect(fundQuote.getFiatAmount()).toEqual(new Decimal(fundQuoteModel.fiat_amount.amount)); + }); + }); + + describe("#getFiatCurrency", () => { + it("should return the fiat currency", () => { + expect(fundQuote.getFiatCurrency()).toEqual(fundQuoteModel.fiat_amount.currency); + }); + }); + + describe("#getBuyFee", () => { + it("should return the buy fee", () => { + expect(fundQuote.getBuyFee()).toEqual({ + amount: fundQuoteModel.fees.buy_fee.amount, + currency: fundQuoteModel.fees.buy_fee.currency, + }); + }); + }); + + describe("#getTransferFee", () => { + it("should return the transfer fee", () => { + expect(fundQuote.getTransferFee()).toEqual( + CryptoAmount.fromModel(fundQuoteModel.fees.transfer_fee), + ); + }); + }); + + describe("#execute", () => { + it("should execute the fund quote and create a fund operation", async () => { + Coinbase.apiClients.fund!.createFundOperation = mockReturnValue(fundQuoteModel); + const newFundOperation = await fundQuote.execute(); + expect(newFundOperation).toBeInstanceOf(FundOperation); + expect(Coinbase.apiClients.fund!.createFundOperation).toHaveBeenCalledWith( + fundQuoteModel.wallet_id, + fundQuoteModel.address_id, + { + asset_id: Asset.primaryDenomination(fundQuoteModel.crypto_amount.asset.asset_id), + amount: fundQuoteModel.crypto_amount.amount, + fund_quote_id: fundQuoteModel.fund_quote_id, + }, + ); + }); + }); +}); diff --git a/src/tests/hash_test.ts b/src/tests/hash_test.ts new file mode 100644 index 00000000..95828c9e --- /dev/null +++ b/src/tests/hash_test.ts @@ -0,0 +1,106 @@ +import { ethers } from "ethers"; +import { hashMessage, hashTypedDataMessage } from "../coinbase/hash"; + +describe("hashMessage", () => { + const mockHashMessage = jest.spyOn(ethers, "hashMessage"); + + beforeEach(() => { + jest.clearAllMocks(); + }); + + it("should hash a string message correctly using EIP-191", () => { + const message = "Hello, Ethereum!"; + const expectedHash = "0xExpectedHash"; + + mockHashMessage.mockReturnValue(expectedHash); + + const result = hashMessage(message); + expect(result).toBe(expectedHash); + expect(mockHashMessage).toHaveBeenCalledWith(message); + expect(mockHashMessage).toHaveBeenCalledTimes(1); + }); + + it("should throw an error if ethers throws an error", () => { + const invalidMessage = 12345; + const expectedError = new Error("invalid message"); + + mockHashMessage.mockImplementation(() => { + throw expectedError; + }); + + expect(() => hashMessage(invalidMessage as any)).toThrow(expectedError); + expect(mockHashMessage).toHaveBeenCalledWith(invalidMessage); + expect(mockHashMessage).toHaveBeenCalledTimes(1); + }); +}); + +describe("hashTypedDataMessage", () => { + const mockTypedDataEncoderHash = jest.spyOn(ethers.TypedDataEncoder, "hash"); + + beforeEach(() => { + jest.clearAllMocks(); + }); + + it("should hash typed data message correctly using EIP-712", () => { + const domain = { + name: "Ether Mail", + version: "1", + chainId: 1, + verifyingContract: "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC", + }; + + const types = { + Person: [ + { name: "name", type: "string" }, + { name: "wallet", type: "address" }, + ], + }; + + const value = { + name: "Alice", + wallet: "0x123456789abcdef123456789abcdef123456789a", + }; + + const expectedHash = "0xExpectedHash"; + + mockTypedDataEncoderHash.mockReturnValue(expectedHash); + + const result = hashTypedDataMessage(domain, types, value); + expect(result).toBe(expectedHash); + expect(mockTypedDataEncoderHash).toHaveBeenCalledWith(domain, types, value); + expect(mockTypedDataEncoderHash).toHaveBeenCalledTimes(1); + }); + + it("should throw an error if ethers throws an error", () => { + const domain = { + name: "Invalid", + version: "1", + chainId: 1, + verifyingContract: "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC", + }; + + const types = { + Person: [ + { name: "name", type: "string" }, + { name: "wallet", type: "address" }, + ], + }; + + const value = { + name: "InvalidName", + wallet: "invalidWallet", + }; + + const expectedError = new Error("invalid typed data message"); + + mockTypedDataEncoderHash.mockImplementation(() => { + throw expectedError; + }); + + expect(() => { + hashTypedDataMessage(domain, types, value); + }).toThrow(expectedError); + expect(mockTypedDataEncoderHash).toHaveBeenCalledWith(domain, types, value); + expect(mockTypedDataEncoderHash).toHaveBeenCalledTimes(1); + }); +}); diff --git a/src/tests/historical_balance_test.ts b/src/tests/historical_balance_test.ts new file mode 100644 index 00000000..eb1397f4 --- /dev/null +++ b/src/tests/historical_balance_test.ts @@ -0,0 +1,31 @@ +import { HistoricalBalance } from "../coinbase/historical_balance"; +import { HistoricalBalance as HistoricalBalanceModel } from "../client"; +import { Decimal } from "decimal.js"; +import { Coinbase } from "../coinbase/coinbase"; + +describe("HistoricalBalance", () => { + describe("#fromModel", () => { + const amount = new Decimal(1); + const historyModel: HistoricalBalanceModel = { + amount: "1000000000000000000", + block_hash: "0x0dadd465fb063ceb78babbb30abbc6bfc0730d0c57a53e8f6dc778dafcea568f", + block_height: "11349306", + asset: { + asset_id: Coinbase.assets.Eth, + network_id: Coinbase.networks.BaseSepolia, + decimals: 18, + contract_address: "0x", + }, + }; + + const historicalBalance = HistoricalBalance.fromModel(historyModel); + + it("returns a new HistoricalBalance object with the correct amount", () => { + expect(historicalBalance.amount).toEqual(amount); + }); + + it("returns a new HistoricalBalance object with the correct asset_id", () => { + expect(historicalBalance.asset.assetId).toBe(Coinbase.assets.Eth); + }); + }); +}); diff --git a/src/tests/index_test.ts b/src/tests/index_test.ts new file mode 100644 index 00000000..d6c7c928 --- /dev/null +++ b/src/tests/index_test.ts @@ -0,0 +1,42 @@ +// test/index.test.ts +import * as index from "../index"; + +describe("Index file exports", () => { + it("should export all modules correctly", () => { + expect(index).toBeDefined(); + expect(index).toHaveProperty("Address"); + expect(index).toHaveProperty("APIError"); + expect(index).toHaveProperty("Asset"); + expect(index).toHaveProperty("Balance"); + expect(index).toHaveProperty("BalanceMap"); + expect(index).toHaveProperty("Coinbase"); + expect(index).toHaveProperty("ContractEvent"); + expect(index).toHaveProperty("ContractInvocation"); + expect(index).toHaveProperty("ExternalAddress"); + expect(index).toHaveProperty("FaucetTransaction"); + expect(index).toHaveProperty("GWEI_DECIMALS"); + expect(index).toHaveProperty("HistoricalBalance"); + expect(index).toHaveProperty("InvalidAPIKeyFormatError"); + expect(index).toHaveProperty("PayloadSignature"); + expect(index).toHaveProperty("ServerSigner"); + expect(index).toHaveProperty("SmartContract"); + expect(index).toHaveProperty("SponsoredSendStatus"); + expect(index).toHaveProperty("StakeOptionsMode"); + expect(index).toHaveProperty("StakingBalance"); + expect(index).toHaveProperty("StakingOperation"); + expect(index).toHaveProperty("StakingReward"); + expect(index).toHaveProperty("Trade"); + expect(index).toHaveProperty("Transaction"); + expect(index).toHaveProperty("TransactionStatus"); + expect(index).toHaveProperty("Transfer"); + expect(index).toHaveProperty("TransferStatus"); + expect(index).toHaveProperty("Validator"); + expect(index).toHaveProperty("Wallet"); + expect(index).toHaveProperty("WalletAddress"); + expect(index).toHaveProperty("Webhook"); + expect(index).toHaveProperty("CryptoAmount"); + expect(index).toHaveProperty("FiatAmount"); + expect(index).toHaveProperty("FundOperation"); + expect(index).toHaveProperty("FundQuote"); + }); +}); diff --git a/src/tests/payload_signature_test.ts b/src/tests/payload_signature_test.ts new file mode 100644 index 00000000..c769d514 --- /dev/null +++ b/src/tests/payload_signature_test.ts @@ -0,0 +1,214 @@ +import { PayloadSignature } from "../coinbase/payload_signature"; +import { + VALID_PAYLOAD_SIGNATURE_MODEL, + VALID_SIGNED_PAYLOAD_SIGNATURE_MODEL, + addressesApiMock, + mockReturnValue, + mockReturnRejectedValue, +} from "./utils"; +import { PayloadSignatureStatusEnum } from "../client"; +import { Coinbase } from "../coinbase/coinbase"; +import { APIError } from "../coinbase/api_error"; + +describe("PayloadSignature", () => { + beforeEach(() => {}); + + describe("constructor", () => { + it("initializes a new PayloadSignature", () => { + const payloadSignature = new PayloadSignature(VALID_PAYLOAD_SIGNATURE_MODEL); + expect(payloadSignature).toBeInstanceOf(PayloadSignature); + }); + + it("should raise an error when initialized with an invalid model", () => { + expect(() => new PayloadSignature(null!)).toThrow("Invalid model type"); + }); + }); + + describe("#getId", () => { + it("should return the Payload Signature ID", () => { + const payloadSignature = new PayloadSignature(VALID_PAYLOAD_SIGNATURE_MODEL); + expect(payloadSignature.getId()).toEqual(VALID_PAYLOAD_SIGNATURE_MODEL.payload_signature_id); + }); + }); + + describe("#getWalletId", () => { + it("should return the Wallet ID", () => { + const payloadSignature = new PayloadSignature(VALID_PAYLOAD_SIGNATURE_MODEL); + expect(payloadSignature.getWalletId()).toEqual(VALID_PAYLOAD_SIGNATURE_MODEL.wallet_id); + }); + }); + + describe("#getAddressId", () => { + it("should return the Address ID", () => { + const payloadSignature = new PayloadSignature(VALID_PAYLOAD_SIGNATURE_MODEL); + expect(payloadSignature.getAddressId()).toEqual(VALID_PAYLOAD_SIGNATURE_MODEL.address_id); + }); + }); + + describe("#getUnsignedPayload", () => { + it("should return the Unsigned Payload", () => { + const payloadSignature = new PayloadSignature(VALID_PAYLOAD_SIGNATURE_MODEL); + expect(payloadSignature.getUnsignedPayload()).toEqual( + VALID_PAYLOAD_SIGNATURE_MODEL.unsigned_payload, + ); + }); + }); + + describe("#getSignature", () => { + it("should return undefined when the PayloadSignature has not been signed", () => { + const payloadSignature = new PayloadSignature(VALID_PAYLOAD_SIGNATURE_MODEL); + expect(payloadSignature.getSignature()).toBeUndefined(); + }); + + it("should return the signature when the PayloadSignature has been signed", () => { + const payloadSignature = new PayloadSignature(VALID_SIGNED_PAYLOAD_SIGNATURE_MODEL); + expect(payloadSignature.getSignature()).toEqual( + VALID_SIGNED_PAYLOAD_SIGNATURE_MODEL.signature, + ); + }); + }); + + describe("#getStatus", () => { + it("should return a pending status", () => { + const payloadSignature = new PayloadSignature(VALID_PAYLOAD_SIGNATURE_MODEL); + expect(payloadSignature.getStatus()).toEqual("pending"); + }); + + it("should return a signed status", () => { + const payloadSignature = new PayloadSignature(VALID_SIGNED_PAYLOAD_SIGNATURE_MODEL); + expect(payloadSignature.getStatus()).toEqual("signed"); + }); + + it("should return a failed status", () => { + const payloadSignature = new PayloadSignature({ + ...VALID_PAYLOAD_SIGNATURE_MODEL, + status: PayloadSignatureStatusEnum.Failed, + }); + expect(payloadSignature.getStatus()).toEqual("failed"); + }); + }); + + describe("#isTerminalState", () => { + it("should not be in a terminal state", () => { + const payloadSignature = new PayloadSignature(VALID_PAYLOAD_SIGNATURE_MODEL); + expect(payloadSignature.isTerminalState()).toEqual(false); + }); + + it("should be in a terminal state", () => { + const payloadSignature = new PayloadSignature(VALID_SIGNED_PAYLOAD_SIGNATURE_MODEL); + expect(payloadSignature.isTerminalState()).toEqual(true); + }); + }); + + describe("#wait", () => { + beforeAll(() => { + Coinbase.apiClients.address = addressesApiMock; + }); + + beforeEach(() => { + jest.clearAllMocks(); + }); + + it("should update Payload Signature model", async () => { + Coinbase.apiClients.address!.getPayloadSignature = mockReturnValue( + VALID_SIGNED_PAYLOAD_SIGNATURE_MODEL, + ); + + let payloadSignature = new PayloadSignature(VALID_PAYLOAD_SIGNATURE_MODEL); + await payloadSignature.wait(); + + expect(Coinbase.apiClients.address!.getPayloadSignature).toHaveBeenCalledWith( + VALID_PAYLOAD_SIGNATURE_MODEL.wallet_id, + VALID_PAYLOAD_SIGNATURE_MODEL.address_id, + VALID_PAYLOAD_SIGNATURE_MODEL.payload_signature_id, + ); + expect(Coinbase.apiClients.address!.getPayloadSignature).toHaveBeenCalledTimes(1); + expect(payloadSignature.getStatus()).toEqual("signed"); + expect(payloadSignature.isTerminalState()).toEqual(true); + }); + + it("should throw an APIError when the API call to get payload signature fails", async () => { + Coinbase.apiClients.address!.getPayloadSignature = mockReturnRejectedValue( + new APIError("Failed to get payload signature"), + ); + + let payloadSignature = new PayloadSignature(VALID_PAYLOAD_SIGNATURE_MODEL); + + expect(async () => { + await payloadSignature.reload(); + }).rejects.toThrow(Error); + + expect(Coinbase.apiClients.address!.getPayloadSignature).toHaveBeenCalledWith( + VALID_PAYLOAD_SIGNATURE_MODEL.wallet_id, + VALID_PAYLOAD_SIGNATURE_MODEL.address_id, + VALID_PAYLOAD_SIGNATURE_MODEL.payload_signature_id, + ); + expect(Coinbase.apiClients.address!.getPayloadSignature).toHaveBeenCalledTimes(1); + }); + }); + + describe("#reload", () => { + beforeAll(() => { + Coinbase.apiClients.address = addressesApiMock; + }); + + beforeEach(() => { + jest.clearAllMocks(); + }); + + it("should update Payload Signature model", async () => { + Coinbase.apiClients.address!.getPayloadSignature = mockReturnValue( + VALID_SIGNED_PAYLOAD_SIGNATURE_MODEL, + ); + + let payloadSignature = new PayloadSignature(VALID_PAYLOAD_SIGNATURE_MODEL); + await payloadSignature.reload(); + + expect(Coinbase.apiClients.address!.getPayloadSignature).toHaveBeenCalledWith( + VALID_PAYLOAD_SIGNATURE_MODEL.wallet_id, + VALID_PAYLOAD_SIGNATURE_MODEL.address_id, + VALID_PAYLOAD_SIGNATURE_MODEL.payload_signature_id, + ); + expect(Coinbase.apiClients.address!.getPayloadSignature).toHaveBeenCalledTimes(1); + expect(payloadSignature.getStatus()).toEqual("signed"); + }); + + it("should throw an APIError when the API call to get payload signature fails", async () => { + Coinbase.apiClients.address!.getPayloadSignature = mockReturnRejectedValue( + new APIError("Failed to get payload signature"), + ); + + let payloadSignature = new PayloadSignature(VALID_PAYLOAD_SIGNATURE_MODEL); + + expect(async () => { + await payloadSignature.reload(); + }).rejects.toThrow(Error); + + expect(Coinbase.apiClients.address!.getPayloadSignature).toHaveBeenCalledWith( + VALID_PAYLOAD_SIGNATURE_MODEL.wallet_id, + VALID_PAYLOAD_SIGNATURE_MODEL.address_id, + VALID_PAYLOAD_SIGNATURE_MODEL.payload_signature_id, + ); + expect(Coinbase.apiClients.address!.getPayloadSignature).toHaveBeenCalledTimes(1); + }); + }); + + describe("#toString", () => { + let payloadSignature: PayloadSignature; + + beforeAll(() => { + payloadSignature = new PayloadSignature(VALID_SIGNED_PAYLOAD_SIGNATURE_MODEL); + }); + + it("includes PayloadSignature details", () => { + expect(payloadSignature.toString()).toContain(payloadSignature.getStatus()); + }); + + it("returns the same value as toString", () => { + const payloadSignature = new PayloadSignature(VALID_SIGNED_PAYLOAD_SIGNATURE_MODEL); + expect(payloadSignature.toString()).toEqual( + `PayloadSignature { status: '${payloadSignature.getStatus()}', unsignedPayload: '${payloadSignature.getUnsignedPayload()}', signature: ${payloadSignature.getSignature()} }`, + ); + }); + }); +}); diff --git a/src/tests/read_contract_test.ts b/src/tests/read_contract_test.ts new file mode 100644 index 00000000..1dcb7e76 --- /dev/null +++ b/src/tests/read_contract_test.ts @@ -0,0 +1,1684 @@ +import { readContract } from "../coinbase/read_contract"; +import { Coinbase } from "../coinbase/coinbase"; +import { SolidityValue } from "../client"; +import { smartContractApiMock, testAllReadTypesABI } from "./utils"; + +describe("readContract", () => { + beforeEach(() => { + // Assign the mock to Coinbase.apiClients.smartContract + Coinbase.apiClients.smartContract = smartContractApiMock; + + // Clear all mock calls before each test + jest.clearAllMocks(); + }); + + describe("With an ABI", () => { + it("should correctly read a uint8 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "uint8", + value: "123", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureUint8", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureUint8", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe(123); + }); + + it("should correctly read a uint16 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "uint16", + value: "12345", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureUint16", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureUint16", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe(12345); + }); + + it("should correctly read a uint32 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "uint32", + value: "4294967295", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureUint32", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureUint32", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe(4294967295); + }); + + it("should correctly read a uint64 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "uint64", + value: "18446744073709551615", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureUint64", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureUint64", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe(18446744073709551615n); + }); + + it("should correctly read a uint128 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "uint128", + value: "340282366920938463463374607431768211455", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureUint128", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureUint128", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe(340282366920938463463374607431768211455n); + }); + + it("should correctly read a uint256 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "uint256", + value: "123456789", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureUint256", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureUint256", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + // Check if the result is correctly parsed + expect(result).toBe(123456789n); + }); + + it("should correctly read an int8 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "int8", + value: "-128", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureInt8", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureInt8", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe(-128); + }); + + it("should correctly read an int16 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "int16", + value: "-32768", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureInt16", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureInt16", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe(-32768); + }); + + it("should correctly read an int32 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "int32", + value: "-2147483648", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureInt32", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureInt32", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe(-2147483648); + }); + + it("should correctly read an int64 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "int64", + value: "-9223372036854775808", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureInt64", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureInt64", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe(-9223372036854775808n); + }); + + it("should correctly read an int128 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "int128", + value: "-170141183460469231731687303715884105728", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureInt128", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureInt128", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe(-170141183460469231731687303715884105728n); + }); + + it("should correctly read a int256 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "int256", + value: "-170141183460469231731687303715884105728", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureInt256", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureInt256", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe(-170141183460469231731687303715884105728n); + }); + + it("should correctly read a bool value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "bool", + value: "true", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureBool", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureBool", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe(true); + }); + + it("should correctly read a string value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "string", + value: "Hello, World!", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureString", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureString", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe("Hello, World!"); + }); + + it("should correctly read an address value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "address", + value: "0x1234567890123456789012345678901234567890", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureAddress", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureAddress", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe("0x1234567890123456789012345678901234567890"); + }); + + it("should correctly read a bytes1 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "bytes1", + value: "0x12", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureBytes1", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureBytes1", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe("0x12"); + }); + + it("should correctly read a bytes2 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "bytes2", + value: "0x1234", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureBytes2", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureBytes2", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe("0x1234"); + }); + + it("should correctly read a bytes3 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "bytes3", + value: "0x123456", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureBytes3", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureBytes3", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe("0x123456"); + }); + + it("should correctly read a bytes4 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "bytes4", + value: "0x12345678", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureBytes4", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureBytes4", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe("0x12345678"); + }); + + it("should correctly read a bytes5 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "bytes5", + value: "0x123456789", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureBytes5", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureBytes5", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe("0x123456789"); + }); + + it("should correctly read a bytes6 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "bytes6", + value: "0x123456789012", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureBytes6", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureBytes6", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe("0x123456789012"); + }); + + it("should correctly read a bytes7 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "bytes7", + value: "0x123456789012345", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureBytes7", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureBytes7", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe("0x123456789012345"); + }); + + it("should correctly read a bytes8 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "bytes8", + value: "0x123456789012345678", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureBytes8", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureBytes8", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe("0x123456789012345678"); + }); + + it("should correctly read a bytes9 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "bytes9", + value: "0x123456789012345678901", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureBytes9", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureBytes9", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe("0x123456789012345678901"); + }); + + it("should correctly read a bytes10 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "bytes10", + value: "0x123456789012345678901234", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureBytes10", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureBytes10", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe("0x123456789012345678901234"); + }); + + it("should correctly read a bytes11 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "bytes11", + value: "0x123456789012345678901234567", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureBytes11", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureBytes11", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe("0x123456789012345678901234567"); + }); + + it("should correctly read a bytes12 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "bytes12", + value: "0x123456789012345678901234567890", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureBytes12", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureBytes12", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe("0x123456789012345678901234567890"); + }); + + it("should correctly read a bytes13 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "bytes13", + value: "0x123456789012345678901234567890123", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureBytes13", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureBytes13", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe("0x123456789012345678901234567890123"); + }); + + it("should correctly read a bytes14 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "bytes14", + value: "0x123456789012345678901234567890123456", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureBytes14", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureBytes14", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe("0x123456789012345678901234567890123456"); + }); + + it("should correctly read a bytes15 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "bytes15", + value: "0x123456789012345678901234567890123456789", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureBytes15", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureBytes15", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe("0x123456789012345678901234567890123456789"); + }); + + it("should correctly read a bytes16 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "bytes16", + value: "0x12345678901234567890123456789012", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureBytes16", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureBytes16", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe("0x12345678901234567890123456789012"); + }); + + it("should correctly read a bytes17 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "bytes17", + value: "0x1234567890123456789012345678901234", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureBytes17", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureBytes17", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe("0x1234567890123456789012345678901234"); + }); + + it("should correctly read a bytes18 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "bytes18", + value: "0x123456789012345678901234567890123456", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureBytes18", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureBytes18", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe("0x123456789012345678901234567890123456"); + }); + + it("should correctly read a bytes19 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "bytes19", + value: "0x12345678901234567890123456789012345678", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureBytes19", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureBytes19", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe("0x12345678901234567890123456789012345678"); + }); + + it("should correctly read a bytes20 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "bytes20", + value: "0x1234567890123456789012345678901234567890", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureBytes20", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureBytes20", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe("0x1234567890123456789012345678901234567890"); + }); + + it("should correctly read a bytes21 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "bytes21", + value: "0x123456789012345678901234567890123456789012", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureBytes21", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureBytes21", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe("0x123456789012345678901234567890123456789012"); + }); + + it("should correctly read a bytes22 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "bytes22", + value: "0x12345678901234567890123456789012345678901234", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureBytes22", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureBytes22", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe("0x12345678901234567890123456789012345678901234"); + }); + + it("should correctly read a bytes23 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "bytes23", + value: "0x1234567890123456789012345678901234567890123456", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureBytes23", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureBytes23", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe("0x1234567890123456789012345678901234567890123456"); + }); + + it("should correctly read a bytes24 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "bytes24", + value: "0x123456789012345678901234567890123456789012345678", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureBytes24", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureBytes24", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe("0x123456789012345678901234567890123456789012345678"); + }); + + it("should correctly read a bytes25 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "bytes25", + value: "0x12345678901234567890123456789012345678901234567890", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureBytes25", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureBytes25", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe("0x12345678901234567890123456789012345678901234567890"); + }); + + it("should correctly read a bytes26 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "bytes26", + value: "0x1234567890123456789012345678901234567890123456789012", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureBytes26", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureBytes26", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe("0x1234567890123456789012345678901234567890123456789012"); + }); + + it("should correctly read a bytes27 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "bytes27", + value: "0x123456789012345678901234567890123456789012345678901234", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureBytes27", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureBytes27", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe("0x123456789012345678901234567890123456789012345678901234"); + }); + + it("should correctly read a bytes28 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "bytes28", + value: "0x12345678901234567890123456789012345678901234567890123456", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureBytes28", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureBytes28", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe("0x12345678901234567890123456789012345678901234567890123456"); + }); + + it("should correctly read a bytes29 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "bytes29", + value: "0x1234567890123456789012345678901234567890123456789012345678", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureBytes29", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureBytes29", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe("0x1234567890123456789012345678901234567890123456789012345678"); + }); + + it("should correctly read a bytes30 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "bytes30", + value: "0x123456789012345678901234567890123456789012345678901234567890", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureBytes30", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureBytes30", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe("0x123456789012345678901234567890123456789012345678901234567890"); + }); + + it("should correctly read a bytes31 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "bytes31", + value: "0x12345678901234567890123456789012345678901234567890123456789012", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureBytes31", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureBytes31", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe("0x12345678901234567890123456789012345678901234567890123456789012"); + }); + + it("should correctly read a bytes32 value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "bytes32", + value: "0x1234567890123456789012345678901234567890123456789012345678901234", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureBytes32", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureBytes32", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe("0x1234567890123456789012345678901234567890123456789012345678901234"); + }); + + it("should correctly read a bytes value from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "bytes", + value: "0x1234567890123456789012345678901234567890123456789012345678901234", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureBytes", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureBytes", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe("0x1234567890123456789012345678901234567890123456789012345678901234"); + }); + + it("should correctly read an array from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "array", + values: [ + { type: "uint256", value: "1" }, + { type: "uint256", value: "2" }, + { type: "uint256", value: "3" }, + { type: "uint256", value: "4" }, + { type: "uint256", value: "5" }, + ], + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureArray", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureArray", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toEqual([1n, 2n, 3n, 4n, 5n]); + }); + + it("should correctly read a tuple from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "tuple", + values: [ + { type: "uint256", value: "1", name: "a" }, + { type: "uint256", value: "2", name: "b" }, + ], + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureTuple", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureTuple", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toEqual({ a: 1n, b: 2n }); + }); + + it("should correctly read a tuple with mixed types from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "tuple", + values: [ + { type: "uint256", value: "1", name: "a" }, + { type: "address", value: "0x1234567890123456789012345678901234567890", name: "b" }, + { type: "bool", value: "true", name: "c" }, + ], + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureTupleMixedTypes", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureTupleMixedTypes", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toEqual({ a: 1n, b: "0x1234567890123456789012345678901234567890", c: true }); + }); + + it("should correctly read a function type as bytes", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "bytes", + value: "0x12341234123412341234123400000000", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "returnFunction", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "returnFunction", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toBe("0x12341234123412341234123400000000"); + }); + + it("should correctly read a nested struct from a pure function", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "tuple", + values: [ + { type: "uint256", value: "42", name: "a" }, + { + type: "tuple", + name: "nestedFields", + values: [ + { + type: "tuple", + name: "nestedArray", + values: [ + { + type: "array", + name: "a", + values: [ + { type: "uint256", value: "1" }, + { type: "uint256", value: "2" }, + { type: "uint256", value: "3" }, + ], + }, + ], + }, + { type: "uint256", value: "123", name: "a" }, + ], + }, + ], + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureNestedStruct", + args: {}, + abi: testAllReadTypesABI, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureNestedStruct", + args: "{}", + abi: JSON.stringify(testAllReadTypesABI), + }, + ); + + expect(result).toEqual({ + a: 42n, + nestedFields: { + nestedArray: { + a: [1n, 2n, 3n], + }, + a: 123n, + }, + }); + }); + }); + + describe("Without an ABI", () => { + it("should correctly read a string from a pure function without an ABI", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "string", + value: "Hello, World!", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureString", + args: {}, + }); + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureString", + args: "{}", + }, + ); + + expect(result).toBe("Hello, World!"); + expect(typeof result).toBe("string"); + }); + + it("should correctly read a boolean from a pure function without an ABI", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "bool", + value: "true", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureBool", + args: {}, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureBool", + args: "{}", + }, + ); + + expect(result).toBe(true); + expect(typeof result).toBe("boolean"); + }); + + it("should correctly read an int8 from a pure function without an ABI", async () => { + smartContractApiMock.readContract.mockResolvedValue({ + data: { + type: "int8", + value: "42", + }, + }); + + const result = await readContract({ + networkId: "1", + contractAddress: "0x1234567890123456789012345678901234567890", + method: "pureInt8", + args: {}, + }); + + expect(smartContractApiMock.readContract).toHaveBeenCalledWith( + "1", + "0x1234567890123456789012345678901234567890", + { + method: "pureInt8", + args: "{}", + }, + ); + + expect(result).toBe(42); + expect(typeof result).toBe("number"); + }); + }); +}); diff --git a/src/tests/smart_contract_test.ts b/src/tests/smart_contract_test.ts new file mode 100644 index 00000000..459a2c02 --- /dev/null +++ b/src/tests/smart_contract_test.ts @@ -0,0 +1,716 @@ +import { Coinbase } from "../coinbase/coinbase"; +import { + smartContractApiMock, + mockFn, + mockReturnValue, + VALID_CONTRACT_INVOCATION_MODEL, + VALID_SMART_CONTRACT_ERC20_MODEL, + mockReturnRejectedValue, + contractEventApiMock, + ERC20_NAME, + ERC20_TOTAL_SUPPLY, + ERC20_SYMBOL, + VALID_SMART_CONTRACT_ERC721_MODEL, + ERC721_NAME, + ERC721_SYMBOL, + ERC721_BASE_URI, + VALID_SMART_CONTRACT_ERC1155_MODEL, + ERC1155_URI, + VALID_SMART_CONTRACT_EXTERNAL_MODEL, + testAllReadTypesABI, + VALID_EXTERNAL_SMART_CONTRACT_ERC20_MODEL, +} from "./utils"; +import { SmartContract } from "../coinbase/smart_contract"; +import { ContractEvent } from "../coinbase/contract_event"; +import { SmartContract as SmartContractModel } from "../client/api"; +import { Transaction } from "../coinbase/transaction"; +import { ethers } from "ethers"; +import { TransactionStatus } from "../coinbase/types"; +import { APIError } from "../coinbase/api_error"; +import { AxiosError } from "axios"; +import { TimeoutError } from "../coinbase/errors"; + +describe("SmartContract", () => { + let erc20Model: SmartContractModel = VALID_SMART_CONTRACT_ERC20_MODEL; + let erc20ExternalModel: SmartContractModel = VALID_EXTERNAL_SMART_CONTRACT_ERC20_MODEL; + let erc721Model: SmartContractModel = VALID_SMART_CONTRACT_ERC721_MODEL; + let erc20SmartContract: SmartContract = SmartContract.fromModel(erc20Model); + let erc20ExternalSmartContract: SmartContract = SmartContract.fromModel(erc20ExternalModel); + let erc721SmartContract: SmartContract = SmartContract.fromModel(erc721Model); + let erc1155Model: SmartContractModel = VALID_SMART_CONTRACT_ERC1155_MODEL; + let erc1155SmartContract: SmartContract = SmartContract.fromModel(erc1155Model); + + let externalModel: SmartContractModel = VALID_SMART_CONTRACT_EXTERNAL_MODEL; + let externalSmartContract: SmartContract = SmartContract.fromModel(externalModel); + + afterEach(() => { + jest.clearAllMocks(); + }); + + describe("Constructor", () => { + it("initializes a new SmartContract", () => { + expect(erc20SmartContract).toBeInstanceOf(SmartContract); + }); + + it("raises an error when the smartContract model is empty", () => { + expect(() => SmartContract.fromModel(undefined!)).toThrow( + "SmartContract model cannot be empty", + ); + }); + }); + + describe(".register", () => { + const networkId = erc20ExternalModel.network_id; + const contractName = erc20ExternalModel.contract_name; + const contractAddress = erc20ExternalModel.contract_address; + + it("should register a new smart contract", async () => { + Coinbase.apiClients.smartContract = smartContractApiMock; + Coinbase.apiClients.smartContract.registerSmartContract = jest + .fn() + .mockResolvedValue({ data: erc20ExternalModel }); + + const smartContract = await SmartContract.register({ + networkId: networkId, + contractAddress: contractAddress, + abi: testAllReadTypesABI, + contractName: contractName, + }); + + expect(Coinbase.apiClients.smartContract!.registerSmartContract).toHaveBeenCalledWith( + networkId, + contractAddress, + { + abi: JSON.stringify(testAllReadTypesABI), + contract_name: contractName, + }, + ); + expect(smartContract).toBeInstanceOf(SmartContract); + expect(smartContract.getContractAddress()).toBe(contractAddress); + }); + + it("should throw an error if register fails", async () => { + Coinbase.apiClients.smartContract!.registerSmartContract = jest + .fn() + .mockRejectedValue(new Error("Failed to register the smart contract")); + await expect( + SmartContract.register({ + networkId: networkId, + contractAddress: contractAddress, + abi: testAllReadTypesABI, + contractName: contractName, + }), + ).rejects.toThrow("Failed to register the smart contract"); + }); + }); + + describe(".update", () => { + const networkId = erc20ExternalModel.network_id; + const contractAddress = erc20ExternalModel.contract_address; + + it("should update an existing smart contract", async () => { + const updatedContract = JSON.parse(JSON.stringify(erc20ExternalModel)); + const updatedAbiJson = { abi: "data2" }; + updatedContract.contract_name = "UpdatedContractName"; + updatedContract.abi = JSON.stringify(updatedAbiJson); + + Coinbase.apiClients.smartContract = smartContractApiMock; + Coinbase.apiClients.smartContract.updateSmartContract = jest + .fn() + .mockResolvedValue({ data: updatedContract }); + + const smartContract = await erc20ExternalSmartContract.update({ + abi: updatedAbiJson, + contractName: updatedContract.contract_name, + }); + + expect(Coinbase.apiClients.smartContract!.updateSmartContract).toHaveBeenCalledWith( + networkId, + contractAddress, + { + abi: updatedContract.abi, + contract_name: updatedContract.contract_name, + }, + ); + expect(smartContract).toBeInstanceOf(SmartContract); + expect(smartContract.getContractAddress()).toBe(contractAddress); + expect(smartContract.getAbi()).toEqual(updatedAbiJson); + expect(smartContract.getContractName()).toEqual(updatedContract.contract_name); + }); + + it("should update an existing smart contract - update contract name only", async () => { + const updatedContract = JSON.parse(JSON.stringify(erc20ExternalModel)); + updatedContract.contract_name = "UpdatedContractName"; + + Coinbase.apiClients.smartContract = smartContractApiMock; + Coinbase.apiClients.smartContract.updateSmartContract = jest + .fn() + .mockResolvedValue({ data: updatedContract }); + + const smartContract = await erc20ExternalSmartContract.update({ + contractName: updatedContract.contract_name, + }); + + expect(Coinbase.apiClients.smartContract!.updateSmartContract).toHaveBeenCalledWith( + networkId, + contractAddress, + { + contract_name: updatedContract.contract_name, + abi: undefined, + }, + ); + expect(smartContract).toBeInstanceOf(SmartContract); + expect(smartContract.getContractAddress()).toBe(contractAddress); + expect(smartContract.getAbi()).toEqual(erc20ExternalSmartContract.getAbi()); + expect(smartContract.getContractName()).toEqual(updatedContract.contract_name); + }); + + it("should update an existing smart contract - update abi only", async () => { + const updatedContract = JSON.parse(JSON.stringify(erc20ExternalModel)); + const updatedAbiJson = { abi: "data2" }; + updatedContract.abi = JSON.stringify(updatedAbiJson); + + Coinbase.apiClients.smartContract = smartContractApiMock; + Coinbase.apiClients.smartContract.updateSmartContract = jest + .fn() + .mockResolvedValue({ data: updatedContract }); + + const smartContract = await erc20ExternalSmartContract.update({ abi: updatedAbiJson }); + + expect(Coinbase.apiClients.smartContract!.updateSmartContract).toHaveBeenCalledWith( + networkId, + contractAddress, + { + contract_name: undefined, + abi: updatedContract.abi, + }, + ); + expect(smartContract).toBeInstanceOf(SmartContract); + expect(smartContract.getContractAddress()).toBe(contractAddress); + expect(smartContract.getAbi()).toEqual(updatedAbiJson); + expect(smartContract.getContractName()).toEqual(erc20ExternalSmartContract.getContractName()); + }); + + it("should update an existing smart contract - no update", async () => { + Coinbase.apiClients.smartContract = smartContractApiMock; + Coinbase.apiClients.smartContract.updateSmartContract = jest + .fn() + .mockResolvedValue({ data: erc20ExternalModel }); + + const smartContract = await erc20ExternalSmartContract.update({}); + + expect(Coinbase.apiClients.smartContract!.updateSmartContract).toHaveBeenCalledWith( + networkId, + contractAddress, + {}, + ); + expect(smartContract).toBeInstanceOf(SmartContract); + expect(smartContract.getContractAddress()).toBe(contractAddress); + expect(smartContract.getAbi()).toEqual(erc20ExternalSmartContract.getAbi()); + expect(smartContract.getContractName()).toEqual(erc20ExternalSmartContract.getContractName()); + }); + + it("should throw an error if update fails", async () => { + Coinbase.apiClients.smartContract!.updateSmartContract = jest + .fn() + .mockRejectedValue(new Error("Failed to update the smart contract")); + await expect( + erc20ExternalSmartContract.update({ + abi: testAllReadTypesABI, + contractName: erc20ExternalSmartContract.getContractName(), + }), + ).rejects.toThrow("Failed to update the smart contract"); + }); + }); + + describe(".list", () => { + it("should list smart contracts", async () => { + Coinbase.apiClients.smartContract = smartContractApiMock; + Coinbase.apiClients.smartContract.listSmartContracts = jest.fn().mockResolvedValue({ + data: { + data: [erc20ExternalModel], + has_more: true, + next_page: null, + }, + }); + const paginationResponse = await SmartContract.list(); + const smartContracts = paginationResponse.data; + + expect(Coinbase.apiClients.smartContract!.listSmartContracts).toHaveBeenCalledWith(undefined); + expect(smartContracts.length).toBe(1); + expect(smartContracts[0].getContractAddress()).toBe(erc20ExternalModel.contract_address); + expect(paginationResponse.hasMore).toBe(true); + expect(paginationResponse.nextPage).toBe(undefined); + }); + + it("should throw an error if list fails", async () => { + Coinbase.apiClients.smartContract!.listSmartContracts = mockReturnRejectedValue( + new APIError(""), + ); + await expect(SmartContract.list()).rejects.toThrow(APIError); + }); + }); + + describe("#getId", () => { + it("returns the smart contract ID", () => { + expect(erc20SmartContract.getId()).toEqual( + VALID_SMART_CONTRACT_ERC20_MODEL.smart_contract_id, + ); + }); + }); + + describe("#getNetworkId", () => { + it("returns the smart contract network ID", () => { + expect(erc20SmartContract.getNetworkId()).toEqual( + VALID_SMART_CONTRACT_ERC20_MODEL.network_id, + ); + }); + }); + + describe("#getContractAddress", () => { + it("returns the smart contract contract address", () => { + expect(erc20SmartContract.getContractAddress()).toEqual( + VALID_SMART_CONTRACT_ERC20_MODEL.contract_address, + ); + }); + }); + + describe("#getWalletId", () => { + it("returns the smart contract wallet ID", () => { + expect(erc20SmartContract.getWalletId()).toEqual(VALID_SMART_CONTRACT_ERC20_MODEL.wallet_id); + }); + + it("returns undefined for external contracts", () => { + expect(externalSmartContract.getWalletId()).toBeUndefined(); + }); + }); + + describe("#getDeployerAddress", () => { + it("returns the smart contract deployer address", () => { + expect(erc20SmartContract.getDeployerAddress()).toEqual( + VALID_SMART_CONTRACT_ERC20_MODEL.deployer_address, + ); + }); + + it("returns undefined for external contracts", () => { + expect(externalSmartContract.getDeployerAddress()).toBeUndefined(); + }); + }); + + describe("#getType", () => { + it("returns the smart contract type for ERC20", () => { + expect(erc20SmartContract.getType()).toEqual(VALID_SMART_CONTRACT_ERC20_MODEL.type); + }); + + it("returns the smart contract type for ERC721", () => { + expect(erc721SmartContract.getType()).toEqual(VALID_SMART_CONTRACT_ERC721_MODEL.type); + }); + + it("returns the smart contract type for ERC1155", () => { + expect(erc1155SmartContract.getType()).toEqual(VALID_SMART_CONTRACT_ERC1155_MODEL.type); + }); + }); + + describe("#getOptions", () => { + it("returns the smart contract options for ERC20", () => { + expect(erc20SmartContract.getOptions()).toEqual({ + name: ERC20_NAME, + symbol: ERC20_SYMBOL, + totalSupply: ERC20_TOTAL_SUPPLY.toString(), + }); + }); + + it("returns the smart contract options for ERC721", () => { + expect(erc721SmartContract.getOptions()).toEqual({ + name: ERC721_NAME, + symbol: ERC721_SYMBOL, + baseURI: ERC721_BASE_URI, + }); + }); + + it("returns the smart contract options for ERC1155", () => { + expect(erc1155SmartContract.getOptions()).toEqual({ + uri: ERC1155_URI, + }); + }); + }); + + describe("#getAbi", () => { + it("returns the smart contract ABI", () => { + expect(erc20SmartContract.getAbi()).toEqual(JSON.parse(VALID_SMART_CONTRACT_ERC20_MODEL.abi)); + }); + }); + + describe("#getTransaction", () => { + it("returns the smart contract transaction", () => { + expect(erc20SmartContract.getTransaction()).toEqual( + new Transaction(VALID_SMART_CONTRACT_ERC20_MODEL.transaction!), + ); + }); + + it("returns undefined for external contracts", () => { + expect(externalSmartContract.getTransaction()).toBeUndefined(); + }); + }); + + describe("#sign", () => { + let signingKey: any = ethers.Wallet.createRandom(); + + it("returns the signature", async () => { + const smartContract = SmartContract.fromModel({ + ...VALID_SMART_CONTRACT_ERC20_MODEL, + transaction: { + ...VALID_SMART_CONTRACT_ERC20_MODEL.transaction!, + signed_payload: "0xsignedHash", + }, + }); + + const signature = await smartContract.sign(signingKey); + + expect(signature).toEqual(smartContract.getTransaction()!.getSignature()!); + }); + + it("throws an error for external contracts", async () => { + expect(externalSmartContract.sign(signingKey)).rejects.toThrow( + "Cannot sign an external SmartContract", + ); + }); + }); + + describe("#broadcast", () => { + let signedPayload = "0xsignedHash"; + + beforeEach(() => { + Coinbase.apiClients.smartContract = smartContractApiMock; + + // Ensure signed payload is present. + erc20SmartContract = SmartContract.fromModel({ + ...VALID_SMART_CONTRACT_ERC20_MODEL, + transaction: { + ...VALID_SMART_CONTRACT_ERC20_MODEL.transaction!, + signed_payload: signedPayload, + }, + }); + }); + + describe("when it is successful", () => { + let broadcastedSmartContract: SmartContract; + + beforeEach(async () => { + Coinbase.apiClients.smartContract!.deploySmartContract = mockReturnValue({ + ...VALID_SMART_CONTRACT_ERC20_MODEL, + transaction: { + ...VALID_SMART_CONTRACT_ERC20_MODEL.transaction!, + signed_payload: signedPayload, + status: TransactionStatus.BROADCAST, + }, + }); + + broadcastedSmartContract = await erc20SmartContract.broadcast(); + }); + + it("returns the broadcasted smart contract", async () => { + expect(broadcastedSmartContract).toBeInstanceOf(SmartContract); + expect(broadcastedSmartContract.getTransaction()!.getStatus()).toEqual( + TransactionStatus.BROADCAST, + ); + }); + + it("broadcasts the smart contract", async () => { + expect(Coinbase.apiClients.smartContract!.deploySmartContract).toHaveBeenCalledWith( + erc20SmartContract.getWalletId(), + erc20SmartContract.getDeployerAddress(), + erc20SmartContract.getId(), + { + signed_payload: signedPayload.slice(2), + }, + ); + + expect(Coinbase.apiClients.smartContract!.deploySmartContract).toHaveBeenCalledTimes(1); + }); + }); + + describe("when the transaction is not signed", () => { + beforeEach(() => { + erc20SmartContract = SmartContract.fromModel(VALID_SMART_CONTRACT_ERC20_MODEL); + }); + + it("throws an error", async () => { + expect(erc20SmartContract.broadcast()).rejects.toThrow( + "Cannot broadcast unsigned SmartContract deployment", + ); + }); + }); + + describe("when broadcasting fails", () => { + beforeEach(() => { + Coinbase.apiClients.smartContract!.deploySmartContract = mockReturnRejectedValue( + new APIError({ + response: { + status: 400, + data: { + code: "invalid_signed_payload", + message: "failed to broadcast contract invocation: invalid signed payload", + }, + }, + } as AxiosError), + ); + }); + + it("throws an error", async () => { + expect(erc20SmartContract.broadcast()).rejects.toThrow(APIError); + }); + }); + + describe("when the contract is external", () => { + it("throws an error", async () => { + expect(externalSmartContract.broadcast()).rejects.toThrow( + "Cannot broadcast an external SmartContract", + ); + }); + }); + }); + + describe("#wait", () => { + describe("when the transaction is complete", () => { + beforeEach(() => { + Coinbase.apiClients.smartContract!.getSmartContract = mockReturnValue({ + ...VALID_SMART_CONTRACT_ERC20_MODEL, + transaction: { + ...VALID_SMART_CONTRACT_ERC20_MODEL.transaction!, + status: TransactionStatus.COMPLETE, + }, + }); + }); + + it("successfully waits and returns", async () => { + const completedSmartContract = await erc20SmartContract.wait(); + expect(completedSmartContract).toBeInstanceOf(SmartContract); + expect(completedSmartContract.getTransaction()!.getStatus()).toEqual( + TransactionStatus.COMPLETE, + ); + }); + }); + + describe("when the transaction is failed", () => { + beforeEach(() => { + Coinbase.apiClients.smartContract!.getSmartContract = mockReturnValue({ + ...VALID_SMART_CONTRACT_ERC20_MODEL, + transaction: { + ...VALID_SMART_CONTRACT_ERC20_MODEL.transaction!, + status: TransactionStatus.FAILED, + }, + }); + }); + + it("successfully waits and returns a failed invocation", async () => { + const completedSmartContract = await erc20SmartContract.wait(); + expect(completedSmartContract).toBeInstanceOf(SmartContract); + expect(completedSmartContract.getTransaction()!.getStatus()).toEqual( + TransactionStatus.FAILED, + ); + }); + }); + + describe("when the transaction is pending", () => { + beforeEach(() => { + Coinbase.apiClients.smartContract!.getSmartContract = mockReturnValue({ + ...VALID_SMART_CONTRACT_ERC20_MODEL, + transaction: { + ...VALID_SMART_CONTRACT_ERC20_MODEL.transaction!, + status: TransactionStatus.PENDING, + }, + }); + }); + + it("throws a timeout error", async () => { + expect( + erc20SmartContract.wait({ timeoutSeconds: 0.05, intervalSeconds: 0.05 }), + ).rejects.toThrow(new TimeoutError("SmartContract deployment timed out")); + }); + }); + + describe("when the contract is external", () => { + it("throws an error", async () => { + expect(externalSmartContract.wait()).rejects.toThrow( + "Cannot wait for an external SmartContract", + ); + }); + }); + }); + + describe("#reload", () => { + it("returns the updated smart contract", async () => { + Coinbase.apiClients.smartContract!.getSmartContract = mockReturnValue({ + ...VALID_SMART_CONTRACT_ERC20_MODEL, + transaction: { + ...VALID_SMART_CONTRACT_ERC20_MODEL.transaction!, + status: TransactionStatus.COMPLETE, + }, + }); + await erc20SmartContract.reload(); + expect(erc20SmartContract.getTransaction()!.getStatus()).toEqual(TransactionStatus.COMPLETE); + expect(Coinbase.apiClients.smartContract!.getSmartContract).toHaveBeenCalledTimes(1); + }); + + it("throws an error when the smart contract is external", async () => { + expect(externalSmartContract.reload()).rejects.toThrow( + "Cannot reload an external SmartContract", + ); + }); + }); + + describe("#toString", () => { + it("returns the same value as toString", () => { + expect(erc20SmartContract.toString()).toEqual( + `SmartContract{id: '${erc20SmartContract.getId()}', networkId: '${erc20SmartContract.getNetworkId()}', ` + + `contractAddress: '${erc20SmartContract.getContractAddress()}', deployerAddress: '${erc20SmartContract.getDeployerAddress()}', ` + + `type: '${erc20SmartContract.getType()}'}`, + ); + }); + }); +}); + +describe("SmartContract.listEvents", () => { + const networkId = "ethereum-mainnet"; + const protocolName = "uniswap"; + const contractAddress = "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"; + const contractName = "Pool"; + const eventName = "Transfer"; + const fromBlockHeight = 201782330; + const toBlockHeight = 201782340; + + const CONTRACT_EVENTS_RESPONSE = { + data: [ + { + network_id: networkId, + protocol_name: protocolName, + contract_name: contractName, + event_name: eventName, + sig: "Transfer(address,address,uint256)", + four_bytes: "0xddf252ad", + contract_address: contractAddress, + block_time: "2023-04-01T12:00:00Z", + block_height: 201782330, + tx_hash: "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef", + tx_index: 109, + event_index: 362, + data: '{"from":"0x1234...","to":"0x5678...","value":"1000000000000000000"}', + }, + { + network_id: networkId, + protocol_name: protocolName, + contract_name: contractName, + event_name: eventName, + sig: "Transfer(address,address,uint256)", + four_bytes: "0xddf252ad", + contract_address: contractAddress, + block_time: "2023-04-01T12:01:00Z", + block_height: 201782331, + tx_hash: "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890", + tx_index: 110, + event_index: 363, + data: '{"from":"0x5678...","to":"0x9012...","value":"2000000000000000000"}', + }, + ], + has_more: false, + next_page: "", + }; + + beforeAll(() => { + Coinbase.apiClients.contractEvent = contractEventApiMock; + }); + + it("should successfully return contract events", async () => { + Coinbase.apiClients.contractEvent!.listContractEvents = + mockReturnValue(CONTRACT_EVENTS_RESPONSE); + const response = await SmartContract.listEvents( + networkId, + protocolName, + contractAddress, + contractName, + eventName, + fromBlockHeight, + toBlockHeight, + ); + expect(response).toBeInstanceOf(Array); + expect(response.length).toEqual(2); + expect(Coinbase.apiClients.contractEvent!.listContractEvents).toHaveBeenCalledWith( + networkId, + protocolName, + contractAddress, + contractName, + eventName, + fromBlockHeight, + toBlockHeight, + undefined, + ); + }); + + it("should successfully return contract events for multiple pages", async () => { + const pages = ["abc", "def"]; + Coinbase.apiClients.contractEvent!.listContractEvents = mockFn(() => { + CONTRACT_EVENTS_RESPONSE.next_page = pages.shift() as string; + CONTRACT_EVENTS_RESPONSE.has_more = !!CONTRACT_EVENTS_RESPONSE.next_page; + return { data: CONTRACT_EVENTS_RESPONSE }; + }); + const response = await SmartContract.listEvents( + networkId, + protocolName, + contractAddress, + contractName, + eventName, + fromBlockHeight, + toBlockHeight, + ); + expect(response).toBeInstanceOf(Array); + expect(response.length).toEqual(6); + expect(Coinbase.apiClients.contractEvent!.listContractEvents).toHaveBeenCalledWith( + networkId, + protocolName, + contractAddress, + contractName, + eventName, + fromBlockHeight, + toBlockHeight, + undefined, + ); + }); + + it("should handle API errors gracefully", async () => { + Coinbase.apiClients.contractEvent!.listContractEvents = jest + .fn() + .mockRejectedValue(new Error("API Error")); + + await expect( + SmartContract.listEvents( + networkId, + protocolName, + contractAddress, + contractName, + eventName, + fromBlockHeight, + toBlockHeight, + ), + ).rejects.toThrow("API Error"); + }); + + it("should handle empty response", async () => { + Coinbase.apiClients.contractEvent!.listContractEvents = mockReturnValue({ + data: [], + has_more: false, + next_page: "", + }); + const response = await SmartContract.listEvents( + networkId, + protocolName, + contractAddress, + contractName, + eventName, + fromBlockHeight, + toBlockHeight, + ); + expect(response).toBeInstanceOf(Array); + expect(response.length).toEqual(0); + }); +}); diff --git a/src/tests/sponsored_send_test.ts b/src/tests/sponsored_send_test.ts new file mode 100644 index 00000000..5205c0e5 --- /dev/null +++ b/src/tests/sponsored_send_test.ts @@ -0,0 +1,196 @@ +import { ethers } from "ethers"; +import { SponsoredSend as SponsoredSendModel } from "../client/api"; +import { SponsoredSend } from "./../coinbase/sponsored_send"; +import { SponsoredSendStatus } from "../coinbase/types"; + +describe("SponsoredSend", () => { + let fromKey; + let toAddressId; + let rawTypedData; + let typedDataHash; + let signature; + let transactionHash; + let transactionLink; + let model; + let signedModel; + let completedModel; + let sponsoredSend; + + beforeEach(() => { + fromKey = ethers.Wallet.createRandom(); + toAddressId = "0x4D9E4F3f4D1A8B5F4f7b1F5b5C7b8d6b2B3b1b0b"; + typedDataHash = "0x7523946e17c0b8090ee18c84d6f9a8d63bab4d579a6507f0998dde0791891823"; + signature = "0x7523946e17c0b8090ee18c84d6f9a8d63bab4d579a6507f0998dde0791891823"; + transactionHash = "0xdea671372a8fff080950d09ad5994145a661c8e95a9216ef34772a19191b5690"; + transactionLink = `https://sepolia.basescan.org/tx/${transactionHash}`; + + model = { + status: "pending", + to_address_id: toAddressId, + typed_data_hash: typedDataHash, + } as SponsoredSendModel; + + signedModel = { + status: "signed", + to_address_id: toAddressId, + typed_data_hash: typedDataHash, + signature: signature, + } as SponsoredSendModel; + + completedModel = { + status: "complete", + to_address_id: toAddressId, + typed_data_hash: typedDataHash, + signature: signature, + transaction_hash: transactionHash, + transaction_link: transactionLink, + } as SponsoredSendModel; + + sponsoredSend = new SponsoredSend(model); + }); + + describe("constructor", () => { + it("initializes a new SponsoredSend", () => { + expect(sponsoredSend).toBeInstanceOf(SponsoredSend); + }); + + it("should raise an error when initialized with a model of a different type", () => { + expect(() => new SponsoredSend(null!)).toThrow("Invalid model type"); + }); + }); + + describe("#getTypedDataHash", () => { + it("returns the typed data hash", () => { + expect(sponsoredSend.getTypedDataHash()).toEqual(typedDataHash); + }); + }); + + describe("#getSignature", () => { + it("should return undefined when the SponsoredSend has not been signed", () => { + expect(sponsoredSend.getSignature()).toBeUndefined(); + }); + + it("should return the signature when the SponsoredSend has been signed", () => { + const sponsoredSend = new SponsoredSend(signedModel); + expect(sponsoredSend.getSignature()).toEqual(signature); + }); + }); + + describe("#getTransactionHash", () => { + it("should return undefined when the SponsoredSend has not been broadcast on chain", () => { + expect(sponsoredSend.getTransactionHash()).toBeUndefined(); + }); + + it("should return the transaction hash when the SponsoredSend has been broadcast on chain", () => { + const sponsoredSend = new SponsoredSend(completedModel); + expect(sponsoredSend.getTransactionHash()).toEqual(transactionHash); + }); + }); + + describe("#getTransactionLink", () => { + it("should return the transaction link when the transaction hash is available", () => { + const sponsoredSend = new SponsoredSend(completedModel); + expect(sponsoredSend.getTransactionLink()).toEqual( + `https://sepolia.basescan.org/tx/${transactionHash}`, + ); + }); + }); + + describe("#sign", () => { + let signature: string; + + beforeEach(async () => { + signature = await sponsoredSend.sign(fromKey); + }); + + it("should return a string when the SponsoredSend is signed", async () => { + expect(typeof signature).toBe("string"); + }); + + it("signs the raw typed data hash", async () => { + expect(signature).not.toBeNull(); + }); + + it("returns a hex representation of the signed typed data hash", async () => { + expect(signature).not.toBeNull(); + expect(signature.length).toBeGreaterThan(0); + }); + + it("sets the signed boolean", () => { + expect(sponsoredSend.isSigned()).toEqual(true); + }); + + it("sets the signature", () => { + expect(sponsoredSend.getSignature()).toEqual(signature); + }); + }); + + describe("#getStatus", () => { + it("should return undefined when the SponsoredSend has not been initiated with a model", async () => { + model.status = ""; + const sponsoredSend = new SponsoredSend(model); + expect(sponsoredSend.getStatus()).toBeUndefined(); + }); + + it("should return a pending status", () => { + model.status = SponsoredSendStatus.PENDING; + const sponsoredSend = new SponsoredSend(model); + expect(sponsoredSend.getStatus()).toEqual("pending"); + }); + + it("should return a submitted status", () => { + model.status = SponsoredSendStatus.SUBMITTED; + const sponsoredSend = new SponsoredSend(model); + expect(sponsoredSend.getStatus()).toEqual("submitted"); + }); + + it("should return a complete status", () => { + model.status = SponsoredSendStatus.COMPLETE; + const sponsoredSend = new SponsoredSend(model); + expect(sponsoredSend.getStatus()).toEqual("complete"); + }); + + it("should return a failed status", () => { + model.status = SponsoredSendStatus.FAILED; + const sponsoredSend = new SponsoredSend(model); + expect(sponsoredSend.getStatus()).toEqual("failed"); + }); + }); + + describe("#isTerminalState", () => { + it("should not be in a terminal state", () => { + expect(sponsoredSend.isTerminalState()).toEqual(false); + }); + + it("should be in a terminal state", () => { + model.status = SponsoredSendStatus.COMPLETE; + const sponsoredSend = new SponsoredSend(model); + expect(sponsoredSend.isTerminalState()).toEqual(true); + }); + + it("should not be in a terminal state with an undefined status", () => { + model.status = "foo-status"; + const sponsoredSend = new SponsoredSend(model); + expect(sponsoredSend.isTerminalState()).toEqual(false); + }); + }); + + describe("#toString", () => { + it("includes SponsoredSend details", () => { + const sponsoredSend = new SponsoredSend(completedModel); + expect(sponsoredSend.toString()).toContain(sponsoredSend.getStatus()); + }); + + it("returns the same value as toString", () => { + const sponsoredSend = new SponsoredSend(completedModel); + expect(sponsoredSend.toString()).toEqual( + `SponsoredSend { transactionHash: '${sponsoredSend.getTransactionHash()}', status: '${sponsoredSend.getStatus()}', typedDataHash: '${sponsoredSend.getTypedDataHash()}', signature: ${sponsoredSend.getSignature()}, transactionLink: ${sponsoredSend.getTransactionLink()} }`, + ); + }); + + it("should include the transaction hash when the SponsoredSend has been broadcast on chain", () => { + const sponsoredSend = new SponsoredSend(completedModel); + expect(sponsoredSend.toString()).toContain(sponsoredSend.getTransactionHash()); + }); + }); +}); diff --git a/src/tests/stake_test.ts b/src/tests/stake_test.ts new file mode 100644 index 00000000..cc76a633 --- /dev/null +++ b/src/tests/stake_test.ts @@ -0,0 +1,145 @@ +import { Validator } from "../coinbase/validator"; +import { Coinbase } from "../coinbase/coinbase"; +import { + mockEthereumValidator, + mockReturnValue, + stakeApiMock, + VALID_ACTIVE_VALIDATOR_LIST, +} from "./utils"; +import { ValidatorStatus } from "../coinbase/types"; +import { ValidatorStatus as APIValidatorStatus } from "../client/api"; + +describe("Validator", () => { + beforeAll(() => { + // Mock the validator functions. + Coinbase.apiClients.stake = stakeApiMock; + }); + + beforeEach(() => { + jest.clearAllMocks(); + }); + + describe("constructor", () => { + const validatorModel = mockEthereumValidator("100", ValidatorStatus.ACTIVE, "0xpublic_key_1"); + const validator = new Validator(validatorModel); + it("initializes a new Validator", () => { + expect(validator).toBeInstanceOf(Validator); + }); + + it("should raise an error when initialized with a model of a different type", () => { + expect(() => new Validator(null!)).toThrow("Invalid model type"); + }); + }); + + describe(".getStatus", () => { + const testCases = [ + { input: APIValidatorStatus.Unknown, expected: ValidatorStatus.UNKNOWN }, + { input: APIValidatorStatus.Provisioning, expected: ValidatorStatus.PROVISIONING }, + { input: APIValidatorStatus.Provisioned, expected: ValidatorStatus.PROVISIONED }, + { input: APIValidatorStatus.Deposited, expected: ValidatorStatus.DEPOSITED }, + { input: APIValidatorStatus.PendingActivation, expected: ValidatorStatus.PENDING_ACTIVATION }, + { input: APIValidatorStatus.Active, expected: ValidatorStatus.ACTIVE }, + { input: APIValidatorStatus.Exiting, expected: ValidatorStatus.EXITING }, + { input: APIValidatorStatus.Exited, expected: ValidatorStatus.EXITED }, + { + input: APIValidatorStatus.WithdrawalAvailable, + expected: ValidatorStatus.WITHDRAWAL_AVAILABLE, + }, + { + input: APIValidatorStatus.WithdrawalComplete, + expected: ValidatorStatus.WITHDRAWAL_COMPLETE, + }, + { input: APIValidatorStatus.ActiveSlashed, expected: ValidatorStatus.ACTIVE_SLASHED }, + { input: APIValidatorStatus.ExitedSlashed, expected: ValidatorStatus.EXITED_SLASHED }, + { input: APIValidatorStatus.Reaped, expected: ValidatorStatus.REAPED }, + { input: "unknown_status" as APIValidatorStatus, expected: ValidatorStatus.UNKNOWN }, + ]; + + testCases.forEach(({ input, expected }) => { + it(`should return ${expected} for ${input}`, () => { + const validatorModel = mockEthereumValidator("100", input, "0xpublic_key_1"); + const validator = new Validator(validatorModel); + expect(validator.getStatus()).toBe(expected); + }); + }); + }); + + describe("#getAPIValidatorStatus", () => { + const testCases = [ + { input: ValidatorStatus.UNKNOWN, expected: APIValidatorStatus.Unknown }, + { input: ValidatorStatus.PROVISIONING, expected: APIValidatorStatus.Provisioning }, + { input: ValidatorStatus.PROVISIONED, expected: APIValidatorStatus.Provisioned }, + { input: ValidatorStatus.DEPOSITED, expected: APIValidatorStatus.Deposited }, + { input: ValidatorStatus.PENDING_ACTIVATION, expected: APIValidatorStatus.PendingActivation }, + { input: ValidatorStatus.ACTIVE, expected: APIValidatorStatus.Active }, + { input: ValidatorStatus.EXITING, expected: APIValidatorStatus.Exiting }, + { input: ValidatorStatus.EXITED, expected: APIValidatorStatus.Exited }, + { + input: ValidatorStatus.WITHDRAWAL_AVAILABLE, + expected: APIValidatorStatus.WithdrawalAvailable, + }, + { + input: ValidatorStatus.WITHDRAWAL_COMPLETE, + expected: APIValidatorStatus.WithdrawalComplete, + }, + { input: ValidatorStatus.ACTIVE_SLASHED, expected: APIValidatorStatus.ActiveSlashed }, + { input: ValidatorStatus.EXITED_SLASHED, expected: APIValidatorStatus.ExitedSlashed }, + { input: ValidatorStatus.REAPED, expected: APIValidatorStatus.Reaped }, + { input: "unknown_status" as ValidatorStatus, expected: APIValidatorStatus.Unknown }, + ]; + + testCases.forEach(({ input, expected }) => { + it(`should return ${expected} for ${input}`, () => { + const validatorModel = mockEthereumValidator("100", input, "0xpublic_key_1"); + const validator = new Validator(validatorModel); + expect(validator.getStatus()).toBe(expected); + }); + }); + }); + + it("should return a list of validators for ethereum hoodi and eth asset", async () => { + Coinbase.apiClients.stake!.listValidators = mockReturnValue(VALID_ACTIVE_VALIDATOR_LIST); + + const validators = await Validator.list( + Coinbase.networks.EthereumHoodi, + Coinbase.assets.Eth, + ValidatorStatus.ACTIVE, + ); + + expect(Coinbase.apiClients.stake!.listValidators).toHaveBeenCalledWith( + Coinbase.networks.EthereumHoodi, + Coinbase.assets.Eth, + ValidatorStatus.ACTIVE, + ); + + expect(validators.length).toEqual(3); + expect(validators[0].getValidatorId()).toEqual("0xpublic_key_1"); + expect(validators[0].getStatus()).toEqual(ValidatorStatus.ACTIVE); + expect(validators[1].getValidatorId()).toEqual("0xpublic_key_2"); + expect(validators[1].getStatus()).toEqual(ValidatorStatus.ACTIVE); + expect(validators[2].getValidatorId()).toEqual("0xpublic_key_3"); + expect(validators[2].getStatus()).toEqual(ValidatorStatus.ACTIVE); + }); + + it("should return a validator for ethereum hoodi and eth asset", async () => { + Coinbase.apiClients.stake!.getValidator = mockReturnValue( + mockEthereumValidator("100", ValidatorStatus.EXITING, "0x123"), + ); + + const validator = await Validator.fetch( + Coinbase.networks.EthereumHoodi, + Coinbase.assets.Eth, + "0x123", + ); + + expect(Coinbase.apiClients.stake!.getValidator).toHaveBeenCalledWith( + Coinbase.networks.EthereumHoodi, + Coinbase.assets.Eth, + "0x123", + ); + + expect(validator.getValidatorId()).toEqual("0x123"); + expect(validator.getStatus()).toEqual(ValidatorStatus.EXITING); + expect(validator.toString()).toEqual("Id: 0x123 Status: exiting"); + }); +}); diff --git a/src/tests/staking_historical_balance_test.ts b/src/tests/staking_historical_balance_test.ts new file mode 100644 index 00000000..43f3f227 --- /dev/null +++ b/src/tests/staking_historical_balance_test.ts @@ -0,0 +1,165 @@ +import { FetchHistoricalStakingBalances200Response } from "../client"; +import { Coinbase } from "../coinbase/coinbase"; +import { + assetsApiMock, + getAssetMock, + mockFn, + mockReturnValue, + newAddressModel, + stakeApiMock, +} from "./utils"; +import { StakingBalance } from "../coinbase/staking_balance"; +import { ExternalAddress } from "../coinbase/address/external_address"; + +describe("StakingBalance", () => { + const startTime = "2024-05-01T00:00:00Z"; + const endTime = "2024-05-21T00:00:00Z"; + const newAddress = newAddressModel("", "some-address-id", Coinbase.networks.EthereumHoodi); + const address = new ExternalAddress(newAddress.network_id, newAddress.address_id); + const asset = { + asset_id: Coinbase.assets.Eth, + network_id: address.getNetworkId(), + decimals: 18, + }; + + const bondedStake = { + amount: "32000000000000000000", + asset: asset, + }; + const unbondedBalance = { + amount: "2000000000000000000", + asset: asset, + }; + + const HISTORICAL_STAKING_BALANCES_RESPONSE: FetchHistoricalStakingBalances200Response = { + data: [ + { + address: address.getId(), + date: "2024-05-01", + bonded_stake: bondedStake, + unbonded_balance: unbondedBalance, + participant_type: "validator", + }, + { + address: address.getId(), + date: "2024-05-02", + bonded_stake: bondedStake, + unbonded_balance: unbondedBalance, + participant_type: "validator", + }, + ], + has_more: false, + next_page: "", + }; + + beforeAll(() => { + Coinbase.apiClients.stake = stakeApiMock; + Coinbase.apiClients.asset = assetsApiMock; + }); + + beforeEach(() => { + jest.clearAllMocks(); + }); + + describe("#list", () => { + it("should successfully return staking balances", async () => { + Coinbase.apiClients.stake!.fetchHistoricalStakingBalances = mockReturnValue( + HISTORICAL_STAKING_BALANCES_RESPONSE, + ); + Coinbase.apiClients.asset!.getAsset = getAssetMock(); + const response = await StakingBalance.list( + address.getNetworkId(), + Coinbase.assets.Eth, + address.getId(), + startTime, + endTime, + ); + expect(response).toBeInstanceOf(Array); + expect(response.length).toEqual(2); + expect(Coinbase.apiClients.stake!.fetchHistoricalStakingBalances).toHaveBeenCalledWith( + address.getNetworkId(), + Coinbase.assets.Eth, + address.getId(), + startTime, + endTime, + 100, + undefined, + ); + }); + it("should successfully return staking balances for multiple pages", async () => { + const pages = ["abc", "def"]; + Coinbase.apiClients.stake!.fetchHistoricalStakingBalances = mockFn(() => { + HISTORICAL_STAKING_BALANCES_RESPONSE.next_page = pages.shift() as string; + HISTORICAL_STAKING_BALANCES_RESPONSE.has_more = + !!HISTORICAL_STAKING_BALANCES_RESPONSE.next_page; + return { data: HISTORICAL_STAKING_BALANCES_RESPONSE }; + }); + Coinbase.apiClients.asset!.getAsset = getAssetMock(); + const response = await StakingBalance.list( + address.getNetworkId(), + Coinbase.assets.Eth, + address.getId(), + startTime, + endTime, + ); + expect(response).toBeInstanceOf(Array); + expect(response.length).toEqual(6); + expect(Coinbase.apiClients.stake!.fetchHistoricalStakingBalances).toHaveBeenCalledWith( + address.getNetworkId(), + Coinbase.assets.Eth, + address.getId(), + startTime, + endTime, + 100, + undefined, + ); + }); + }); + + describe(".date", () => { + it("should return the correct date", () => { + const balance = new StakingBalance({ + address: address.getId(), + date: "2024-05-03", + bonded_stake: bondedStake, + unbonded_balance: unbondedBalance, + participant_type: "validator", + }); + + const date = balance.date(); + expect(date).toEqual(new Date("2024-05-03")); + }); + }); + + describe(".toString", () => { + it("should return the string representation of a staking balance", () => { + const balance = new StakingBalance({ + address: address.getId(), + date: "2024-05-03", + bonded_stake: bondedStake, + unbonded_balance: unbondedBalance, + participant_type: "validator", + }); + + const balanceStr = balance.toString(); + expect(balanceStr).toEqual( + "StakingBalance { date: '2024-05-03T00:00:00.000Z' address: 'some-address-id' bondedStake: '32 ETH' unbondedBalance: '2 ETH' participantType: 'validator' }", + ); + }); + }); + + describe(".addressId", () => { + it("should return the onchain address of the StakingBalance", () => { + const balance = new StakingBalance({ + address: address.getId(), + date: "2024-05-03", + bonded_stake: bondedStake, + unbonded_balance: unbondedBalance, + participant_type: "validator", + }); + + const addressId = balance.address(); + expect(addressId).toEqual(address.getId()); + }); + }); +}); diff --git a/src/tests/staking_operation_test.ts b/src/tests/staking_operation_test.ts index ec20283d..343f1738 100644 --- a/src/tests/staking_operation_test.ts +++ b/src/tests/staking_operation_test.ts @@ -1,22 +1,60 @@ import { StakingOperation } from "../coinbase/staking_operation"; -import { VALID_STAKING_OPERATION_MODEL } from "./utils"; +import { + mockReturnValue, + mockStakingOperation, + stakeApiMock, + walletStakeApiMock, + VALID_NATIVE_ETH_UNSTAKE_OPERATION_MODEL, + VALID_STAKING_OPERATION_MODEL, +} from "./utils"; import { ethers } from "ethers"; +import { StakingOperationStatusEnum, TransactionStatusEnum } from "../client"; +import { Coinbase } from "../coinbase/coinbase"; describe("StakingOperation", () => { + beforeAll(() => { + // Mock the stake functions. + Coinbase.apiClients.stake = stakeApiMock; + Coinbase.apiClients.walletStake = walletStakeApiMock; + }); + + beforeEach(() => { + jest.clearAllMocks(); + }); + it("should initialize a new StakingOperation", () => { const op = new StakingOperation(VALID_STAKING_OPERATION_MODEL); expect(op).toBeInstanceOf(StakingOperation); }); + it("should raise an error when initialized with a model of a different type", () => { expect(() => { new StakingOperation(null!); }).toThrow(Error); }); + it("should return a string representation with id, status, network_id, and address_id", () => { + const op = new StakingOperation(VALID_STAKING_OPERATION_MODEL); + const expectedString = `StakingOperation { id: some-id status: initialized network_id: ethereum-hoodi address_id: some-address-id }`; + expect(op.toString()).toEqual(expectedString); + }); + describe(".getTransactions", () => { it("return the the array of transactions", () => { const op = new StakingOperation(VALID_STAKING_OPERATION_MODEL); expect(op.getTransactions().length).toEqual(1); + expect(op.getTransactions()[0].toAddressId()).toEqual("dummy-to-address-id"); + expect(op.getTransactions()[0].fromAddressId()).toEqual("dummy-from-address-id"); + expect(op.getTransactions()[0].getTransactionHash()).toEqual("0xdummy-transaction-hash"); + expect(op.getStatus()).toEqual(StakingOperationStatusEnum.Initialized); + }); + }); + + describe(".getSignedVoluntaryExitMessages", () => { + it("return the the array of signed exit messages", () => { + const op = new StakingOperation(VALID_NATIVE_ETH_UNSTAKE_OPERATION_MODEL); + const msgs = op.getSignedVoluntaryExitMessages(); + expect(msgs.length).toEqual(1); }); }); @@ -30,4 +68,206 @@ describe("StakingOperation", () => { }).not.toThrow(Error); }); }); + + describe("StakingOperation.fetch", () => { + const networkId = "dummy-network-id"; + const addressId = "dummy-address-id"; + const stakingOperationId = "dummy-staking-operation-id"; + const walletId = "dummy-wallet-id"; + + const mockStakingOperationModel = { + id: stakingOperationId, + status: StakingOperationStatusEnum.Initialized, + network_id: networkId, + address_id: addressId, + transactions: [], + }; + + it("should fetch staking operation without walletId", async () => { + Coinbase.apiClients.stake!.getExternalStakingOperation = jest.fn().mockResolvedValue({ + data: mockStakingOperationModel, + }); + + const stakingOperation = await StakingOperation.fetch( + networkId, + addressId, + stakingOperationId, + ); + + expect(Coinbase.apiClients.stake!.getExternalStakingOperation).toHaveBeenCalledWith( + networkId, + addressId, + stakingOperationId, + ); + + expect(stakingOperation.getID()).toBe(stakingOperationId); + expect(stakingOperation.getStatus()).toBe(StakingOperationStatusEnum.Initialized); + expect(stakingOperation.getNetworkID()).toBe(networkId); + expect(stakingOperation.getAddressID()).toBe(addressId); + }); + + it("should fetch staking operation with walletId", async () => { + Coinbase.apiClients.walletStake!.getStakingOperation = jest.fn().mockResolvedValue({ + data: mockStakingOperationModel, + }); + + const stakingOperation = await StakingOperation.fetch( + networkId, + addressId, + stakingOperationId, + walletId, + ); + + expect(Coinbase.apiClients.walletStake!.getStakingOperation).toHaveBeenCalledWith( + walletId, + addressId, + stakingOperationId, + ); + expect(stakingOperation.getID()).toBe(stakingOperationId); + expect(stakingOperation.getStatus()).toBe(StakingOperationStatusEnum.Initialized); + expect(stakingOperation.getNetworkID()).toBe(networkId); + expect(stakingOperation.getAddressID()).toBe(addressId); + }); + + it("should throw an error if walletId is empty", async () => { + await expect( + StakingOperation.fetch(networkId, addressId, stakingOperationId, ""), + ).rejects.toThrow("Invalid wallet ID"); + }); + }); + + describe(".wait", () => { + it("should return the non-terminal StakeOperation state when the stake operation is not complete", async () => { + const stakingOperation = new StakingOperation(VALID_STAKING_OPERATION_MODEL); + + Coinbase.apiClients.stake!.getExternalStakingOperation = mockReturnValue( + mockStakingOperation(StakingOperationStatusEnum.Complete), + ); + + await stakingOperation.wait(); + expect(stakingOperation.getStatus()).toBe(StakingOperationStatusEnum.Complete); + }); + + it("should raise a timeout error", async () => { + const stakingOperation = new StakingOperation(VALID_STAKING_OPERATION_MODEL); + + Coinbase.apiClients.stake!.getExternalStakingOperation = mockReturnValue(stakingOperation); + + await expect( + stakingOperation.wait({ + intervalSeconds: 0.2, + timeoutSeconds: 0.00001, + }), + ).rejects.toThrow("Staking operation timed out"); + }); + + it("should raise a timeout when the request takes longer than the timeout", async () => { + const stakingOperation = new StakingOperation(VALID_STAKING_OPERATION_MODEL); + + Coinbase.apiClients.stake!.getExternalStakingOperation = mockReturnValue( + new Promise(resolve => { + setTimeout(() => { + resolve(stakingOperation); + }, 400); + }), + ); + + await expect( + stakingOperation.wait({ + intervalSeconds: 0.2, + timeoutSeconds: 0.00001, + }), + ).rejects.toThrow("Staking operation timed out"); + }); + + it("all getters should work", async () => { + const stakingOperation = new StakingOperation(VALID_STAKING_OPERATION_MODEL); + expect(stakingOperation.getID()).toBe("some-id"); + expect(stakingOperation.getStatus()).toBe(StakingOperationStatusEnum.Initialized); + expect(stakingOperation.getNetworkID()).toBe(Coinbase.networks.EthereumHoodi); + expect(stakingOperation.isTerminalState()).toBe(false); + expect(stakingOperation.getTransactions().length).toBe(1); + expect(stakingOperation.getSignedVoluntaryExitMessages().length).toBe(0); + }); + }); + + describe("StakingOperation.loadTransactionsFromModel", () => { + it("should not add duplicate transactions", () => { + // Step 1: Set up a staking operation object with 2 unsigned transactions + const modelWithInitialTransactions = { + ...VALID_STAKING_OPERATION_MODEL, + transactions: [ + { + network_id: Coinbase.networks.EthereumHoodi, + from_address_id: "dummy-from-address-id", + to_address_id: "dummy-to-address-id", + unsigned_payload: "payload1", + transaction_hash: "0xdummy-transaction-hash", + transaction_link: "https://sepolia.basescan.org/tx/0xdeadbeef", + status: TransactionStatusEnum.Pending, + }, + { + network_id: Coinbase.networks.EthereumHoodi, + from_address_id: "dummy-from-address-id", + to_address_id: "dummy-to-address-id", + unsigned_payload: "payload2", + transaction_hash: "0xdummy-transaction-hash", + transaction_link: "https://sepolia.basescan.org/tx/0xdeadbeef", + status: TransactionStatusEnum.Pending, + }, + { + network_id: Coinbase.networks.EthereumHoodi, + from_address_id: "dummy-from-address-id", + to_address_id: "dummy-to-address-id", + unsigned_payload: "payload3", + transaction_hash: "0xdummy-transaction-hash", + transaction_link: "https://sepolia.basescan.org/tx/0xdeadbeef", + status: TransactionStatusEnum.Pending, + }, + ], + }; + + const op = new StakingOperation(modelWithInitialTransactions); + + // Step 2: Mark payload1 and payload2 as signed + op.getTransactions() + .slice(0, 2) + .forEach(tx => { + tx.sign = jest.fn().mockResolvedValue(true); + tx.isSigned = jest.fn().mockReturnValue(true); + }); + + // Step 3: Call reload and add two new transactions (payload4 and payload5) + op["model"].transactions.push( + { + network_id: Coinbase.networks.EthereumHoodi, + from_address_id: "dummy-from-address-id", + to_address_id: "dummy-to-address-id", + unsigned_payload: "payload4", + transaction_hash: "0xdummy-transaction-hash", + transaction_link: "https://sepolia.basescan.org/tx/0xdeadbeef", + status: TransactionStatusEnum.Pending, + }, + { + network_id: Coinbase.networks.EthereumHoodi, + from_address_id: "dummy-from-address-id", + to_address_id: "dummy-to-address-id", + unsigned_payload: "payload5", + transaction_hash: "0xdummy-transaction-hash", + transaction_link: "https://sepolia.basescan.org/tx/0xdeadbeef", + status: TransactionStatusEnum.Pending, + }, + ); + + op["loadTransactionsFromModel"](); + + // Step 4: Ensure the final state has 5 transactions, with payload1 and payload2 still signed, and payload3, payload4, and payload5 unsigned + expect(op.getTransactions().length).toEqual(5); + expect(op.getTransactions()[0].isSigned()).toBe(true); + expect(op.getTransactions()[1].isSigned()).toBe(true); + expect(op.getTransactions()[2].isSigned()).toBe(false); + expect(op.getTransactions()[3].isSigned()).toBe(false); + expect(op.getTransactions()[4].isSigned()).toBe(false); + }); + }); }); diff --git a/src/tests/staking_reward_test.ts b/src/tests/staking_reward_test.ts index 603b43f1..49788b8b 100644 --- a/src/tests/staking_reward_test.ts +++ b/src/tests/staking_reward_test.ts @@ -1,17 +1,14 @@ -import { - FetchStakingRewards200Response, - StakingRewardFormat, - StakingRewardStateEnum, -} from "../client"; +import { FetchStakingRewards200Response, StakingRewardStateEnum } from "../client"; import { Coinbase } from "../coinbase/coinbase"; import { assetsApiMock, getAssetMock, mockFn, mockReturnValue, + newAddressModel, stakeApiMock, - VALID_ADDRESS_MODEL, } from "./utils"; +import { StakingRewardFormat } from "../coinbase/types"; import { StakingReward } from "../coinbase/staking_reward"; import { ExternalAddress } from "../coinbase/address/external_address"; import { Asset } from "../coinbase/asset"; @@ -20,10 +17,8 @@ import Decimal from "decimal.js"; describe("StakingReward", () => { const startTime = "2024-05-01T00:00:00Z"; const endTime = "2024-05-21T00:00:00Z"; - const address = new ExternalAddress( - VALID_ADDRESS_MODEL.network_id, - VALID_ADDRESS_MODEL.address_id, - ); + const newAddress = newAddressModel("", "some-address-id", Coinbase.networks.EthereumHoodi); + const address = new ExternalAddress(newAddress.network_id, newAddress.address_id); const asset = Asset.fromModel({ asset_id: Coinbase.assets.Eth, network_id: address.getNetworkId(), @@ -37,21 +32,36 @@ describe("StakingReward", () => { date: "2024-05-01", amount: "361", state: StakingRewardStateEnum.Pending, - format: StakingRewardFormat.Usd, + format: "usd", + usd_value: { + amount: "361", + conversion_price: "3000", + conversion_time: "2024-05-01T00:00:00Z", + }, }, { address_id: address.getId(), date: "2024-05-02", amount: "203", state: StakingRewardStateEnum.Pending, - format: StakingRewardFormat.Usd, + format: "usd", + usd_value: { + amount: "203", + conversion_price: "3000", + conversion_time: "2024-05-02T00:00:00Z", + }, }, { address_id: address.getId(), date: "2024-05-03", amount: "226", state: StakingRewardStateEnum.Pending, - format: StakingRewardFormat.Usd, + format: "usd", + usd_value: { + amount: "226", + conversion_price: "3000", + conversion_time: "2024-05-03T00:00:00Z", + }, }, ], has_more: false, @@ -87,7 +97,7 @@ describe("StakingReward", () => { address_ids: [address.getId()], start_time: startTime, end_time: endTime, - format: StakingRewardFormat.Usd, + format: StakingRewardFormat.USD, }, 100, undefined, @@ -117,7 +127,7 @@ describe("StakingReward", () => { address_ids: [address.getId()], start_time: startTime, end_time: endTime, - format: StakingRewardFormat.Usd, + format: StakingRewardFormat.USD, }, 100, undefined, @@ -130,35 +140,69 @@ describe("StakingReward", () => { const reward = new StakingReward( { address_id: address.getId(), - date: "2024-05-03", + date: "2024-05-02T00:00:00Z", amount: "226", state: StakingRewardStateEnum.Pending, - format: StakingRewardFormat.Usd, + format: StakingRewardFormat.USD, + usd_value: { + amount: "226", + conversion_price: "3000", + conversion_time: "2024-05-03T00:00:00Z", + }, }, asset, - StakingRewardFormat.Usd, + StakingRewardFormat.USD, ); const amount = reward.amount(); + const usdValue = reward.usdValue(); expect(amount).toEqual(new Decimal("2.26")); + expect(usdValue).toEqual(new Decimal("2.26")); }); it("should return the correct amount for native format", () => { const reward = new StakingReward( { address_id: address.getId(), - date: "2024-05-03", + date: "2024-05-02T00:00:00Z", amount: "726030823305604", state: StakingRewardStateEnum.Pending, - format: StakingRewardFormat.Native, + format: StakingRewardFormat.NATIVE, + usd_value: { + amount: "179", + conversion_price: "2461.63", + conversion_time: "2024-05-02T00:00:00Z", + }, }, asset, - StakingRewardFormat.Native, + StakingRewardFormat.NATIVE, ); const amount = reward.amount(); expect(amount).toEqual(0.000726030823305604); }); + + it("should return 0 when amount is empty", () => { + const reward = new StakingReward( + { + address_id: address.getId(), + date: "2024-05-03", + amount: "", + state: StakingRewardStateEnum.Pending, + format: StakingRewardFormat.NATIVE, + usd_value: { + amount: "179", + conversion_price: "2461.63", + conversion_time: "2024-05-02T00:00:00Z", + }, + }, + asset, + StakingRewardFormat.NATIVE, + ); + + const amount = reward.amount(); + expect(amount).toEqual(0); + }); }); describe(".date", () => { @@ -166,17 +210,24 @@ describe("StakingReward", () => { const reward = new StakingReward( { address_id: address.getId(), - date: "2024-05-03", + date: "2024-05-03T01:23:45Z", amount: "226", state: StakingRewardStateEnum.Pending, - format: StakingRewardFormat.Usd, + format: StakingRewardFormat.USD, + usd_value: { + amount: "226", + conversion_price: "3000", + conversion_time: "2024-05-03T00:00:00Z", + }, }, asset, - StakingRewardFormat.Usd, + StakingRewardFormat.USD, ); const date = reward.date(); - expect(date).toEqual(new Date("2024-05-03")); + const conversionTime = reward.conversionTime(); + expect(date).toEqual(new Date("2024-05-03T01:23:45Z")); + expect(conversionTime).toEqual(new Date("2024-05-03T00:00:00Z")); }); }); @@ -188,14 +239,45 @@ describe("StakingReward", () => { date: "2024-05-03", amount: "226", state: StakingRewardStateEnum.Pending, - format: StakingRewardFormat.Usd, + format: StakingRewardFormat.USD, + usd_value: { + amount: "226", + conversion_price: "3000", + conversion_time: "2024-05-03T00:00:00Z", + }, }, asset, - StakingRewardFormat.Usd, + StakingRewardFormat.USD, ); const rewardStr = reward.toString(); - expect(rewardStr).toEqual("StakingReward { amount: '2.26' }"); + expect(rewardStr).toEqual( + "StakingReward { date: '2024-05-03T00:00:00.000Z' address: 'some-address-id' amount: '2.26' usd_value: '2.26' conversion_price: '3000' conversion_time: '2024-05-03T00:00:00.000Z' }", + ); + }); + }); + + describe(".addressId", () => { + it("should return the onchain address of the StakingReward", () => { + const reward = new StakingReward( + { + address_id: address.getId(), + date: "2024-05-03", + amount: "226", + state: StakingRewardStateEnum.Pending, + format: StakingRewardFormat.USD, + usd_value: { + amount: "226", + conversion_price: "3000", + conversion_time: "2024-05-03T00:00:00Z", + }, + }, + asset, + StakingRewardFormat.USD, + ); + + const addressId = reward.addressId(); + expect(addressId).toEqual(address.getId()); }); }); }); diff --git a/src/tests/trade_test.ts b/src/tests/trade_test.ts index 5b0430a5..b3273489 100644 --- a/src/tests/trade_test.ts +++ b/src/tests/trade_test.ts @@ -1,9 +1,10 @@ import { Decimal } from "decimal.js"; +import { randomUUID } from "crypto"; import { ethers } from "ethers"; import { Transaction as CoinbaseTransaction, Trade as TradeModel } from "../client/api"; import { Transaction } from "../coinbase/transaction"; import { Coinbase } from "./../coinbase/coinbase"; -import { ATOMIC_UNITS_PER_USDC, WEI_PER_ETHER } from "./../coinbase/constants"; +import { NotSignedError } from "../coinbase/errors"; import { Trade } from "./../coinbase/trade"; import { TransactionStatus } from "./../coinbase/types"; import { mockReturnValue } from "./utils"; @@ -22,6 +23,7 @@ describe("Trade", () => { ethAsset, usdcAsset, transactionModel, + approveTransactionModel, fromAsset, toAsset, model, @@ -31,12 +33,14 @@ describe("Trade", () => { beforeEach(() => { fromKey = ethers.Wallet.createRandom(); networkId = "base-sepolia"; - walletId = ethers.Wallet.createRandom().address; + walletId = randomUUID(); addressId = fromKey.address; fromAmount = new Decimal(100); toAmount = new Decimal(100000); - ethAmount = fromAmount.div(new Decimal(WEI_PER_ETHER)); - usdcAmount = toAmount.div(new Decimal(ATOMIC_UNITS_PER_USDC)); + ethAsset = { network_id: networkId, asset_id: "eth", decimals: 18 }; + usdcAsset = { network_id: networkId, asset_id: "usdc", decimals: 6 }; + ethAmount = fromAmount.div(new Decimal(Math.pow(10, ethAsset.decimals))); + usdcAmount = toAmount.div(new Decimal(Math.pow(10, usdcAsset.decimals))); tradeId = ethers.Wallet.createRandom().address; unsignedPayload = "7b2274797065223a22307832222c22636861696e4964223a2230783134613334222c226e6f6e63" + @@ -49,8 +53,6 @@ describe("Trade", () => { "2c2273223a22307830222c2279506172697479223a22307830222c2268617368223a2230783664" + "633334306534643663323633653363396561396135656438646561346332383966613861363966" + "3031653635393462333732386230386138323335333433227d"; - ethAsset = { network_id: networkId, asset_id: "eth", decimals: 18 }; - usdcAsset = { network_id: networkId, asset_id: "usdc", decimals: 6 }; transactionModel = { status: "pending", from_address_id: addressId, @@ -68,6 +70,7 @@ describe("Trade", () => { to_amount: toAmount.toString(), trade_id: tradeId, transaction: transactionModel, + approve_transaction: approveTransactionModel, } as TradeModel; tradesApi = { getTrade: jest.fn().mockResolvedValue({ data: model }), @@ -170,6 +173,136 @@ describe("Trade", () => { }); }); + describe("#sign", () => { + beforeEach(async () => await trade.sign(fromKey)); + + it("signs the transfer transaction", async () => { + expect(trade.getTransaction().isSigned()).toBe(true); + }); + + describe("when there is an approve transaction", () => { + beforeAll(() => { + approveTransactionModel = { + status: "pending", + from_address_id: addressId, + unsigned_payload: unsignedPayload, + } as CoinbaseTransaction; + }); + afterAll(() => (approveTransactionModel = null)); + + it("signs the approve transaction", async () => { + expect(trade.getApproveTransaction().isSigned()).toBe(true); + }); + + it("signs the transfer transaction", async () => { + expect(trade.getTransaction().isSigned()).toBe(true); + }); + }); + }); + + describe("#broadcast!", () => { + let broadcastedTradeModel, + broadcastedTransactionModel, + broadcastedApproveTransactionModel, + signedPayload; + + beforeEach(async () => { + signedPayload = + "02f87683014a34808459682f008459682f00825208944d9e4f3f4d1a8b5f4f7b1f5b5c7b8d6b2b3b1b0b89056bc75e2d6310000080c001a07ae1f4655628ac1b226d60a6243aed786a2d36241ffc0f306159674755f4bd9ca050cd207fdfa6944e2b165775e2ca625b474d1eb40fda0f03f4ca9e286eae3cbe"; + + broadcastedTransactionModel = { + ...transactionModel, + status: "broadcast", + signed_payload: signedPayload, + } as unknown as TradeModel; + + broadcastedTradeModel = { + ...model, + transaction: broadcastedTransactionModel, + approve_transaction: broadcastedApproveTransactionModel, + } as unknown as TradeModel; + + Coinbase.apiClients.trade!.broadcastTrade = mockReturnValue(broadcastedTradeModel); + + model.transaction.signed_payload = signedPayload; + + trade = new Trade(model); + }); + + it("broadcasts the trade with the signed tx payload", async () => { + await trade.broadcast(); + + expect(Coinbase.apiClients.trade!.broadcastTrade).toHaveBeenCalledWith( + walletId, + addressId, + tradeId, + { + signed_payload: signedPayload.slice(2), + approve_transaction_signed_payload: undefined, + }, + ); + }); + + it("returns the broadcasted trade", async () => { + const broadcastedTrade = await trade.broadcast(); + + expect(broadcastedTrade).toBeInstanceOf(Trade); + expect(broadcastedTrade).toBe(trade); + expect(trade.getStatus()).toBe(TransactionStatus.BROADCAST); + }); + + describe("when the transaction is not signed", () => { + beforeEach(async () => { + model.transaction.signed_payload = undefined; + + trade = new Trade(model); + }); + + it("raises a not signed error", async () => { + expect(trade.broadcast()).rejects.toThrow(NotSignedError); + }); + }); + + describe("when the trade has an approve transaction", () => { + beforeAll(() => { + approveTransactionModel = { + status: "pending", + from_address_id: addressId, + unsigned_payload: unsignedPayload, + signed_payload: signedPayload, // TODO: use diff signed payload + } as CoinbaseTransaction; + }); + afterAll(() => (approveTransactionModel = null)); + + it("broadcasts the trade with the signed tx and approve tx payloads", async () => { + await trade.broadcast(); + + expect(Coinbase.apiClients.trade!.broadcastTrade).toHaveBeenCalledWith( + walletId, + addressId, + tradeId, + { + signed_payload: signedPayload.slice(2), + approve_transaction_signed_payload: signedPayload.slice(2), + }, + ); + expect(trade.getStatus()).toBe(TransactionStatus.BROADCAST); + }); + + describe("when the approve transaction is not signed", () => { + beforeEach(async () => { + model.approve_transaction.signed_payload = undefined; + + trade = new Trade(model); + }); + + it("raises an error", async () => { + expect(trade.broadcast()).rejects.toThrow(NotSignedError); + }); + }); + }); + }); + describe("#reload", () => { let trade, updatedModel; beforeEach(() => { @@ -194,14 +327,14 @@ describe("Trade", () => { await trade.reload(); expect(trade.getTransaction().getStatus()).toBe(TransactionStatus.COMPLETE); expect(trade.getToAmount()).toEqual( - new Decimal(500000000).div(new Decimal(ATOMIC_UNITS_PER_USDC)), + new Decimal(500000000).div(new Decimal(Math.pow(10, usdcAsset.decimals))), ); }); it("should update properties on the trade", async () => { expect(trade.getToAmount()).toEqual(usdcAmount); await trade.reload(); expect(trade.getToAmount()).toEqual( - new Decimal(updatedModel.to_amount).div(new Decimal(ATOMIC_UNITS_PER_USDC)), + new Decimal(updatedModel.to_amount).div(new Decimal(Math.pow(10, usdcAsset.decimals))), ); }); }); @@ -217,7 +350,9 @@ describe("Trade", () => { .mockResolvedValueOnce({ data: model }) .mockResolvedValueOnce({ data: updatedModel }); const trade = new Trade(model); + await trade.wait(); + expect(trade.getStatus()).toBe(TransactionStatus.COMPLETE); }); diff --git a/src/tests/transaction_test.ts b/src/tests/transaction_test.ts index 0c5a97a7..25cf5612 100644 --- a/src/tests/transaction_test.ts +++ b/src/tests/transaction_test.ts @@ -1,7 +1,8 @@ import { ethers } from "ethers"; -import { Transaction as TransactionModel } from "../client/api"; +import { Transaction as TransactionModel, EthereumTransaction } from "../client/api"; import { Transaction } from "./../coinbase/transaction"; import { TransactionStatus } from "../coinbase/types"; +import { Coinbase } from "../coinbase/coinbase"; describe("Transaction", () => { let fromKey; @@ -13,6 +14,11 @@ describe("Transaction", () => { let model; let broadcastedModel; let transaction; + let ethereumContent; + let onchainModel; + let blockHash; + let blockHeight; + let networkID; beforeEach(() => { fromKey = ethers.Wallet.createRandom(); @@ -34,20 +40,40 @@ describe("Transaction", () => { transactionHash = "0x6c087c1676e8269dd81e0777244584d0cbfd39b6997b3477242a008fa9349e11"; + blockHash = "0x0728750d458976fd010a2e15cef69ec71c6fccb3377f38a71b70ab551ab22688"; + blockHeight = "18779006"; + ethereumContent = { + priority_fee_per_gas: 1000, + } as EthereumTransaction; + networkID = Coinbase.networks.BaseSepolia; + model = { status: "pending", + network_id: networkID, from_address_id: fromAddressId, unsigned_payload: unsignedPayload, } as TransactionModel; broadcastedModel = { status: "broadcast", + network_id: networkID, from_address_id: fromAddressId, unsigned_payload: unsignedPayload, signed_payload: signedPayload, transaction_hash: transactionHash, transaction_link: `https://sepolia.basescan.org/tx/${transactionHash}`, } as TransactionModel; + + onchainModel = { + status: "complete", + network_id: networkID, + from_address_id: fromAddressId, + unsigned_payload: "", + block_hash: blockHash, + block_height: blockHeight, + content: ethereumContent, + } as TransactionModel; + transaction = new Transaction(model); }); @@ -61,13 +87,13 @@ describe("Transaction", () => { }); }); - describe("#unsignedPayload", () => { + describe("#getUnsignedPayload", () => { it("returns the unsigned payload", () => { expect(transaction.getUnsignedPayload()).toEqual(unsignedPayload); }); }); - describe("#signedPayload", () => { + describe("#getSignedPayload", () => { it("should return undefined when the transaction has not been broadcast on chain", () => { expect(transaction.getSignedPayload()).toBeUndefined(); }); @@ -78,7 +104,7 @@ describe("Transaction", () => { }); }); - describe("#transactionHash", () => { + describe("#getTransactionHash", () => { it("should return undefined when the transaction has not been broadcast on chain", () => { expect(transaction.getTransactionHash()).toBeUndefined(); }); @@ -89,13 +115,20 @@ describe("Transaction", () => { }); }); - describe("#rawTransaction", () => { + describe("#getNetworkId", () => { + it("should return the network ID", () => { + expect(transaction.getNetworkId()).toEqual(networkID); + }); + }); + + describe("#getRawTransaction", () => { let raw: ethers.Transaction, rawPayload; beforeEach(() => { raw = transaction.rawTransaction(); rawPayload = JSON.parse(Buffer.from(unsignedPayload, "hex").toString()); }); + it("should return the raw transaction", () => { expect(raw).toBeInstanceOf(ethers.Transaction); }); @@ -176,34 +209,77 @@ describe("Transaction", () => { }); describe("#getStatus", () => { - it("should return undefined when the transaction has not been initiated with a model", async () => { - model.status = ""; - const transaction = new Transaction(model); - expect(transaction.getStatus()).toBeUndefined(); + [ + { status: TransactionStatus.PENDING, expected: "pending" }, + { status: TransactionStatus.BROADCAST, expected: "broadcast" }, + { status: TransactionStatus.SIGNED, expected: "signed" }, + { status: TransactionStatus.COMPLETE, expected: "complete" }, + { status: TransactionStatus.FAILED, expected: "failed" }, + ].forEach(({ status, expected }) => { + describe(`when the status is ${status}`, () => { + beforeEach(() => (model.status = status)); + + it(`should return ${expected}`, () => { + const transaction = new Transaction(model); + + expect(transaction.getStatus()).toEqual(expected); + }); + }); }); + }); - it("should return a pending status", () => { - model.status = TransactionStatus.PENDING; - const transaction = new Transaction(model); - expect(transaction.getStatus()).toEqual("pending"); + describe("#isTerminalState", () => { + [TransactionStatus.PENDING, TransactionStatus.BROADCAST, TransactionStatus.SIGNED].forEach( + status => { + it(`should return false when the status is ${status}`, () => { + model.status = status; + const transaction = new Transaction(model); + + expect(transaction.isTerminalState()).toEqual(false); + }); + }, + ); + + [TransactionStatus.COMPLETE, TransactionStatus.FAILED].forEach(status => { + it(`should return true when the status is ${status}`, () => { + model.status = status; + const transaction = new Transaction(model); + + expect(transaction.isTerminalState()).toEqual(true); + }); }); + }); - it("should return a broadcast status", () => { - model.status = TransactionStatus.BROADCAST; - const transaction = new Transaction(model); - expect(transaction.getStatus()).toEqual("broadcast"); + describe("#blockHash", () => { + it("returns the block hash", () => { + const transaction = new Transaction(onchainModel); + expect(transaction.blockHash()).toEqual(blockHash); }); - it("should return a complete status", () => { - model.status = TransactionStatus.COMPLETE; - const transaction = new Transaction(model); - expect(transaction.getStatus()).toEqual("complete"); + it("returns undefined when block hash is undefined", () => { + expect(transaction.blockHash()).toBeUndefined; }); + }); - it("should return a failed status", () => { - model.status = TransactionStatus.FAILED; - const transaction = new Transaction(model); - expect(transaction.getStatus()).toEqual("failed"); + describe("#blockHeight", () => { + it("returns the block height", () => { + const transaction = new Transaction(onchainModel); + expect(transaction.blockHeight()).toEqual(blockHeight); + }); + + it("returns undefined when block height is undefined", () => { + expect(transaction.blockHeight()).toBeUndefined; + }); + }); + + describe("#content", () => { + it("returns the ethereum transaction", () => { + const transaction = new Transaction(onchainModel); + expect(transaction.content()).toEqual(ethereumContent); + }); + + it("returns undefined when content is undefined", () => { + expect(transaction.content()).toBeUndefined; }); }); @@ -240,7 +316,7 @@ describe("Transaction", () => { it("returns the same value as toString", () => { const transaction = new Transaction(broadcastedModel); expect(transaction.toString()).toEqual( - `Transaction { transactionHash: '${transaction.getTransactionHash()}', status: 'broadcast' }`, + `Transaction { transactionHash: '${transaction.getTransactionHash()}', status: '${transaction.getStatus()}', unsignedPayload: '${transaction.getUnsignedPayload()}', signedPayload: ${transaction.getSignedPayload()}, transactionLink: ${transaction.getTransactionLink()} }`, ); }); diff --git a/src/tests/transfer_test.ts b/src/tests/transfer_test.ts index c312a62f..52a33519 100644 --- a/src/tests/transfer_test.ts +++ b/src/tests/transfer_test.ts @@ -1,14 +1,28 @@ import { ethers } from "ethers"; import { Decimal } from "decimal.js"; -import { Transfer as TransferModel } from "../client/api"; -import { TransferStatus } from "../coinbase/types"; +import { + Transfer as TransferModel, + TransactionStatusEnum, + SponsoredSendStatusEnum, +} from "../client/api"; +import { TransactionStatus, TransferStatus, SponsoredSendStatus } from "../coinbase/types"; import { Transfer } from "../coinbase/transfer"; +import { SponsoredSend } from "../coinbase/sponsored_send"; +import { Transaction } from "../coinbase/transaction"; import { Coinbase } from "../coinbase/coinbase"; -import { WEI_PER_ETHER } from "../coinbase/constants"; -import { VALID_TRANSFER_MODEL, mockReturnValue, transfersApiMock } from "./utils"; +import { + VALID_TRANSFER_MODEL, + VALID_TRANSFER_SPONSORED_SEND_MODEL, + mockReturnValue, + mockReturnRejectedValue, + transfersApiMock, +} from "./utils"; + +import { TimeoutError } from "../coinbase/errors"; +import { APIError } from "../coinbase/api_error"; const amount = new Decimal(ethers.parseUnits("100", 18).toString()); -const ethAmount = amount.div(WEI_PER_ETHER); +const ethAmount = amount.div(Math.pow(10, 18)); const signedPayload = "02f86b83014a3401830f4240830f4350825208946cd01c0f55ce9e0bf78f5e90f72b4345b" + "16d515d0280c001a0566afb8ab09129b3f5b666c3a1e4a7e92ae12bbee8c75b4c6e0c46f6" + @@ -69,7 +83,7 @@ describe("Transfer Class", () => { }); }); - describe(".getAssetId", () => { + describe("#getAssetId", () => { it("should return the asset ID", () => { expect(transfer.getAssetId()).toEqual(VALID_TRANSFER_MODEL.asset_id); }); @@ -89,133 +103,352 @@ describe("Transfer Class", () => { }); }); - describe("#getUnsignedPayload", () => { - it("should return the unsigned payload", () => { - expect(transfer.getUnsignedPayload()).toEqual(VALID_TRANSFER_MODEL.unsigned_payload); + describe("#getTransactionHash", () => { + it("should return the transaction hash", () => { + const transfer = Transfer.fromModel({ + ...VALID_TRANSFER_MODEL, + transaction: { + ...VALID_TRANSFER_MODEL.transaction!, + transaction_hash: transactionHash, + }, + }); + expect(transfer.getTransactionHash()).toEqual(transactionHash); }); }); - describe("#setSignedTransaction", () => { - it("should return the unsigned payload", () => { - const transfer = Transfer.fromModel(transferModel); - const transaction = new ethers.Transaction(); - transfer.setSignedTransaction(transaction); - expect(transfer.getTransaction()).toEqual(transaction); + describe("#getTransactionLink", () => { + it("should return the transaction link when the transaction hash is available", () => { + expect(transfer.getTransactionLink()).toEqual( + `https://sepolia.basescan.org/tx/${transferModel.transaction!.transaction_hash}`, + ); }); }); - describe("#getSignedPayload", () => { - it("should return undefined when the transfer has not been broadcast on chain", () => { - expect(transfer.getSignedPayload()).toBeUndefined(); + describe("#getTransaction", () => { + it("should return the Transfer Transaction", () => { + const transaction = transfer.getTransaction(); + expect(transaction).toBeInstanceOf(Transaction); }); - it("should return the signed payload when the transfer has been broadcast on chain", () => { - transferModel.signed_payload = signedPayload; - transfer = Transfer.fromModel(transferModel); - expect(transfer.getSignedPayload()).toEqual(signedPayload); + it("should return undefined when using sponsored sends", () => { + const transfer = Transfer.fromModel(VALID_TRANSFER_SPONSORED_SEND_MODEL); + const transaction = transfer.getTransaction(); + expect(transaction).toEqual(undefined); }); }); - describe("#getTransactionHash", () => { - it("should return undefined when the transfer has not been broadcast on chain", () => { - expect(transfer.getTransactionHash()).toBeUndefined(); + describe("#getRawTransaction", () => { + it("should return the Transfer raw transaction", () => { + const rawTransaction = transfer.getRawTransaction(); + expect(rawTransaction).toBeInstanceOf(ethers.Transaction); }); - it("should return the transaction hash when the transfer has been broadcast on chain", () => { - transferModel.transaction_hash = transactionHash; - transfer = Transfer.fromModel(transferModel); - expect(transfer.getTransactionHash()).toEqual(transactionHash); + it("should return undefined when using sponsored sends", () => { + const transfer = Transfer.fromModel(VALID_TRANSFER_SPONSORED_SEND_MODEL); + const rawTransaction = transfer.getRawTransaction(); + expect(rawTransaction).toEqual(undefined); }); }); - describe("#getTransactionLink", () => { - it("should return the transaction link when the transaction hash is available", () => { - expect(transfer.getTransactionLink()).toEqual( - `https://sepolia.basescan.org/tx/${transferModel.transaction_hash}`, - ); + describe("#getSponsoredSend", () => { + it("should return the Transfer SponsoredSend", () => { + const transfer = Transfer.fromModel(VALID_TRANSFER_SPONSORED_SEND_MODEL); + const sponsoredSend = transfer.getSponsoredSend(); + expect(sponsoredSend).toBeInstanceOf(SponsoredSend); + }); + + it("should return undefined when not using sponsored sends", () => { + const sponsoredSend = transfer.getSponsoredSend(); + expect(sponsoredSend).toEqual(undefined); }); }); - describe("#getTransaction", () => { - it("should return the Transfer transaction", () => { - const transaction = transfer.getTransaction(); - expect(transaction).toBeInstanceOf(ethers.Transaction); - expect(transaction.chainId).toEqual(BigInt("0x14a34")); - expect(transaction.nonce).toEqual(Number("0x0")); - expect(transaction.maxPriorityFeePerGas).toEqual(BigInt("0x59682f00")); - expect(transaction.maxFeePerGas).toEqual(BigInt("0x59682f00")); - expect(transaction.gasLimit).toEqual(BigInt("0x5208")); - expect(transaction.to).toEqual(VALID_TRANSFER_MODEL.destination); - expect(transaction.value).toEqual(BigInt(amount.toFixed(0))); - expect(transaction.data).toEqual("0x"); + describe("#getSendTransactionDelegate", () => { + it("should return the Transfer SponsoredSend", () => { + const transfer = Transfer.fromModel(VALID_TRANSFER_SPONSORED_SEND_MODEL); + const sponsoredSend = transfer.getSendTransactionDelegate(); + expect(sponsoredSend).toBeInstanceOf(SponsoredSend); + }); + + it("should return the Transfer Transaction", () => { + const transaction = transfer.getSendTransactionDelegate(); + expect(transaction).toBeInstanceOf(Transaction); + }); + + it("should return undefined when no SponsoredSend or Transaction is defined", () => { + const transfer = Transfer.fromModel({ + ...VALID_TRANSFER_MODEL, + transaction: undefined, + }); + const sponsoredSend = transfer.getSponsoredSend(); + expect(sponsoredSend).toEqual(undefined); }); }); describe("#getStatus", () => { - it("should return PENDING when the transaction has not been created", async () => { - const status = transfer.getStatus(); - expect(status).toEqual(TransferStatus.PENDING); + describe("when the send transaction delegate is a Transaction", () => { + it("should return PENDING when the transaction has not been created", async () => { + const status = transfer.getStatus(); + expect(status).toEqual(TransferStatus.PENDING); + }); + + it("should return PENDING when the transaction has been created but not broadcast", async () => { + transfer = Transfer.fromModel(transferModel); + const status = transfer.getStatus(); + expect(status).toEqual(TransferStatus.PENDING); + }); + + it("should return BROADCAST when the transaction has been broadcast but not included in a block", async () => { + transferModel.transaction!.status = TransactionStatusEnum.Broadcast; + transfer = Transfer.fromModel(transferModel); + const status = transfer.getStatus(); + expect(status).toEqual(TransferStatus.BROADCAST); + }); + + it("should return COMPLETE when the transaction has confirmed", async () => { + transferModel.transaction!.status = TransactionStatusEnum.Complete; + transfer = Transfer.fromModel(transferModel); + const status = transfer.getStatus(); + expect(status).toEqual(TransferStatus.COMPLETE); + }); + + it("should return FAILED when the transaction has failed", async () => { + transferModel.transaction!.status = TransactionStatusEnum.Failed; + transfer = Transfer.fromModel(transferModel); + const status = transfer.getStatus(); + expect(status).toEqual(TransferStatus.FAILED); + }); + + it("should return undefined when the transaction does not exist", async () => { + transferModel.transaction!.status = "" as TransactionStatusEnum; + transfer = Transfer.fromModel(transferModel); + const status = transfer.getStatus(); + expect(status).toEqual(undefined); + }); }); - it("should return PENDING when the transaction has been created but not broadcast", async () => { - transfer = Transfer.fromModel(transferModel); - const status = transfer.getStatus(); - expect(status).toEqual(TransferStatus.PENDING); + describe("when the send transaction delegate is a SponsoredSend", () => { + const transfer = Transfer.fromModel(VALID_TRANSFER_SPONSORED_SEND_MODEL); + + it("should return PENDING when the SponsoredSend has not been signed", async () => { + const status = transfer.getStatus(); + expect(status).toEqual(TransferStatus.PENDING); + }); + + it("should return PENDING when the SponsoredSend has been signed but not submitted", async () => { + const transfer = Transfer.fromModel({ + ...VALID_TRANSFER_SPONSORED_SEND_MODEL, + sponsored_send: { + ...VALID_TRANSFER_SPONSORED_SEND_MODEL.sponsored_send!, + status: SponsoredSendStatusEnum.Signed, + }, + }); + const status = transfer.getStatus(); + expect(status).toEqual(TransferStatus.PENDING); + }); + + it("should return BROADCAST when the SponsoredSend has been submitted", async () => { + const transfer = Transfer.fromModel({ + ...VALID_TRANSFER_SPONSORED_SEND_MODEL, + sponsored_send: { + ...VALID_TRANSFER_SPONSORED_SEND_MODEL.sponsored_send!, + status: SponsoredSendStatusEnum.Submitted, + }, + }); + const status = transfer.getStatus(); + expect(status).toEqual(TransferStatus.BROADCAST); + }); + + it("should return COMPLETE when the SponsoredSend has been completed", async () => { + const transfer = Transfer.fromModel({ + ...VALID_TRANSFER_SPONSORED_SEND_MODEL, + sponsored_send: { + ...VALID_TRANSFER_SPONSORED_SEND_MODEL.sponsored_send!, + status: SponsoredSendStatusEnum.Complete, + }, + }); + const status = transfer.getStatus(); + expect(status).toEqual(TransferStatus.COMPLETE); + }); + + it("should return FAILED when the SponsoredSend has failed", async () => { + const transfer = Transfer.fromModel({ + ...VALID_TRANSFER_SPONSORED_SEND_MODEL, + sponsored_send: { + ...VALID_TRANSFER_SPONSORED_SEND_MODEL.sponsored_send!, + status: SponsoredSendStatusEnum.Failed, + }, + }); + const status = transfer.getStatus(); + expect(status).toEqual(TransferStatus.FAILED); + }); + + it("should return undefined when the SponsoredSend does not exist", async () => { + const transfer = Transfer.fromModel({ + ...VALID_TRANSFER_SPONSORED_SEND_MODEL, + sponsored_send: { + ...VALID_TRANSFER_SPONSORED_SEND_MODEL.sponsored_send!, + status: "" as SponsoredSendStatusEnum, + }, + }); + const status = transfer.getStatus(); + expect(status).toEqual(undefined); + }); }); + }); - it("should return BROADCAST when the transaction has been broadcast but not included in a block", async () => { - transferModel.status = TransferStatus.BROADCAST; - transfer = Transfer.fromModel(transferModel); - const status = transfer.getStatus(); - expect(status).toEqual(TransferStatus.BROADCAST); + describe("#broadcast", () => { + it("should return a broadcasted transfer when the send transaction delegate is a Transaction", async () => { + const transfer = Transfer.fromModel({ + ...VALID_TRANSFER_MODEL, + transaction: { + ...VALID_TRANSFER_MODEL.transaction!, + signed_payload: "0xsignedHash", + }, + }); + Coinbase.apiClients.transfer!.broadcastTransfer = mockReturnValue({ + ...VALID_TRANSFER_MODEL, + transaction: { + ...VALID_TRANSFER_MODEL.transaction!, + status: TransactionStatus.BROADCAST, + }, + }); + const broadcastedTransfer = await transfer.broadcast(); + expect(broadcastedTransfer).toBeInstanceOf(Transfer); + expect(broadcastedTransfer.getStatus()).toEqual(TransferStatus.BROADCAST); }); - it("should return COMPLETE when the transaction has confirmed", async () => { - transferModel.status = TransferStatus.COMPLETE; - transfer = Transfer.fromModel(transferModel); - const status = transfer.getStatus(); - expect(status).toEqual(TransferStatus.COMPLETE); + it("should return a broadcasted transfer when the send transaction delegate is a SponsoredSend", async () => { + const transfer = Transfer.fromModel({ + ...VALID_TRANSFER_SPONSORED_SEND_MODEL, + sponsored_send: { + ...VALID_TRANSFER_SPONSORED_SEND_MODEL.sponsored_send!, + signature: "0xsignedHash", + }, + }); + Coinbase.apiClients.transfer!.broadcastTransfer = mockReturnValue({ + ...VALID_TRANSFER_SPONSORED_SEND_MODEL, + sponsored_send: { + ...VALID_TRANSFER_SPONSORED_SEND_MODEL.sponsored_send!, + status: SponsoredSendStatus.SUBMITTED, + }, + }); + const broadcastedTransfer = await transfer.broadcast(); + expect(broadcastedTransfer).toBeInstanceOf(Transfer); + expect(broadcastedTransfer.getStatus()).toEqual(TransferStatus.BROADCAST); }); - it("should return FAILED when the transaction has failed", async () => { - transferModel.status = TransferStatus.FAILED; - transfer = Transfer.fromModel(transferModel); - const status = transfer.getStatus(); - expect(status).toEqual(TransferStatus.FAILED); + it("should throw when the sned transaction delegate has not been signed", async () => { + expect(transfer.broadcast()).rejects.toThrow(new Error("Cannot broadcast unsigned Transfer")); }); - it("should return undefined when the transaction does not exist", async () => { - transferModel.status = "" as TransferStatus; - transfer = Transfer.fromModel(transferModel); - const status = transfer.getStatus(); - expect(status).toEqual(undefined); + it("should throw an APIErrror if the broadcastTransfer API call fails", async () => { + const transfer = Transfer.fromModel({ + ...VALID_TRANSFER_MODEL, + transaction: { + ...VALID_TRANSFER_MODEL.transaction!, + signed_payload: "0xsignedHash", + }, + }); + Coinbase.apiClients.transfer!.broadcastTransfer = mockReturnRejectedValue( + new APIError("Failed to broadcast transfer"), + ); + expect(transfer.broadcast()).rejects.toThrow(APIError); + }); + }); + + describe("#sign", () => { + let signingKey: any = ethers.Wallet.createRandom(); + it("should return the signature", async () => { + const transfer = Transfer.fromModel({ + ...VALID_TRANSFER_MODEL, + transaction: { + ...VALID_TRANSFER_MODEL.transaction!, + signed_payload: "0xsignedHash", + }, + }); + const signature = await transfer.sign(signingKey); + expect(signature).toEqual(transfer.getTransaction()!.getSignature()!); + }); + }); + + describe("#wait", () => { + it("should return the transfer when the transaction is complete", async () => { + Coinbase.apiClients.transfer!.getTransfer = mockReturnValue({ + ...VALID_TRANSFER_MODEL, + transaction: { + ...VALID_TRANSFER_MODEL.transaction!, + status: TransactionStatusEnum.Complete, + }, + }); + const completedTransfer = await transfer.wait(); + expect(completedTransfer).toBeInstanceOf(Transfer); + expect(completedTransfer.getStatus()).toEqual(TransferStatus.COMPLETE); + }); + + it("should return the failed transfer when the transaction has failed", async () => { + Coinbase.apiClients.transfer!.getTransfer = mockReturnValue({ + ...VALID_TRANSFER_MODEL, + transaction: { + ...VALID_TRANSFER_MODEL.transaction!, + status: TransactionStatusEnum.Failed, + }, + status: TransferStatus.FAILED, + }); + + const completedTransfer = await transfer.wait(); + expect(completedTransfer).toBeInstanceOf(Transfer); + expect(completedTransfer.getStatus()).toEqual(TransferStatus.FAILED); + }); + + it("should throw an error when the transaction has not been created", async () => { + Coinbase.apiClients.transfer!.getTransfer = mockReturnValue({ + ...VALID_TRANSFER_MODEL, + transaction: { + ...VALID_TRANSFER_MODEL.transaction!, + status: TransactionStatusEnum.Pending, + }, + }); + expect(transfer.wait({ timeoutSeconds: 0.05, intervalSeconds: 0.05 })).rejects.toThrow( + new TimeoutError("Transfer timed out"), + ); }); }); describe("#reload", () => { - it("should return PENDING when the trnasaction has not been created", async () => { + it("should return PENDING when the transaction has not been created", async () => { Coinbase.apiClients.transfer!.getTransfer = mockReturnValue({ ...VALID_TRANSFER_MODEL, - status: TransferStatus.PENDING, + transaction: { + ...VALID_TRANSFER_MODEL.transaction!, + status: TransactionStatusEnum.Pending, + }, }); await transfer.reload(); expect(transfer.getStatus()).toEqual(TransferStatus.PENDING); expect(Coinbase.apiClients.transfer!.getTransfer).toHaveBeenCalledTimes(1); }); - it("should return COMPLETE when the trnasaction is complete", async () => { + it("should return COMPLETE when the transaction is complete", async () => { Coinbase.apiClients.transfer!.getTransfer = mockReturnValue({ ...VALID_TRANSFER_MODEL, - status: TransferStatus.COMPLETE, + transaction: { + ...VALID_TRANSFER_MODEL.transaction!, + status: TransactionStatusEnum.Complete, + }, }); await transfer.reload(); expect(transfer.getStatus()).toEqual(TransferStatus.COMPLETE); expect(Coinbase.apiClients.transfer!.getTransfer).toHaveBeenCalledTimes(1); }); - it("should return FAILED when the trnasaction has failed", async () => { + it("should return FAILED when the transaction has failed", async () => { Coinbase.apiClients.transfer!.getTransfer = mockReturnValue({ ...VALID_TRANSFER_MODEL, + transaction: { + ...VALID_TRANSFER_MODEL.transaction!, + status: TransactionStatusEnum.Failed, + }, status: TransferStatus.FAILED, }); await transfer.reload(); @@ -223,4 +456,15 @@ describe("Transfer Class", () => { expect(Coinbase.apiClients.transfer!.getTransfer).toHaveBeenCalledTimes(1); }); }); + + describe("#toString", () => { + it("returns the same value as toString", () => { + expect(transfer.toString()).toEqual( + `Transfer{transferId: '${transfer.getId()}', networkId: '${transfer.getNetworkId()}', ` + + `fromAddressId: '${transfer.getFromAddressId()}', destinationAddressId: '${transfer.getDestinationAddressId()}', ` + + `assetId: '${transfer.getAssetId()}', amount: '${transfer.getAmount()}', transactionHash: '${transfer.getTransactionHash()}', ` + + `transactionLink: '${transfer.getTransactionLink()}', status: '${transfer.getStatus()!}'}`, + ); + }); + }); }); diff --git a/src/tests/types.test-d.ts b/src/tests/types.test-d.ts new file mode 100644 index 00000000..ca8abd88 --- /dev/null +++ b/src/tests/types.test-d.ts @@ -0,0 +1,169 @@ +import { expectType } from "tsd"; +import { ContractFunctionReturnType } from "../coinbase/types/contract"; +import { testAllReadTypesABI } from "./utils"; + +// Test for uint8 +type PureUint8Return = ContractFunctionReturnType; +expectType({} as PureUint8Return); + +// Test for uint16 +type PureUint16Return = ContractFunctionReturnType; +expectType({} as PureUint16Return); + +// Test for uint32 +type PureUint32Return = ContractFunctionReturnType; +expectType({} as PureUint32Return); + +// Test for uint64 +type PureUint64Return = ContractFunctionReturnType; +expectType({} as PureUint64Return); + +// Test for uint128 +type PureUint128Return = ContractFunctionReturnType; +expectType({} as PureUint128Return); + +// Test for uint256 +type PureUint256Return = ContractFunctionReturnType; +expectType({} as PureUint256Return); + +// Tests for int types +type PureInt8Return = ContractFunctionReturnType; +expectType({} as PureInt8Return); + +type PureInt16Return = ContractFunctionReturnType; +expectType({} as PureInt16Return); + +type PureInt32Return = ContractFunctionReturnType; +expectType({} as PureInt32Return); + +type PureInt64Return = ContractFunctionReturnType; +expectType({} as PureInt64Return); + +type PureInt128Return = ContractFunctionReturnType; +expectType({} as PureInt128Return); + +type PureInt256Return = ContractFunctionReturnType; +expectType({} as PureInt256Return); + +// Test for array +type PureArrayReturn = ContractFunctionReturnType; +expectType({} as PureArrayReturn); + +// Test for address +type PureAddressReturn = ContractFunctionReturnType; +expectType<`0x${string}`>({} as PureAddressReturn); + +// Test for string +type PureStringReturn = ContractFunctionReturnType; +expectType({} as PureStringReturn); + +// Test for boolean +type PureBoolReturn = ContractFunctionReturnType; +expectType({} as PureBoolReturn); + +// Test for bytes +type PureBytesReturn = ContractFunctionReturnType; +expectType<`0x${string}`>({} as PureBytesReturn); + +// Tests for bytes1 to bytes32 +type PureBytes1Return = ContractFunctionReturnType; +expectType<`0x${string}`>({} as PureBytes1Return); + +type PureBytes2Return = ContractFunctionReturnType; +expectType<`0x${string}`>({} as PureBytes2Return); + +type PureBytes3Return = ContractFunctionReturnType; +expectType<`0x${string}`>({} as PureBytes3Return); + +type PureBytes4Return = ContractFunctionReturnType; +expectType<`0x${string}`>({} as PureBytes4Return); + +type PureBytes5Return = ContractFunctionReturnType; +expectType<`0x${string}`>({} as PureBytes5Return); + +type PureBytes6Return = ContractFunctionReturnType; +expectType<`0x${string}`>({} as PureBytes6Return); + +type PureBytes7Return = ContractFunctionReturnType; +expectType<`0x${string}`>({} as PureBytes7Return); + +type PureBytes8Return = ContractFunctionReturnType; +expectType<`0x${string}`>({} as PureBytes8Return); + +type PureBytes9Return = ContractFunctionReturnType; +expectType<`0x${string}`>({} as PureBytes9Return); + +type PureBytes10Return = ContractFunctionReturnType; +expectType<`0x${string}`>({} as PureBytes10Return); + +type PureBytes11Return = ContractFunctionReturnType; +expectType<`0x${string}`>({} as PureBytes11Return); + +type PureBytes12Return = ContractFunctionReturnType; +expectType<`0x${string}`>({} as PureBytes12Return); + +type PureBytes13Return = ContractFunctionReturnType; +expectType<`0x${string}`>({} as PureBytes13Return); + +type PureBytes14Return = ContractFunctionReturnType; +expectType<`0x${string}`>({} as PureBytes14Return); + +type PureBytes15Return = ContractFunctionReturnType; +expectType<`0x${string}`>({} as PureBytes15Return); + +type PureBytes16Return = ContractFunctionReturnType; +expectType<`0x${string}`>({} as PureBytes16Return); + +type PureBytes17Return = ContractFunctionReturnType; +expectType<`0x${string}`>({} as PureBytes17Return); + +type PureBytes18Return = ContractFunctionReturnType; +expectType<`0x${string}`>({} as PureBytes18Return); + +type PureBytes19Return = ContractFunctionReturnType; +expectType<`0x${string}`>({} as PureBytes19Return); + +type PureBytes20Return = ContractFunctionReturnType; +expectType<`0x${string}`>({} as PureBytes20Return); + +type PureBytes21Return = ContractFunctionReturnType; +expectType<`0x${string}`>({} as PureBytes21Return); + +type PureBytes22Return = ContractFunctionReturnType; +expectType<`0x${string}`>({} as PureBytes22Return); + +type PureBytes23Return = ContractFunctionReturnType; +expectType<`0x${string}`>({} as PureBytes23Return); + +type PureBytes24Return = ContractFunctionReturnType; +expectType<`0x${string}`>({} as PureBytes24Return); + +type PureBytes25Return = ContractFunctionReturnType; +expectType<`0x${string}`>({} as PureBytes25Return); + +type PureBytes26Return = ContractFunctionReturnType; +expectType<`0x${string}`>({} as PureBytes26Return); + +type PureBytes27Return = ContractFunctionReturnType; +expectType<`0x${string}`>({} as PureBytes27Return); + +type PureBytes28Return = ContractFunctionReturnType; +expectType<`0x${string}`>({} as PureBytes28Return); + +type PureBytes29Return = ContractFunctionReturnType; +expectType<`0x${string}`>({} as PureBytes29Return); + +type PureBytes30Return = ContractFunctionReturnType; +expectType<`0x${string}`>({} as PureBytes30Return); + +type PureBytes31Return = ContractFunctionReturnType; +expectType<`0x${string}`>({} as PureBytes31Return); + +type PureBytes32Return = ContractFunctionReturnType; +expectType<`0x${string}`>({} as PureBytes32Return); + +type PureFunctionReturn = ContractFunctionReturnType; +expectType<`0x${string}${string}`>({} as PureFunctionReturn); + +type PureTupleReturn = ContractFunctionReturnType; +expectType({} as PureTupleReturn); diff --git a/src/tests/user_test.ts b/src/tests/user_test.ts deleted file mode 100644 index 7d632e8b..00000000 --- a/src/tests/user_test.ts +++ /dev/null @@ -1,354 +0,0 @@ -import * as crypto from "crypto"; -import { InternalError } from "../coinbase/errors"; -import { - AddressBalanceList, - AddressList, - Address as AddressModel, - Balance as BalanceModel, - User as UserModel, - Wallet as WalletModel, -} from "./../client/api"; -import { Coinbase } from "./../coinbase/coinbase"; -import { WalletData } from "./../coinbase/types"; -import { User } from "./../coinbase/user"; -import { Wallet } from "./../coinbase/wallet"; -import { - VALID_ADDRESS_MODEL, - VALID_WALLET_MODEL, - addressesApiMock, - generateRandomHash, - generateWalletFromSeed, - mockReturnRejectedValue, - mockReturnValue, - newAddressModel, - mockListAddress, - walletsApiMock, -} from "./utils"; -import Decimal from "decimal.js"; -import { FaucetTransaction } from "../coinbase/faucet_transaction"; - -describe("User Class", () => { - let mockUserModel: UserModel; - let mockAddressModel: AddressModel; - let mockWalletModel: WalletModel; - let mockAddressList: AddressList; - let user: User; - - beforeEach(() => { - mockUserModel = { - id: "12345", - } as UserModel; - }); - - it("should initialize User instance with a valid user model and API clients, and set the user ID correctly", () => { - const user = new User(mockUserModel); - expect(user).toBeInstanceOf(User); - expect(user.getId()).toBe(mockUserModel.id); - }); - - it("should return a correctly formatted string representation of the User instance", () => { - const user = new User(mockUserModel); - expect(user.toString()).toBe(`User{ userId: ${mockUserModel.id} }`); - }); - - describe(".importWallet", () => { - let importedWallet: Wallet; - let walletId: string; - let walletData: WalletData; - - beforeAll(async () => { - walletId = crypto.randomUUID(); - const seed = "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f"; - walletData = { - walletId: walletId, - seed, - }; - const { address1 } = generateWalletFromSeed(walletData.seed); - mockAddressModel = newAddressModel(walletId, address1); - mockAddressList = { - data: [mockAddressModel], - has_more: false, - next_page: "", - total_count: 1, - }; - mockWalletModel = { - id: walletId, - network_id: Coinbase.networks.BaseSepolia, - default_address: mockAddressModel, - enabled_features: [], - }; - Coinbase.apiClients.wallet = walletsApiMock; - Coinbase.apiClients.wallet!.getWallet = mockReturnValue(mockWalletModel); - Coinbase.apiClients.address = addressesApiMock; - user = new User(mockUserModel); - mockListAddress(seed, 2); - importedWallet = await user.importWallet(walletData); - expect(importedWallet).toBeInstanceOf(Wallet); - expect(Coinbase.apiClients.wallet!.getWallet).toHaveBeenCalledWith(importedWallet.getId()); - expect(Coinbase.apiClients.wallet!.getWallet).toHaveBeenCalledTimes(1); - }); - - it("should import an exported wallet", async () => { - expect(importedWallet.getId()).toBe(walletId); - }); - - it("should load the wallet addresses", async () => { - expect(importedWallet.getDefaultAddress()!.getId()).toBe(mockAddressModel.address_id); - }); - - it("should contain the same seed when re-exported", async () => { - expect(importedWallet.export().seed!).toBe(walletData.seed); - }); - }); - - describe(".listWallets", () => { - let user: User; - let walletId: string; - let walletModelWithDefaultAddress: WalletModel; - let addressListModel: AddressList; - const seed = "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f"; - - beforeEach(() => { - jest.clearAllMocks(); - walletId = crypto.randomUUID(); - const { address1, address2 } = generateWalletFromSeed(seed); - mockAddressModel = newAddressModel(walletId, address1); - - const addressModel1: AddressModel = newAddressModel(walletId); - addressModel1.address_id = address1; - const addressModel2: AddressModel = newAddressModel(walletId); - addressModel2.address_id = address2; - walletModelWithDefaultAddress = { - id: walletId, - network_id: Coinbase.networks.BaseSepolia, - default_address: addressModel1, - enabled_features: [], - }; - addressListModel = { - data: [addressModel1, addressModel2], - has_more: false, - next_page: "", - total_count: 1, - }; - Coinbase.apiClients.wallet = walletsApiMock; - Coinbase.apiClients.address = addressesApiMock; - const mockUserModel: UserModel = { - id: "12345", - } as UserModel; - user = new User(mockUserModel); - }); - - it("should raise an error when the Wallet API call fails", async () => { - Coinbase.apiClients.wallet!.listWallets = mockReturnRejectedValue(new Error("API Error")); - await expect(user.listWallets(10, "xyz")).rejects.toThrow(new Error("API Error")); - expect(Coinbase.apiClients.wallet!.listWallets).toHaveBeenCalledTimes(1); - expect(Coinbase.apiClients.address!.listAddresses).toHaveBeenCalledTimes(0); - expect(Coinbase.apiClients.wallet!.listWallets).toHaveBeenCalledWith(10, "xyz"); - }); - - it("should return an empty list of Wallets when the User has no Wallets", async () => { - Coinbase.apiClients.wallet!.listWallets = mockReturnValue({ - data: [], - has_more: false, - next_page: "", - total_count: 0, - }); - const result = await user.listWallets(); - expect(result.wallets.length).toBe(0); - expect(Coinbase.apiClients.wallet!.listWallets).toHaveBeenCalledTimes(1); - expect(Coinbase.apiClients.address!.listAddresses).toHaveBeenCalledTimes(0); - }); - - it("should return the list of Wallets", async () => { - const { address1 } = generateWalletFromSeed(seed); - mockAddressModel = newAddressModel(walletId, address1); - - Coinbase.apiClients.wallet!.listWallets = mockReturnValue({ - data: [walletModelWithDefaultAddress], - has_more: false, - next_page: "nextPageToken", - total_count: 1, - }); - Coinbase.apiClients.address!.listAddresses = mockReturnValue(addressListModel); - const result = await user.listWallets(); - expect(result.wallets[0]).toBeInstanceOf(Wallet); - expect(result.wallets.length).toBe(1); - expect(result.wallets[0].getId()).toBe(walletId); - const addresses = await result.wallets[0].listAddresses(); - expect(addresses.length).toBe(2); - expect(result.nextPageToken).toBe("nextPageToken"); - expect(Coinbase.apiClients.wallet!.listWallets).toHaveBeenCalledTimes(1); - expect(Coinbase.apiClients.address!.listAddresses).toHaveBeenCalledTimes(1); - expect(Coinbase.apiClients.address!.listAddresses).toHaveBeenCalledWith( - walletId, - Wallet.MAX_ADDRESSES, - ); - expect(Coinbase.apiClients.wallet!.listWallets).toHaveBeenCalledWith(10, undefined); - }); - - it("should create Wallets when seed is provided", async () => { - Coinbase.apiClients.wallet!.listWallets = mockReturnValue({ - data: [walletModelWithDefaultAddress], - has_more: false, - next_page: "", - total_count: 1, - }); - Coinbase.apiClients.address!.listAddresses = mockReturnValue(addressListModel); - const result = await user.listWallets(); - const unhydratedWallet = result.wallets[0]; - expect(unhydratedWallet.canSign()).toBe(false); - unhydratedWallet.setSeed(seed); - expect(unhydratedWallet).toBeInstanceOf(Wallet); - expect(unhydratedWallet?.getId()).toBe(walletId); - expect(unhydratedWallet.canSign()).toBe(true); - }); - - it("should prevent access to master wallet required methods", async () => { - const { address1 } = generateWalletFromSeed(seed); - mockAddressModel = newAddressModel(walletId, address1); - Coinbase.apiClients.wallet!.listWallets = mockReturnValue({ - data: [walletModelWithDefaultAddress], - has_more: false, - next_page: "", - total_count: 1, - }); - Coinbase.apiClients.address!.listAddresses = mockReturnValue(mockAddressList); - const result = await user.listWallets(); - const unhydratedWallet = result.wallets[0]; - expect(() => unhydratedWallet.export()).toThrow( - new InternalError("Cannot export Wallet without loaded seed"), - ); - await expect(unhydratedWallet.createAddress()).rejects.toThrow(InternalError); - await expect( - unhydratedWallet.createTransfer({ - amount: new Decimal("500000000000000000"), - assetId: Coinbase.assets.Eth, - destination: address1, - }), - ).rejects.toThrow(InternalError); - expect(unhydratedWallet.canSign()).toBe(false); - }); - - it("should access read-only methods", async () => { - const { address1 } = generateWalletFromSeed(seed); - mockAddressModel = newAddressModel(walletId, address1); - Coinbase.apiClients.wallet!.listWallets = mockReturnValue({ - data: [walletModelWithDefaultAddress], - has_more: false, - next_page: "", - total_count: 1, - }); - Coinbase.apiClients.address!.listAddresses = mockReturnValue(addressListModel); - const mockWalletBalance: BalanceModel = { - amount: "5000000000000000000", - asset: { - asset_id: Coinbase.assets.Eth, - network_id: Coinbase.networks.BaseSepolia, - decimals: 18, - }, - }; - const addressBalanceList: AddressBalanceList = { - data: [mockWalletBalance], - has_more: false, - next_page: "", - total_count: 2, - }; - Coinbase.apiClients.wallet!.getWalletBalance = mockReturnValue(mockWalletBalance); - Coinbase.apiClients.wallet!.listWalletBalances = mockReturnValue(addressBalanceList); - Coinbase.apiClients.address!.requestFaucetFunds = mockReturnValue({ - transaction_hash: generateRandomHash(8), - }); - - const result = await user.listWallets(); - const wallet = result.wallets[0]; - expect(wallet.getId()).toBe(walletId); - expect(wallet.canSign()).toBe(false); - expect(wallet.getNetworkId()).toBe(Coinbase.networks.BaseSepolia); - const addresses = await wallet.listAddresses(); - expect(addresses.length).toBe(2); - expect(wallet.getAddress(addressListModel.data[0].address_id)?.getId()).toBe( - addressListModel.data[0].address_id, - ); - const balance = await wallet.getBalance(Coinbase.assets.Eth); - expect(balance).toEqual(new Decimal("5")); - - const balanceMap = await wallet.listBalances(); - expect(balanceMap.get("eth")).toEqual(new Decimal("5")); - - const faucet = await wallet.faucet(); - expect(faucet).toBeInstanceOf(FaucetTransaction); - }); - }); - - describe(".getWallet", () => { - let user: User; - let walletId: string; - let walletModelWithDefaultAddress: WalletModel; - let addressListModel: AddressList; - - beforeEach(() => { - jest.clearAllMocks(); - walletId = crypto.randomUUID(); - const seed = "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f"; - const { address1 } = generateWalletFromSeed(seed); - mockAddressModel = newAddressModel(walletId, address1); - - const addressModel1: AddressModel = newAddressModel(walletId); - const addressModel2: AddressModel = newAddressModel(walletId); - walletModelWithDefaultAddress = { - id: walletId, - network_id: Coinbase.networks.BaseSepolia, - default_address: addressModel1, - enabled_features: [], - }; - addressListModel = { - data: [addressModel1, addressModel2], - has_more: false, - next_page: "", - total_count: 1, - }; - Coinbase.apiClients.wallet = walletsApiMock; - Coinbase.apiClients.address = addressesApiMock; - const mockUserModel: UserModel = { - id: "12345", - } as UserModel; - user = new User(mockUserModel); - }); - - it("should raise an error when the Wallet API call fails", async () => { - Coinbase.apiClients.wallet!.getWallet = mockReturnRejectedValue(new Error("API Error")); - await expect(user.getWallet(walletId)).rejects.toThrow(new Error("API Error")); - expect(Coinbase.apiClients.wallet!.getWallet).toHaveBeenCalledTimes(1); - expect(Coinbase.apiClients.wallet!.getWallet).toHaveBeenLastCalledWith(walletId); - }); - - it("should return the Wallet", async () => { - const seed = "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f"; - const { address1 } = generateWalletFromSeed(seed); - mockAddressModel = newAddressModel(walletId, address1); - Coinbase.apiClients.wallet!.getWallet = mockReturnValue(walletModelWithDefaultAddress); - Coinbase.apiClients.address!.listAddresses = mockReturnValue(addressListModel); - const result = await user.getWallet(walletId); - expect(result).toBeInstanceOf(Wallet); - expect(result.getId()).toBe(walletId); - expect(result.getDefaultAddress()?.getId()).toBeDefined(); - const addresses = await result.listAddresses(); - expect(addresses.length).toBe(2); - expect(result.canSign()).toBe(false); - expect(Coinbase.apiClients.wallet!.getWallet).toHaveBeenCalledTimes(1); - expect(Coinbase.apiClients.address!.listAddresses).toHaveBeenCalledTimes(2); - expect(Coinbase.apiClients.address!.listAddresses).toHaveBeenCalledWith(walletId, 20); - expect(Coinbase.apiClients.wallet!.getWallet).toHaveBeenCalledWith(walletId); - }); - }); - - describe(".createWallet", () => { - it("should create a Wallet", async () => { - const wallet = Wallet.init(VALID_WALLET_MODEL, ""); - jest.spyOn(Wallet, "create").mockReturnValue(Promise.resolve(wallet)); - const user = new User(mockUserModel); - const result = await user.createWallet(); - expect(result).toBeInstanceOf(Wallet); - }); - }); -}); diff --git a/src/tests/utils.ts b/src/tests/utils.ts index 23d0bd6d..5ad9eee9 100644 --- a/src/tests/utils.ts +++ b/src/tests/utils.ts @@ -10,13 +10,35 @@ import { AddressBalanceList, Address as AddressModel, Transfer as TransferModel, - TransferStatusEnum, + FaucetTransaction as FaucetTransactionModel, StakingOperation as StakingOperationModel, + PayloadSignature as PayloadSignatureModel, + CompiledSmartContract as CompiledSmartContractModel, + PayloadSignatureList, + PayloadSignatureStatusEnum, + ContractInvocation as ContractInvocationModel, + SmartContract as SmartContractModel, + CryptoAmount as CryptoAmountModel, + Asset as AssetModel, + FundQuote as FundQuoteModel, + FundOperation as FundOperationModel, + SmartContractType, + ValidatorList, + Validator, + StakingOperationStatusEnum, + FeatureSet, + TransactionStatusEnum, + ValidatorStatus, + NFTContractOptions as NFTContractOptionsModel, + TokenContractOptions as TokenContractOptionsModel, + MultiTokenContractOptions as MultiTokenContractOptionsModel, } from "../client"; import { BASE_PATH } from "../client/base"; import { Coinbase } from "../coinbase/coinbase"; import { convertStringToHex, registerAxiosInterceptors } from "../coinbase/utils"; import { HDKey } from "@scure/bip32"; +import { Asset } from "../coinbase/asset"; +import { Wallet } from "../coinbase/wallet"; export const mockFn = (...args) => jest.fn(...args) as any; export const mockReturnValue = data => jest.fn().mockResolvedValue({ data }); @@ -35,6 +57,7 @@ export const mockListAddress = (seed: string, count = 1) => { network_id: Coinbase.networks.BaseSepolia, public_key: wallet1PrivateKey, wallet_id: randomUUID(), + index: i, }; }); @@ -54,6 +77,8 @@ export const mockListAddress = (seed: string, count = 1) => { export const walletId = randomUUID(); export const transferId = randomUUID(); +export const amount = "0"; + export const generateWalletFromSeed = (seed: string, count = 2) => { const baseWallet = HDKey.fromMasterSeed(Buffer.from(seed, "hex")); const data: Record = {}; @@ -80,6 +105,7 @@ export const newAddressModel = ( walletId: string, address_id: string = "", network_id: string = Coinbase.networks.BaseSepolia, + index: number = 0, ): AddressModel => { const ethAddress = ethers.Wallet.createRandom(); @@ -88,20 +114,52 @@ export const newAddressModel = ( network_id: network_id ? network_id : Coinbase.networks.BaseSepolia, public_key: ethAddress.publicKey, wallet_id: walletId, + index, }; }; +export const newAddressModelsFromWallet = async ( + walletId: string, + seed: string, + network_id: string = Coinbase.networks.BaseSepolia, +): Promise => { + // create a new wallet with master seed + const wallet = HDKey.fromMasterSeed(Buffer.from(seed, "hex")); + const address1 = getAddressFromHDKey(wallet.derive("m/44'/60'/0'/0/0")); + const address2 = getAddressFromHDKey(wallet.derive("m/44'/60'/0'/0/1")); + const publicKey1 = convertStringToHex(wallet.derive("m/44'/60'/0'/0/0").publicKey!); + const publicKey2 = convertStringToHex(wallet.derive("m/44'/60'/0'/0/1").publicKey!); + + return [ + { + address_id: address1, + network_id: network_id, + public_key: publicKey1, + wallet_id: walletId, + index: 0, + }, + { + address_id: address2, + network_id: network_id, + public_key: publicKey2, + wallet_id: walletId, + index: 1, + }, + ]; +}; + export const VALID_ADDRESS_MODEL = newAddressModel(randomUUID()); export const VALID_WALLET_MODEL: WalletModel = { id: randomUUID(), network_id: Coinbase.networks.BaseSepolia, - enabled_features: [], + feature_set: {} as FeatureSet, default_address: { wallet_id: walletId, address_id: "0xdeadbeef", public_key: "0x1234567890", network_id: Coinbase.networks.BaseSepolia, + index: 0, }, }; @@ -137,25 +195,44 @@ export const VALID_TRANSFER_MODEL: TransferModel = { destination: "0x4D9E4F3f4D1A8B5F4f7b1F5b5C7b8d6b2B3b1b0b", asset_id: Coinbase.assets.Eth, amount: new Decimal(ethers.parseUnits("100", 18).toString()).toString(), - unsigned_payload: - "7b2274797065223a22307832222c22636861696e4964223a2230783134613334222c226e6f6e63" + - "65223a22307830222c22746f223a22307834643965346633663464316138623566346637623166" + - "356235633762386436623262336231623062222c22676173223a22307835323038222c22676173" + - "5072696365223a6e756c6c2c226d61785072696f72697479466565506572476173223a223078" + - "3539363832663030222c226d6178466565506572476173223a2230783539363832663030222c22" + - "76616c7565223a2230783536626337356532643633313030303030222c22696e707574223a22" + - "3078222c226163636573734c697374223a5b5d2c2276223a22307830222c2272223a2230783022" + - "2c2273223a22307830222c2279506172697479223a22307830222c2268617368223a2230783664" + - "633334306534643663323633653363396561396135656438646561346332383966613861363966" + - "3031653635393462333732386230386138323335333433227d", - status: TransferStatusEnum.Pending, + gasless: false, +}; + +export const VALID_TRANSFER_SPONSORED_SEND_MODEL: TransferModel = { + transfer_id: transferId, + network_id: Coinbase.networks.BaseSepolia, + wallet_id: walletId, + asset: { + asset_id: Coinbase.assets.Usdc, + network_id: Coinbase.networks.BaseSepolia, + decimals: 18, + contract_address: "0xusdc", + }, + sponsored_send: { + to_address_id: "0xdeadbeef", + raw_typed_data: "0xhash", + typed_data_hash: "0x7523946e17c0b8090ee18c84d6f9a8d63bab4d579a6507f0998dde0791891823", + transaction_hash: "0xdeadbeef", + transaction_link: "https://sepolia.basescan.org/tx/0xdeadbeef", + status: "pending", + }, + address_id: ethers.Wallet.createRandom().address, + destination: "0x4D9E4F3f4D1A8B5F4f7b1F5b5C7b8d6b2B3b1b0b", + asset_id: Coinbase.assets.Eth, + amount: new Decimal(ethers.parseUnits("100", 18).toString()).toString(), + gasless: false, }; export const VALID_STAKING_OPERATION_MODEL: StakingOperationModel = { + id: "some-id", + network_id: Coinbase.networks.EthereumHoodi, + address_id: "some-address-id", + status: StakingOperationStatusEnum.Initialized, transactions: [ { - network_id: Coinbase.networks.BaseSepolia, - from_address_id: "0xdeadbeef", + network_id: Coinbase.networks.EthereumHoodi, + from_address_id: "dummy-from-address-id", + to_address_id: "dummy-to-address-id", unsigned_payload: "7b2274797065223a22307832222c22636861696e4964223a2230783134613334222c226e6f6e63" + "65223a22307830222c22746f223a22307834643965346633663464316138623566346637623166" + @@ -167,9 +244,359 @@ export const VALID_STAKING_OPERATION_MODEL: StakingOperationModel = { "2c2273223a22307830222c2279506172697479223a22307830222c2268617368223a2230783664" + "633334306534643663323633653363396561396135656438646561346332383966613861363966" + "3031653635393462333732386230386138323335333433227d", - transaction_hash: "0xdeadbeef", + transaction_hash: "0xdummy-transaction-hash", transaction_link: "https://sepolia.basescan.org/tx/0xdeadbeef", - status: "pending", + status: TransactionStatusEnum.Pending, + }, + ], +}; + +export const VALID_PAYLOAD_SIGNATURE_MODEL: PayloadSignatureModel = { + payload_signature_id: "test-payload-signature-id-1", + wallet_id: walletId, + address_id: ethers.Wallet.createRandom().address, + unsigned_payload: "0x58f51af4cb4775cebe5853f0bf1e984927415e889a3d55ae6d243aeec46ffd10", + status: PayloadSignatureStatusEnum.Pending, +}; + +export const VALID_SIGNED_PAYLOAD_SIGNATURE_MODEL: PayloadSignatureModel = { + ...VALID_PAYLOAD_SIGNATURE_MODEL, + signature: "0x58f51af4cb4775cebe5853f0bf1e984927415e889a3d55ae6d243aeec46ffd10", + status: PayloadSignatureStatusEnum.Signed, +}; + +export const VALID_PAYLOAD_SIGNATURE_LIST: PayloadSignatureList = { + data: [ + VALID_PAYLOAD_SIGNATURE_MODEL, + { ...VALID_PAYLOAD_SIGNATURE_MODEL, payload_signature_id: "test-payload-signature-id-2" }, + { ...VALID_PAYLOAD_SIGNATURE_MODEL, payload_signature_id: "test-payload-signature-id-3" }, + { ...VALID_PAYLOAD_SIGNATURE_MODEL, payload_signature_id: "test-payload-signature-id-4" }, + ], + has_more: false, + next_page: "", + total_count: 4, +}; + +export const MINT_NFT_ABI = [ + { + inputs: [{ internalType: "address", name: "recipient", type: "address" }], + name: "mint", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "payable", + type: "function", + }, +]; + +export const MINT_NFT_ARGS = { recipient: "0x475d41de7A81298Ba263184996800CBcaAD73C0b" }; + +const faucetTxHash = generateRandomHash(64); + +export const VALID_FAUCET_TRANSACTION_MODEL: FaucetTransactionModel = { + transaction_hash: faucetTxHash, + transaction_link: "https://sepolia.basescan.org/tx/" + faucetTxHash, + transaction: { + network_id: Coinbase.networks.BaseSepolia, + from_address_id: ethers.Wallet.createRandom().address, + unsigned_payload: "", + transaction_hash: faucetTxHash, + transaction_link: "https://sepolia.basescan.org/tx/" + faucetTxHash, + status: TransactionStatusEnum.Pending, + }, +}; + +export const VALID_CONTRACT_INVOCATION_MODEL: ContractInvocationModel = { + wallet_id: walletId, + address_id: ethers.Wallet.createRandom().address, + contract_invocation_id: "test-contract-invocation-1", + network_id: Coinbase.networks.BaseSepolia, + contract_address: "0xcontract-address", + method: "mint", + args: JSON.stringify(MINT_NFT_ARGS), + abi: JSON.stringify(MINT_NFT_ABI), + amount: "0", + transaction: { + network_id: Coinbase.networks.BaseSepolia, + from_address_id: "0xdeadbeef", + unsigned_payload: + "7b2274797065223a22307832222c22636861696e4964223a2230783134613334222c226e6f6e6365223a22307830222c22746f223a22307861383261623835303466646562326461646161336234663037356539363762626533353036356239222c22676173223a22307865623338222c226761735072696365223a6e756c6c2c226d61785072696f72697479466565506572476173223a2230786634323430222c226d6178466565506572476173223a2230786634333638222c2276616c7565223a22307830222c22696e707574223a223078366136323738343230303030303030303030303030303030303030303030303034373564343164653761383132393862613236333138343939363830306362636161643733633062222c226163636573734c697374223a5b5d2c2276223a22307830222c2272223a22307830222c2273223a22307830222c2279506172697479223a22307830222c2268617368223a22307865333131636632303063643237326639313566656433323165663065376431653965353362393761346166623737336638653935646431343630653665326163227d", + status: TransactionStatusEnum.Pending, + }, +}; + +export const VALID_SIGNED_CONTRACT_INVOCATION_MODEL: ContractInvocationModel = { + ...VALID_CONTRACT_INVOCATION_MODEL, + transaction: { + ...VALID_CONTRACT_INVOCATION_MODEL.transaction, + signed_payload: + "02f88f83014a3480830f4240830f436882eb3894a82ab8504fdeb2dadaa3b4f075e967bbe35065b980a46a627842000000000000000000000000475d41de7a81298ba263184996800cbcaad73c0bc080a00bca053345d88d7cc02c257c5d74f8285bc6408c9020e1b4331779995f355c0ca04a8ec5bee1609d97f3ccba1e0d535441cf61c708e9bc632fe9963b34f97d0462", + status: TransactionStatusEnum.Broadcast, + transaction_hash: "0xdummy-transaction-hash", + transaction_link: "https://sepolia.basescan.org/tx/0xdummy-transaction-hash", + }, +}; + +export const ERC20_NAME = "Test ERC20 Token"; +export const ERC20_SYMBOL = "TEST"; +export const ERC20_TOTAL_SUPPLY = 100; + +export const VALID_SMART_CONTRACT_ERC20_MODEL: SmartContractModel = { + smart_contract_id: "test-smart-contract-1", + network_id: Coinbase.networks.BaseSepolia, + wallet_id: walletId, + contract_name: ERC20_NAME, + is_external: false, + contract_address: "0xcontract-address", + deployer_address: "0xdeployer-address", + type: SmartContractType.Erc20, + options: { + name: ERC20_NAME, + symbol: ERC20_SYMBOL, + total_supply: ERC20_TOTAL_SUPPLY.toString(), + } as TokenContractOptionsModel, + abi: JSON.stringify("some-abi"), + transaction: { + network_id: Coinbase.networks.BaseSepolia, + from_address_id: "0xdeadbeef", + unsigned_payload: + "7b2274797065223a22307832222c22636861696e4964223a2230783134613334222c226e6f6e6365223a22307830222c22746f223a22307861383261623835303466646562326461646161336234663037356539363762626533353036356239222c22676173223a22307865623338222c226761735072696365223a6e756c6c2c226d61785072696f72697479466565506572476173223a2230786634323430222c226d6178466565506572476173223a2230786634333638222c2276616c7565223a22307830222c22696e707574223a223078366136323738343230303030303030303030303030303030303030303030303034373564343164653761383132393862613236333138343939363830306362636161643733633062222c226163636573734c697374223a5b5d2c2276223a22307830222c2272223a22307830222c2273223a22307830222c2279506172697479223a22307830222c2268617368223a22307865333131636632303063643237326639313566656433323165663065376431653965353362393761346166623737336638653935646431343630653665326163227d", + status: TransactionStatusEnum.Pending, + }, +}; + +export const VALID_EXTERNAL_SMART_CONTRACT_ERC20_MODEL: SmartContractModel = { + smart_contract_id: "test-smart-contract-1", + network_id: Coinbase.networks.BaseSepolia, + contract_name: ERC20_NAME, + is_external: true, + contract_address: "0xcontract-address", + type: SmartContractType.Custom, + abi: JSON.stringify("some-abi"), +}; + +export const ERC721_NAME = "Test NFT"; +export const ERC721_SYMBOL = "TEST"; +export const ERC721_BASE_URI = "https://example.com/metadata/"; +export const VALID_SMART_CONTRACT_ERC721_MODEL: SmartContractModel = { + smart_contract_id: "test-smart-contract-1", + network_id: Coinbase.networks.BaseSepolia, + wallet_id: walletId, + contract_name: ERC721_NAME, + is_external: false, + contract_address: "0xcontract-address", + deployer_address: "0xdeployer-address", + type: SmartContractType.Erc721, + options: { + name: ERC721_NAME, + symbol: ERC721_SYMBOL, + base_uri: ERC721_BASE_URI, + } as NFTContractOptionsModel, + abi: JSON.stringify("some-abi"), + transaction: { + network_id: Coinbase.networks.BaseSepolia, + from_address_id: "0xdeadbeef", + unsigned_payload: + "7b2274797065223a22307832222c22636861696e4964223a2230783134613334222c226e6f6e6365223a22307830222c22746f223a22307861383261623835303466646562326461646161336234663037356539363762626533353036356239222c22676173223a22307865623338222c226761735072696365223a6e756c6c2c226d61785072696f72697479466565506572476173223a2230786634323430222c226d6178466565506572476173223a2230786634333638222c2276616c7565223a22307830222c22696e707574223a223078366136323738343230303030303030303030303030303030303030303030303034373564343164653761383132393862613236333138343939363830306362636161643733633062222c226163636573734c697374223a5b5d2c2276223a22307830222c2272223a22307830222c2273223a22307830222c2279506172697479223a22307830222c2268617368223a22307865333131636632303063643237326639313566656433323165663065376431653965353362393761346166623737336638653935646431343630653665326163227d", + status: TransactionStatusEnum.Pending, + }, +}; + +export const ERC1155_URI = "https://example.com/{id}.json"; +export const VALID_SMART_CONTRACT_ERC1155_MODEL: SmartContractModel = { + smart_contract_id: "test-smart-contract-1", + network_id: Coinbase.networks.BaseSepolia, + wallet_id: walletId, + contract_name: "", + is_external: false, + contract_address: "0xcontract-address", + deployer_address: "0xdeployer-address", + type: SmartContractType.Erc1155, + options: { + uri: ERC1155_URI, + } as MultiTokenContractOptionsModel, + abi: JSON.stringify("some-abi"), + transaction: { + network_id: Coinbase.networks.BaseSepolia, + from_address_id: "0xdeadbeef", + unsigned_payload: + "7b2274797065223a22307832222c22636861696e4964223a2230783134613334222c226e6f6e6365223a22307830222c22746f223a22307861383261623835303466646562326461646161336234663037356539363762626533353036356239222c22676173223a22307865623338222c226761735072696365223a6e756c6c2c226d61785072696f72697479466565506572476173223a2230786634323430222c226d6178466565506572476173223a2230786634333638222c2276616c7565223a22307830222c22696e707574223a223078366136323738343230303030303030303030303030303030303030303030303034373564343164653761383132393862613236333138343939363830306362636161643733633062222c226163636573734c697374223a5b5d2c2276223a22307830222c2272223a22307830222c2273223a22307830222c2279506172697479223a22307830222c2268617368223a22307865333131636632303063643237326639313566656433323165663065376431653965353362393761346166623737336638653935646431343630653665326163227d", + status: TransactionStatusEnum.Pending, + }, +}; + +export const VALID_COMPILED_CONTRACT_MODEL: CompiledSmartContractModel = { + compiled_smart_contract_id: "test-compiled-contract-1", + solidity_input_json: "{}", + contract_creation_bytecode: "0x", + abi: JSON.stringify("some-abi"), + contract_name: "TestContract", +}; + +export const VALID_SMART_CONTRACT_CUSTOM_MODEL: SmartContractModel = { + smart_contract_id: "test-smart-contract-custom", + network_id: Coinbase.networks.BaseSepolia, + wallet_id: walletId, + contract_name: "TestContract", + is_external: false, + contract_address: "0xcontract-address", + type: SmartContractType.Custom, + abi: JSON.stringify("some-abi"), + transaction: { + network_id: Coinbase.networks.BaseSepolia, + from_address_id: "0xdeadbeef", + unsigned_payload: + "7b2274797065223a22307832222c22636861696e4964223a2230783134613334222c226e6f6e6365223a22307830222c22746f223a22307861383261623835303466646562326461646161336234663037356539363762626533353036356239222c22676173223a22307865623338222c226761735072696365223a6e756c6c2c226d61785072696f72697479466565506572476173223a2230786634323430222c226d6178466565506572476173223a2230786634333638222c2276616c7565223a22307830222c22696e707574223a223078366136323738343230303030303030303030303030303030303030303030303034373564343164653761383132393862613236333138343939363830306362636161643733633062222c226163636573734c697374223a5b5d2c2276223a22307830222c2272223a22307830222c2273223a22307830222c2279506172697479223a22307830222c2268617368223a22307865333131636632303063643237326639313566656433323165663065376431653965353362393761346166623737336638653935646431343630653665326163227d", + status: TransactionStatusEnum.Pending, + }, +}; + +export const VALID_SMART_CONTRACT_EXTERNAL_MODEL: SmartContractModel = { + smart_contract_id: "test-smart-contract-external", + network_id: Coinbase.networks.BaseSepolia, + contract_name: ERC20_NAME, + is_external: true, + contract_address: "0xcontract-address", + type: SmartContractType.Custom, + abi: JSON.stringify("some-abi"), +}; + +const asset = Asset.fromModel({ + asset_id: Coinbase.assets.Eth, + network_id: "base-sepolia", + contract_address: "0x", + decimals: 18, +}); + +export const VALID_USDC_CRYPTO_AMOUNT_MODEL: CryptoAmountModel = { + amount: "1", + asset: { + network_id: "base-sepolia", + asset_id: Coinbase.assets.Usdc, + contract_address: "0x", + decimals: 6, + }, +}; + +export const VALID_ETH_CRYPTO_AMOUNT_MODEL: CryptoAmountModel = { + amount: "1", + asset: { + network_id: "base-sepolia", + asset_id: Coinbase.assets.Eth, + contract_address: "0x", + decimals: 18, + }, +}; + +export const VALID_ASSET_MODEL: AssetModel = { + asset_id: Coinbase.assets.Eth, + network_id: "base-sepolia", + contract_address: "0x", + decimals: 18, +}; + +export const VALID_FUND_QUOTE_MODEL: FundQuoteModel = { + fund_quote_id: "test-quote-id", + network_id: "base-sepolia", + wallet_id: "test-wallet-id", + address_id: "test-address-id", + crypto_amount: VALID_ETH_CRYPTO_AMOUNT_MODEL, + fiat_amount: { + amount: "100", + currency: "USD", + }, + expires_at: "2024-12-31T23:59:59Z", + fees: { + buy_fee: { + amount: "1", + currency: "USD", + }, + transfer_fee: { + amount: "10000000000000000", // 0.01 ETH + asset: { + network_id: "base-sepolia", + asset_id: Coinbase.assets.Eth, + contract_address: "0x", + decimals: 18, + }, + }, + }, +}; + +export const VALID_FUND_OPERATION_MODEL: FundOperationModel = { + fund_operation_id: "test-operation-id", + network_id: Coinbase.networks.BaseSepolia, + wallet_id: "test-wallet-id", + address_id: "test-address-id", + crypto_amount: VALID_ETH_CRYPTO_AMOUNT_MODEL, + fiat_amount: { + amount: "100", + currency: "USD", + }, + fees: { + buy_fee: { + amount: "1", + currency: "USD", + }, + transfer_fee: { + amount: "10000000000000000", // 0.01 ETH in wei + asset: { + asset_id: Coinbase.assets.Eth, + network_id: Coinbase.networks.BaseSepolia, + decimals: 18, + contract_address: "0x", + }, + }, + }, + status: "complete" as const, +}; + +/** + * mockStakingOperation returns a mock StakingOperation object with the provided status. + * + * @param status - The status of the validator. + * + * @returns The mock StakingOperationModel object. + */ +export function mockStakingOperation(status: StakingOperationStatusEnum): StakingOperationModel { + return { + id: "some-id", + network_id: Coinbase.networks.EthereumHoodi, + address_id: "some-address-id", + status: status, + transactions: [ + { + network_id: Coinbase.networks.EthereumHoodi, + from_address_id: "0xdeadbeef", + unsigned_payload: + "7b2274797065223a22307832222c22636861696e4964223a2230783134613334222c226e6f6e63" + + "65223a22307830222c22746f223a22307834643965346633663464316138623566346637623166" + + "356235633762386436623262336231623062222c22676173223a22307835323038222c22676173" + + "5072696365223a6e756c6c2c226d61785072696f72697479466565506572476173223a223078" + + "3539363832663030222c226d6178466565506572476173223a2230783539363832663030222c22" + + "76616c7565223a2230783536626337356532643633313030303030222c22696e707574223a22" + + "3078222c226163636573734c697374223a5b5d2c2276223a22307830222c2272223a2230783022" + + "2c2273223a22307830222c2279506172697479223a22307830222c2268617368223a2230783664" + + "633334306534643663323633653363396561396135656438646561346332383966613861363966" + + "3031653635393462333732386230386138323335333433227d", + transaction_hash: "0xdeadbeef", + transaction_link: "https://sepolia.basescan.org/tx/0xdeadbeef", + status: "pending", + }, + ], + }; +} + +export const VALID_NATIVE_ETH_UNSTAKE_OPERATION_MODEL: StakingOperationModel = { + id: randomUUID(), + network_id: Coinbase.networks.BaseSepolia, + address_id: "0x1234567890", + status: "complete", + transactions: [], + metadata: [ + { + fork: "some-fork", + signed_voluntary_exit: + "eyJtZXNzYWdlIjp7ImVwb2NoIjoiNjU1MTQiLCJ2YWxpZGF0b3JfaW5kZXgiOiIxNzQ3MTM3In0sInNpZ25hdHVyZSI6IjB4YTAxODM0NmM3YWNkZmEwOTVhM2UyY2E1ZDZlMDM0NmUzNDhhN2IwOTk1MWU1MmI0ZjdiYjk1MmY2ODgxZjdmY2EyODM0YWViNjFjOGQ4NzMxMTFkNzBmYmNiYzUwNWQwMDM2MmM1NjBjYTdjMTk3ZWM3MTU0OTU2NzE0ZDIzODU1YWYyNTljOTcxODgxMjI3NWI3NmU2MTRiMDljMzVlMGUwMzA3MmI2NzUwNjkyZjBmMjcwNWM1ZGEyNmY4YWQ0In0K", + validator_pub_key: "0x1234567890", }, ], }; @@ -209,6 +636,74 @@ export const VALID_ADDRESS_BALANCE_LIST: AddressBalanceList = { total_count: 3, }; +/** + * mockEthereumValidator returns a mock EthereumValidator object with the provided index and status. + * + * @param index - The index of the validator. + * @param status - The status of the validator. + * @param public_key - The public key of the validator. + * + * @returns The mock EthereumValidator object. + */ +export function mockEthereumValidator( + index: string, + status: ValidatorStatus, + public_key: string, +): Validator { + return { + validator_id: public_key, + network_id: "ethereum-hoodi", + asset_id: "eth", + status: status, + details: { + index: index, + public_key: public_key, + withdrawal_address: "0xwithdrawal_address_1", + withdrawal_credentials: "0x01withdrawal_credentials_1", + fee_recipient_address: "0xfee_recipient_address_1", + forwarded_fee_recipient_address: "0xforwarded_fee_recipient_address_1", + slashed: false, + activationEpoch: "10", + exitEpoch: "10", + withdrawableEpoch: "10", + balance: { + amount: "32000000000000000000", + asset: { + asset_id: Coinbase.assets.Eth, + network_id: Coinbase.networks.EthereumHoodi, + }, + }, + effective_balance: { + amount: "32000000000000000000", + asset: { + asset_id: Coinbase.assets.Eth, + network_id: Coinbase.networks.EthereumHoodi, + }, + }, + }, + }; +} + +export const VALID_ACTIVE_VALIDATOR_LIST: ValidatorList = { + data: [ + mockEthereumValidator("100", ValidatorStatus.Active, "0xpublic_key_1"), + mockEthereumValidator("200", ValidatorStatus.Active, "0xpublic_key_2"), + mockEthereumValidator("300", ValidatorStatus.Active, "0xpublic_key_3"), + ], + has_more: false, + next_page: "", +}; + +export const VALID_EXITING_VALIDATOR_LIST: ValidatorList = { + data: [ + mockEthereumValidator("400", ValidatorStatus.Exiting, "0xpublic_key_4"), + mockEthereumValidator("500", ValidatorStatus.Exiting, "0xpublic_key_5"), + mockEthereumValidator("600", ValidatorStatus.Exiting, "0xpublic_key_6"), + ], + has_more: false, + next_page: "", +}; + export const VALID_BALANCE_MODEL: BalanceModel = { amount: "1000000000000000000", asset: { @@ -287,6 +782,9 @@ export const addressesApiMock = { getAddressBalance: jest.fn(), listAddressBalances: jest.fn(), createAddress: jest.fn(), + createPayloadSignature: jest.fn(), + getPayloadSignature: jest.fn(), + listPayloadSignatures: jest.fn(), }; export const tradeApiMock = { @@ -305,16 +803,896 @@ export const transfersApiMock = { export const stakeApiMock = { buildStakingOperation: jest.fn(), + getExternalStakingOperation: jest.fn(), getStakingContext: jest.fn(), fetchStakingRewards: jest.fn(), + fetchHistoricalStakingBalances: jest.fn(), + getValidator: jest.fn(), + listValidators: jest.fn(), +}; + +export const walletStakeApiMock = { + broadcastStakingOperation: jest.fn(), + createStakingOperation: jest.fn(), + getStakingOperation: jest.fn(), +}; + +export const validatorApiMock = { + getValidator: jest.fn(), + listValidators: jest.fn(), }; export const externalAddressApiMock = { listExternalAddressBalances: jest.fn(), getExternalAddressBalance: jest.fn(), requestExternalFaucetFunds: jest.fn(), + listAddressTransactions: jest.fn(), + getFaucetTransaction: jest.fn(), + broadcastExternalTransaction: jest.fn(), +}; + +export const balanceHistoryApiMock = { + listAddressHistoricalBalance: jest.fn(), +}; + +export const transactionHistoryApiMock = { + listAddressTransactions: jest.fn(), }; export const serverSignersApiMock = { listServerSigners: jest.fn(), }; + +export const contractEventApiMock = { + listContractEvents: jest.fn(), +}; + +export const smartContractApiMock = { + compileSmartContract: jest.fn(), + createSmartContract: jest.fn(), + deploySmartContract: jest.fn(), + getSmartContract: jest.fn(), + listSmartContracts: jest.fn(), + readContract: jest.fn(), + registerSmartContract: jest.fn(), + updateSmartContract: jest.fn(), +}; + +export const contractInvocationApiMock = { + getContractInvocation: jest.fn(), + listContractInvocations: jest.fn(), + createContractInvocation: jest.fn(), + broadcastContractInvocation: jest.fn(), +}; + +export const assetApiMock = { + getAsset: jest.fn(), +}; + +export const fundOperationsApiMock = { + getFundOperation: jest.fn(), + listFundOperations: jest.fn(), + createFundOperation: jest.fn(), + createFundQuote: jest.fn(), +}; + +export const reputationApiMock = { + getAddressReputation: jest.fn(), +}; + +export const smartWalletApiMock = { + createSmartWallet: jest.fn(), + getSmartWallet: jest.fn(), + createUserOperation: jest.fn(), + broadcastUserOperation: jest.fn(), + getUserOperation: jest.fn(), +}; + +export const testAllReadTypesABI = [ + { + type: "function", + name: "exampleFunction", + inputs: [ + { + name: "z", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureAddress", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureArray", + inputs: [], + outputs: [ + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureBool", + inputs: [], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureBytes", + inputs: [], + outputs: [ + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureBytes1", + inputs: [], + outputs: [ + { + name: "", + type: "bytes1", + internalType: "bytes1", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureBytes10", + inputs: [], + outputs: [ + { + name: "", + type: "bytes10", + internalType: "bytes10", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureBytes11", + inputs: [], + outputs: [ + { + name: "", + type: "bytes11", + internalType: "bytes11", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureBytes12", + inputs: [], + outputs: [ + { + name: "", + type: "bytes12", + internalType: "bytes12", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureBytes13", + inputs: [], + outputs: [ + { + name: "", + type: "bytes13", + internalType: "bytes13", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureBytes14", + inputs: [], + outputs: [ + { + name: "", + type: "bytes14", + internalType: "bytes14", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureBytes15", + inputs: [], + outputs: [ + { + name: "", + type: "bytes15", + internalType: "bytes15", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureBytes16", + inputs: [], + outputs: [ + { + name: "", + type: "bytes16", + internalType: "bytes16", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureBytes17", + inputs: [], + outputs: [ + { + name: "", + type: "bytes17", + internalType: "bytes17", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureBytes18", + inputs: [], + outputs: [ + { + name: "", + type: "bytes18", + internalType: "bytes18", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureBytes19", + inputs: [], + outputs: [ + { + name: "", + type: "bytes19", + internalType: "bytes19", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureBytes2", + inputs: [], + outputs: [ + { + name: "", + type: "bytes2", + internalType: "bytes2", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureBytes20", + inputs: [], + outputs: [ + { + name: "", + type: "bytes20", + internalType: "bytes20", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureBytes21", + inputs: [], + outputs: [ + { + name: "", + type: "bytes21", + internalType: "bytes21", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureBytes22", + inputs: [], + outputs: [ + { + name: "", + type: "bytes22", + internalType: "bytes22", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureBytes23", + inputs: [], + outputs: [ + { + name: "", + type: "bytes23", + internalType: "bytes23", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureBytes24", + inputs: [], + outputs: [ + { + name: "", + type: "bytes24", + internalType: "bytes24", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureBytes25", + inputs: [], + outputs: [ + { + name: "", + type: "bytes25", + internalType: "bytes25", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureBytes26", + inputs: [], + outputs: [ + { + name: "", + type: "bytes26", + internalType: "bytes26", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureBytes27", + inputs: [], + outputs: [ + { + name: "", + type: "bytes27", + internalType: "bytes27", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureBytes28", + inputs: [], + outputs: [ + { + name: "", + type: "bytes28", + internalType: "bytes28", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureBytes29", + inputs: [], + outputs: [ + { + name: "", + type: "bytes29", + internalType: "bytes29", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureBytes3", + inputs: [], + outputs: [ + { + name: "", + type: "bytes3", + internalType: "bytes3", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureBytes30", + inputs: [], + outputs: [ + { + name: "", + type: "bytes30", + internalType: "bytes30", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureBytes31", + inputs: [], + outputs: [ + { + name: "", + type: "bytes31", + internalType: "bytes31", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureBytes32", + inputs: [], + outputs: [ + { + name: "", + type: "bytes32", + internalType: "bytes32", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureBytes4", + inputs: [], + outputs: [ + { + name: "", + type: "bytes4", + internalType: "bytes4", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureBytes5", + inputs: [], + outputs: [ + { + name: "", + type: "bytes5", + internalType: "bytes5", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureBytes6", + inputs: [], + outputs: [ + { + name: "", + type: "bytes6", + internalType: "bytes6", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureBytes7", + inputs: [], + outputs: [ + { + name: "", + type: "bytes7", + internalType: "bytes7", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureBytes8", + inputs: [], + outputs: [ + { + name: "", + type: "bytes8", + internalType: "bytes8", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureBytes9", + inputs: [], + outputs: [ + { + name: "", + type: "bytes9", + internalType: "bytes9", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureBytesShort", + inputs: [], + outputs: [ + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureFunctionSelector", + inputs: [], + outputs: [ + { + name: "", + type: "bytes4", + internalType: "bytes4", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureInt128", + inputs: [], + outputs: [ + { + name: "", + type: "int128", + internalType: "int128", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureInt16", + inputs: [], + outputs: [ + { + name: "", + type: "int16", + internalType: "int16", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureInt256", + inputs: [], + outputs: [ + { + name: "", + type: "int256", + internalType: "int256", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureInt32", + inputs: [], + outputs: [ + { + name: "", + type: "int32", + internalType: "int32", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureInt64", + inputs: [], + outputs: [ + { + name: "", + type: "int64", + internalType: "int64", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureInt8", + inputs: [], + outputs: [ + { + name: "", + type: "int8", + internalType: "int8", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureNestedStruct", + inputs: [], + outputs: [ + { + name: "", + type: "tuple", + internalType: "struct TestAllReadTypes.ExampleStruct", + components: [ + { + name: "a", + type: "uint256", + internalType: "uint256", + }, + { + name: "nestedFields", + type: "tuple", + internalType: "struct TestAllReadTypes.NestedData", + components: [ + { + name: "nestedArray", + type: "tuple", + internalType: "struct TestAllReadTypes.ArrayData", + components: [ + { + name: "a", + type: "uint256[]", + internalType: "uint256[]", + }, + ], + }, + { + name: "a", + type: "uint256", + internalType: "uint256", + }, + ], + }, + ], + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureString", + inputs: [], + outputs: [ + { + name: "", + type: "string", + internalType: "string", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureTuple", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureTupleMixedTypes", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureUint128", + inputs: [], + outputs: [ + { + name: "", + type: "uint128", + internalType: "uint128", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureUint16", + inputs: [], + outputs: [ + { + name: "", + type: "uint16", + internalType: "uint16", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureUint256", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureUint32", + inputs: [], + outputs: [ + { + name: "", + type: "uint32", + internalType: "uint32", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureUint64", + inputs: [], + outputs: [ + { + name: "", + type: "uint64", + internalType: "uint64", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pureUint8", + inputs: [], + outputs: [ + { + name: "", + type: "uint8", + internalType: "uint8", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "returnFunction", + inputs: [], + outputs: [ + { + name: "", + type: "function", + internalType: "function (uint256) external returns (bool)", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "viewUint", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "x", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, +] as const; diff --git a/src/tests/utils_test.ts b/src/tests/utils_test.ts index ca64acf4..d229db1e 100644 --- a/src/tests/utils_test.ts +++ b/src/tests/utils_test.ts @@ -1,5 +1,5 @@ import { AxiosResponse } from "axios"; -import { InvalidUnsignedPayload } from "../coinbase/errors"; +import { InvalidUnsignedPayloadError } from "../coinbase/errors"; import { logApiResponse, parseUnsignedPayload } from "./../coinbase/utils"; // Adjust the path as necessary describe("parseUnsignedPayload", () => { @@ -11,22 +11,22 @@ describe("parseUnsignedPayload", () => { it("should throw InvalidUnsignedPayload error if payload cannot be parsed", () => { const payload = "invalidhexstring"; - expect(() => parseUnsignedPayload(payload)).toThrow(InvalidUnsignedPayload); + expect(() => parseUnsignedPayload(payload)).toThrow(InvalidUnsignedPayloadError); }); it("should throw InvalidUnsignedPayload error if payload cannot be decoded to JSON", () => { const payload = "000102"; // Invalid JSON - expect(() => parseUnsignedPayload(payload)).toThrow(InvalidUnsignedPayload); + expect(() => parseUnsignedPayload(payload)).toThrow(InvalidUnsignedPayloadError); }); it("should throw InvalidUnsignedPayload error if payload is an empty string", () => { const payload = ""; - expect(() => parseUnsignedPayload(payload)).toThrow(InvalidUnsignedPayload); + expect(() => parseUnsignedPayload(payload)).toThrow(InvalidUnsignedPayloadError); }); it("should throw InvalidUnsignedPayload error if payload contains non-hex characters", () => { const payload = "7b226b6579223a2276616c75657g7d"; // Invalid hex due to 'g' - expect(() => parseUnsignedPayload(payload)).toThrow(InvalidUnsignedPayload); + expect(() => parseUnsignedPayload(payload)).toThrow(InvalidUnsignedPayloadError); }); }); diff --git a/src/tests/validator_test.ts b/src/tests/validator_test.ts new file mode 100644 index 00000000..02250504 --- /dev/null +++ b/src/tests/validator_test.ts @@ -0,0 +1,109 @@ +import { Validator } from "../coinbase/validator"; +import { ValidatorStatus } from "../coinbase/types"; +import { Validator as ValidatorModel } from "../client"; +import { Coinbase } from "../coinbase/coinbase"; +import { ValidatorStatus as APIValidatorStatus } from "../client/api"; + +describe("Validator", () => { + let validator: Validator; + + beforeEach(() => { + const mockModel: ValidatorModel = { + validator_id: "123", + status: APIValidatorStatus.Active, + network_id: Coinbase.networks.EthereumHoodi, + asset_id: Coinbase.assets.Eth, + details: { + effective_balance: { + amount: "100", + asset: { network_id: Coinbase.networks.EthereumHoodi, asset_id: Coinbase.assets.Eth }, + }, + balance: { + amount: "200", + asset: { network_id: Coinbase.networks.EthereumHoodi, asset_id: Coinbase.assets.Eth }, + }, + exitEpoch: "epoch-1", + activationEpoch: "epoch-0", + index: "0", + public_key: "public-key-123", + slashed: false, + withdrawableEpoch: "epoch-2", + withdrawal_address: "withdrawal-address-123", + withdrawal_credentials: "withdrawal-credentials-123", + fee_recipient_address: "fee-recipient-address-123", + }, + }; + + validator = new Validator(mockModel); + }); + + test("getValidatorId should return the correct validator ID", () => { + expect(validator.getValidatorId()).toBe("123"); + }); + + test("getStatus should return the correct status", () => { + expect(validator.getStatus()).toBe(ValidatorStatus.ACTIVE); + }); + + test("getNetworkId should return the correct network ID", () => { + expect(validator.getNetworkId()).toBe(Coinbase.networks.EthereumHoodi); + }); + + test("getAssetId should return the correct asset ID", () => { + expect(validator.getAssetId()).toBe(Coinbase.assets.Eth); + }); + + test("getActivationEpoch should return the correct activation epoch", () => { + expect(validator.getActivationEpoch()).toBe("epoch-0"); + }); + + test("getExitEpoch should return the correct exit epoch", () => { + expect(validator.getExitEpoch()).toBe("epoch-1"); + }); + + test("getIndex should return the correct index", () => { + expect(validator.getIndex()).toBe("0"); + }); + + test("getPublicKey should return the correct public key", () => { + expect(validator.getPublicKey()).toBe("public-key-123"); + }); + + test("isSlashed should return the correct slashed status", () => { + expect(validator.isSlashed()).toBe(false); + }); + + test("getWithdrawableEpoch should return the correct withdrawable epoch", () => { + expect(validator.getWithdrawableEpoch()).toBe("epoch-2"); + }); + + test("getWithdrawalAddress should return the correct withdrawal address", () => { + expect(validator.getWithdrawalAddress()).toBe("withdrawal-address-123"); + }); + + test("getWithdrawalCredentials should return the correct withdrawal credentials", () => { + expect(validator.getWithdrawalCredentials()).toBe("withdrawal-credentials-123"); + }); + + test("getFeeRecipientAddress should return the correct fee recipient address", () => { + expect(validator.getFeeRecipientAddress()).toBe("fee-recipient-address-123"); + }); + + test("getForwardedFeeRecipientAddress should return the correct forwarded fee recipient address", () => { + expect(validator.getForwardedFeeRecipientAddress()).toBe(""); + }); + + test("getEffectiveBalance should return the correct effective balance", () => { + expect(validator.getEffectiveBalance()).toEqual({ + amount: "100", + asset: { network_id: Coinbase.networks.EthereumHoodi, asset_id: Coinbase.assets.Eth }, + }); + }); + + test("getBalance should return the correct balance", () => { + expect(validator.getBalance()).toEqual({ + amount: "200", + asset: { network_id: Coinbase.networks.EthereumHoodi, asset_id: Coinbase.assets.Eth }, + }); + }); +}); diff --git a/src/tests/wallet_address_fund_test.ts b/src/tests/wallet_address_fund_test.ts new file mode 100644 index 00000000..b7db396e --- /dev/null +++ b/src/tests/wallet_address_fund_test.ts @@ -0,0 +1,127 @@ +import { WalletAddress } from "../coinbase/address/wallet_address"; +import { FundOperation } from "../coinbase/fund_operation"; +import { FundQuote } from "../coinbase/fund_quote"; +import { PaginationResponse } from "../coinbase/types"; +import { newAddressModel } from "./utils"; +import { Decimal } from "decimal.js"; + +describe("WalletAddress Fund", () => { + let walletAddress: WalletAddress; + const walletId = "test-wallet-id"; + const addressId = "0x123abc..."; + + beforeEach(() => { + walletAddress = new WalletAddress(newAddressModel(walletId, addressId)); + + jest.spyOn(FundOperation, "create").mockResolvedValue({} as FundOperation); + jest.spyOn(FundQuote, "create").mockResolvedValue({} as FundQuote); + jest + .spyOn(FundOperation, "listFundOperations") + .mockResolvedValue({} as PaginationResponse); + }); + + afterEach(() => { + jest.restoreAllMocks(); + }); + + describe("#fund", () => { + it("should call FundOperation.create with correct parameters when passing in decimal amount", async () => { + const amount = new Decimal("1.0"); + const assetId = "eth"; + + await walletAddress.fund({ amount, assetId }); + + expect(FundOperation.create).toHaveBeenCalledWith( + walletId, + addressId, + amount, + assetId, + walletAddress.getNetworkId(), + ); + }); + it("should call FundOperation.create with correct parameters when passing in number amount", async () => { + const amount = 1; + const assetId = "eth"; + + await walletAddress.fund({ amount, assetId }); + + expect(FundOperation.create).toHaveBeenCalledWith( + walletId, + addressId, + new Decimal(amount), + assetId, + walletAddress.getNetworkId(), + ); + }); + it("should call FundOperation.create with correct parameters when passing in bigint amount", async () => { + const amount = BigInt(1); + const assetId = "eth"; + + await walletAddress.fund({ amount, assetId }); + + expect(FundOperation.create).toHaveBeenCalledWith( + walletId, + addressId, + new Decimal(amount.toString()), + assetId, + walletAddress.getNetworkId(), + ); + }); + }); + + describe("#quoteFund", () => { + it("should call FundQuote.create with correct parameters when passing in decimal amount", async () => { + const amount = new Decimal("1.0"); + const assetId = "eth"; + + await walletAddress.quoteFund({ amount, assetId }); + + expect(FundQuote.create).toHaveBeenCalledWith( + walletId, + addressId, + amount, + assetId, + walletAddress.getNetworkId(), + ); + }); + it("should call FundQuote.create with correct parameters when passing in number amount", async () => { + const amount = 1; + const assetId = "eth"; + + await walletAddress.quoteFund({ amount, assetId }); + + expect(FundQuote.create).toHaveBeenCalledWith( + walletId, + addressId, + new Decimal(amount), + assetId, + walletAddress.getNetworkId(), + ); + }); + it("should call FundQuote.create with correct parameters when passing in bigint amount", async () => { + const amount = BigInt(1); + const assetId = "eth"; + + await walletAddress.quoteFund({ amount, assetId }); + + expect(FundQuote.create).toHaveBeenCalledWith( + walletId, + addressId, + new Decimal(amount.toString()), + assetId, + walletAddress.getNetworkId(), + ); + }); + }); + + describe("#listFundOperations", () => { + it("should call listFundOperations with correct parameters", async () => { + await walletAddress.listFundOperations({ limit: 10, page: "test-page" }); + + expect(FundOperation.listFundOperations).toHaveBeenCalledWith(walletId, addressId, { + limit: 10, + page: "test-page", + }); + }); + }); +}); diff --git a/src/tests/wallet_address_test.ts b/src/tests/wallet_address_test.ts index 35056f8e..2ca065cc 100644 --- a/src/tests/wallet_address_test.ts +++ b/src/tests/wallet_address_test.ts @@ -1,36 +1,84 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import * as crypto from "crypto"; +import { randomUUID } from "crypto"; +import { AxiosError } from "axios"; import { ethers } from "ethers"; import { FaucetTransaction } from "../coinbase/faucet_transaction"; -import { Balance as BalanceModel, TransferList, Trade as TradeModel } from "../client"; +import { + Address as AddressModel, + Balance as BalanceModel, + FetchHistoricalStakingBalances200Response, + FetchStakingRewards200Response, + SmartContractType, + StakingContext as StakingContextModel, + StakingOperation as StakingOperationModel, + StakingOperationStatusEnum, + StakingRewardFormat, + StakingRewardStateEnum, + Trade as TradeModel, + TransferList, +} from "../client"; import Decimal from "decimal.js"; import { APIError, FaucetLimitReachedError } from "../coinbase/api_error"; import { Coinbase } from "../coinbase/coinbase"; -import { InternalError } from "../coinbase/errors"; +import { ArgumentError } from "../coinbase/errors"; import { - VALID_ADDRESS_BALANCE_LIST, - VALID_ADDRESS_MODEL, - VALID_TRANSFER_MODEL, - VALID_WALLET_MODEL, - generateRandomHash, - getAssetMock, addressesApiMock, assetsApiMock, + contractInvocationApiMock, + ERC1155_URI, + ERC20_NAME, + ERC20_SYMBOL, + ERC20_TOTAL_SUPPLY, + ERC721_BASE_URI, + ERC721_NAME, + ERC721_SYMBOL, + externalAddressApiMock, + generateRandomHash, + getAssetMock, + MINT_NFT_ABI, + MINT_NFT_ARGS, mockFn, mockReturnRejectedValue, mockReturnValue, newAddressModel, + smartContractApiMock, + stakeApiMock, tradeApiMock, transfersApiMock, + VALID_ADDRESS_BALANCE_LIST, + VALID_ADDRESS_MODEL, + VALID_COMPILED_CONTRACT_MODEL, + VALID_CONTRACT_INVOCATION_MODEL, + VALID_FAUCET_TRANSACTION_MODEL, + VALID_PAYLOAD_SIGNATURE_LIST, + VALID_PAYLOAD_SIGNATURE_MODEL, + VALID_SIGNED_CONTRACT_INVOCATION_MODEL, + VALID_SMART_CONTRACT_CUSTOM_MODEL, + VALID_SMART_CONTRACT_ERC1155_MODEL, + VALID_SMART_CONTRACT_ERC20_MODEL, + VALID_SMART_CONTRACT_ERC721_MODEL, + VALID_TRANSFER_MODEL, + VALID_WALLET_MODEL, walletsApiMock, + walletStakeApiMock, } from "./utils"; -import { ArgumentError } from "../coinbase/errors"; import { Transfer } from "../coinbase/transfer"; -import { TransactionStatus, TransferStatus } from "../coinbase/types"; +import { StakeOptionsMode, TransactionStatus } from "../coinbase/types"; import { Trade } from "../coinbase/trade"; import { Transaction } from "../coinbase/transaction"; import { WalletAddress } from "../coinbase/address/wallet_address"; import { Wallet } from "../coinbase/wallet"; +import { + ConsensusLayerExitOptionBuilder, + ExecutionLayerWithdrawalOptionsBuilder, + StakingOperation, +} from "../coinbase/staking_operation"; +import { StakingReward } from "../coinbase/staking_reward"; +import { StakingBalance } from "../coinbase/staking_balance"; +import { PayloadSignature } from "../coinbase/payload_signature"; +import { ContractInvocation } from "../coinbase/contract_invocation"; +import { SmartContract } from "../coinbase/smart_contract"; // Test suite for the WalletAddress class describe("WalletAddress", () => { @@ -40,10 +88,10 @@ describe("WalletAddress", () => { let key; beforeEach(() => { - Coinbase.apiClients.address = addressesApiMock; + Coinbase.apiClients.externalAddress = externalAddressApiMock; Coinbase.apiClients.asset = assetsApiMock; Coinbase.apiClients.asset.getAsset = getAssetMock(); - Coinbase.apiClients.address!.getAddressBalance = mockFn(request => { + Coinbase.apiClients.externalAddress.getExternalAddressBalance = mockFn(request => { const [, , asset_id] = request; balanceModel = { amount: "1000000000000000000", @@ -56,12 +104,9 @@ describe("WalletAddress", () => { }; return { data: balanceModel }; }); - Coinbase.apiClients.address!.listAddressBalances = mockFn(() => { + Coinbase.apiClients.externalAddress.listExternalAddressBalances = mockFn(() => { return { data: VALID_ADDRESS_BALANCE_LIST }; }); - Coinbase.apiClients.address!.requestFaucetFunds = mockFn(() => { - return { data: { transaction_hash: transactionHash } }; - }); }); beforeEach(() => { @@ -75,6 +120,11 @@ describe("WalletAddress", () => { expect(address).toBeInstanceOf(WalletAddress); }); + it("should initialize a new WalletAddress that can sign", () => { + expect(address).toBeInstanceOf(WalletAddress); + expect(address.canSign()).toEqual(true); + }); + it("should return the address ID", () => { expect(address.getId()).toBe(VALID_ADDRESS_MODEL.address_id); }); @@ -88,27 +138,29 @@ describe("WalletAddress", () => { expect(balances.get(Coinbase.assets.Eth)).toEqual(new Decimal(1)); expect(balances.get("usdc")).toEqual(new Decimal(5000)); expect(balances.get("weth")).toEqual(new Decimal(3)); - expect(Coinbase.apiClients.address!.listAddressBalances).toHaveBeenCalledWith( - address.getWalletId(), + expect(Coinbase.apiClients.externalAddress!.listExternalAddressBalances).toHaveBeenCalledWith( + address.getNetworkId(), address.getId(), ); - expect(Coinbase.apiClients.address!.listAddressBalances).toHaveBeenCalledTimes(1); + expect(Coinbase.apiClients.externalAddress!.listExternalAddressBalances).toHaveBeenCalledTimes( + 1, + ); }); it("should return the correct ETH balance", async () => { const ethBalance = await address.getBalance(Coinbase.assets.Eth); expect(ethBalance).toBeInstanceOf(Decimal); expect(ethBalance).toEqual(new Decimal(1)); - expect(Coinbase.apiClients.address!.getAddressBalance).toHaveBeenCalledWith( - address.getWalletId(), + expect(Coinbase.apiClients.externalAddress!.getExternalAddressBalance).toHaveBeenCalledWith( + address.getNetworkId(), address.getId(), Coinbase.assets.Eth, ); - expect(Coinbase.apiClients.address!.getAddressBalance).toHaveBeenCalledTimes(1); + expect(Coinbase.apiClients.externalAddress!.getExternalAddressBalance).toHaveBeenCalledTimes(1); }); it("should return 0 balance when the response is empty", async () => { - Coinbase.apiClients.address!.getAddressBalance = mockReturnValue(null); + Coinbase.apiClients.externalAddress!.getExternalAddressBalance = mockReturnValue(null); const ethBalance = await address.getBalance(Coinbase.assets.Eth); expect(ethBalance).toBeInstanceOf(Decimal); expect(ethBalance).toEqual(new Decimal(0)); @@ -119,12 +171,12 @@ describe("WalletAddress", () => { const ethBalance = await address.getBalance(assetId); expect(ethBalance).toBeInstanceOf(Decimal); expect(ethBalance).toEqual(new Decimal("1000000000")); - expect(Coinbase.apiClients.address!.getAddressBalance).toHaveBeenCalledWith( - address.getWalletId(), + expect(Coinbase.apiClients.externalAddress!.getExternalAddressBalance).toHaveBeenCalledWith( + address.getNetworkId(), address.getId(), Coinbase.assets.Eth, ); - expect(Coinbase.apiClients.address!.getAddressBalance).toHaveBeenCalledTimes(1); + expect(Coinbase.apiClients.externalAddress!.getExternalAddressBalance).toHaveBeenCalledTimes(1); }); it("should return the correct Wei balance", async () => { @@ -132,20 +184,24 @@ describe("WalletAddress", () => { const ethBalance = await address.getBalance(assetId); expect(ethBalance).toBeInstanceOf(Decimal); expect(ethBalance).toEqual(new Decimal("1000000000000000000")); - expect(Coinbase.apiClients.address!.getAddressBalance).toHaveBeenCalledWith( - address.getWalletId(), + expect(Coinbase.apiClients.externalAddress?.getExternalAddressBalance).toHaveBeenCalledWith( + address.getNetworkId(), address.getId(), Coinbase.assets.Eth, ); - expect(Coinbase.apiClients.address!.getAddressBalance).toHaveBeenCalledTimes(1); + expect(Coinbase.apiClients.externalAddress?.getExternalAddressBalance).toHaveBeenCalledTimes(1); }); it("should return an error for an unsupported asset", async () => { const getAddressBalance = mockReturnRejectedValue(new APIError("")); const assetId = "unsupported-asset"; - Coinbase.apiClients.address!.getAddressBalance = getAddressBalance; + Coinbase.apiClients.externalAddress!.getExternalAddressBalance = getAddressBalance; await expect(address.getBalance(assetId)).rejects.toThrow(APIError); - expect(getAddressBalance).toHaveBeenCalledWith(address.getWalletId(), address.getId(), assetId); + expect(getAddressBalance).toHaveBeenCalledWith( + address.getNetworkId(), + address.getId(), + assetId, + ); expect(getAddressBalance).toHaveBeenCalledTimes(1); }); @@ -153,47 +209,99 @@ describe("WalletAddress", () => { expect(address.getWalletId()).toBe(VALID_ADDRESS_MODEL.wallet_id); }); - it("should throw an InternalError when model is not provided", () => { + it("should throw an Error when model is not provided", () => { expect(() => new WalletAddress(null!, key as unknown as ethers.Wallet)).toThrow( `Address model cannot be empty`, ); }); - it("should request funds from the faucet and returns the faucet transaction", async () => { - const faucetTransaction = await address.faucet(); - expect(faucetTransaction).toBeInstanceOf(FaucetTransaction); - expect(faucetTransaction.getTransactionHash()).toBe(transactionHash); - expect(Coinbase.apiClients.address!.requestFaucetFunds).toHaveBeenCalledWith( - address.getWalletId(), - address.getId(), - ); - expect(Coinbase.apiClients.address!.requestFaucetFunds).toHaveBeenCalledTimes(1); - }); + describe("#faucet", () => { + let faucetTransaction: FaucetTransaction; - it("should throw an APIError when the request is unsuccessful", async () => { - Coinbase.apiClients.address!.requestFaucetFunds = mockReturnRejectedValue(new APIError("")); - await expect(address.faucet()).rejects.toThrow(APIError); - expect(Coinbase.apiClients.address!.requestFaucetFunds).toHaveBeenCalledWith( - address.getWalletId(), - address.getId(), - ); - expect(Coinbase.apiClients.address!.requestFaucetFunds).toHaveBeenCalledTimes(1); - }); + beforeEach(() => { + Coinbase.apiClients.externalAddress!.requestExternalFaucetFunds = mockReturnValue( + VALID_FAUCET_TRANSACTION_MODEL, + ); + }); - it("should throw a FaucetLimitReachedError when the faucet limit is reached", async () => { - Coinbase.apiClients.address!.requestFaucetFunds = mockReturnRejectedValue( - new FaucetLimitReachedError(""), - ); - await expect(address.faucet()).rejects.toThrow(FaucetLimitReachedError); - expect(Coinbase.apiClients.address!.requestFaucetFunds).toHaveBeenCalledTimes(1); - }); + it("returns the faucet transaction", async () => { + const faucetTransaction = await address.faucet(); - it("should throw an InternalError when the request fails unexpectedly", async () => { - Coinbase.apiClients.address!.requestFaucetFunds = mockReturnRejectedValue( - new InternalError(""), - ); - await expect(address.faucet()).rejects.toThrow(InternalError); - expect(Coinbase.apiClients.address!.requestFaucetFunds).toHaveBeenCalledTimes(1); + expect(faucetTransaction).toBeInstanceOf(FaucetTransaction); + + expect(faucetTransaction.getTransactionHash()).toBe( + VALID_FAUCET_TRANSACTION_MODEL.transaction!.transaction_hash, + ); + + expect(Coinbase.apiClients.externalAddress!.requestExternalFaucetFunds).toHaveBeenCalledWith( + address.getNetworkId(), + address.getId(), + undefined, + true, // Skip wait should be true. + ); + + expect(Coinbase.apiClients.externalAddress!.requestExternalFaucetFunds).toHaveBeenCalledTimes( + 1, + ); + }); + + it("returns the faucet transaction when specifying the asset ID", async () => { + const faucetTransaction = await address.faucet("usdc"); + + expect(faucetTransaction.getTransactionHash()).toBe( + VALID_FAUCET_TRANSACTION_MODEL.transaction!.transaction_hash, + ); + + expect(Coinbase.apiClients.externalAddress!.requestExternalFaucetFunds).toHaveBeenCalledWith( + address.getNetworkId(), + address.getId(), + "usdc", + true, // Skip wait should be true. + ); + + expect(Coinbase.apiClients.externalAddress!.requestExternalFaucetFunds).toHaveBeenCalledTimes( + 1, + ); + }); + + it("should throw an APIError when the request is unsuccessful", async () => { + Coinbase.apiClients.externalAddress!.requestExternalFaucetFunds = mockReturnRejectedValue( + new APIError(""), + ); + + await expect(address.faucet()).rejects.toThrow(APIError); + + expect(Coinbase.apiClients.externalAddress!.requestExternalFaucetFunds).toHaveBeenCalledWith( + address.getNetworkId(), + address.getId(), + undefined, + true, // Skip wait should be true. + ); + + expect(Coinbase.apiClients.externalAddress!.requestExternalFaucetFunds).toHaveBeenCalledTimes( + 1, + ); + }); + + it("should throw a FaucetLimitReachedError when the faucet limit is reached", async () => { + Coinbase.apiClients.externalAddress!.requestExternalFaucetFunds = mockReturnRejectedValue( + new FaucetLimitReachedError(""), + ); + await expect(address.faucet()).rejects.toThrow(FaucetLimitReachedError); + expect(Coinbase.apiClients.externalAddress!.requestExternalFaucetFunds).toHaveBeenCalledTimes( + 1, + ); + }); + + it("should throw an Error when the request fails unexpectedly", async () => { + Coinbase.apiClients.externalAddress!.requestExternalFaucetFunds = mockReturnRejectedValue( + new Error(""), + ); + await expect(address.faucet()).rejects.toThrow(Error); + expect(Coinbase.apiClients.externalAddress!.requestExternalFaucetFunds).toHaveBeenCalledTimes( + 1, + ); + }); }); it("should return the correct string representation", () => { @@ -202,20 +310,568 @@ describe("WalletAddress", () => { ); }); + describe("#setKey", () => { + it("should set the key successfully", () => { + key = ethers.Wallet.createRandom(); + const newAddress = new WalletAddress(VALID_ADDRESS_MODEL, undefined); + expect(() => { + newAddress.setKey(key); + }).not.toThrow(Error); + }); + it("should not set the key successfully", () => { + key = ethers.Wallet.createRandom(); + const newAddress = new WalletAddress(VALID_ADDRESS_MODEL, key); + expect(() => { + newAddress.setKey(key); + }).toThrow(Error); + }); + }); + + describe("#export", () => { + it("should get the private key if it is set", () => { + key = ethers.Wallet.createRandom(); + const newAddress = new WalletAddress(VALID_ADDRESS_MODEL, key); + expect(newAddress.export()).toEqual(key.privateKey); + }); + + it("should not get the private key if not set", () => { + const newAddress = new WalletAddress(VALID_ADDRESS_MODEL, undefined); + expect(() => { + newAddress.export(); + }).toThrow(Error); + }); + }); + + describe("#stakingOperation", () => { + key = ethers.Wallet.createRandom(); + const newAddress = newAddressModel("", randomUUID(), Coinbase.networks.EthereumHoodi); + const walletAddress = new WalletAddress(newAddress, key as unknown as ethers.Wallet); + const STAKING_OPERATION_MODEL: StakingOperationModel = { + id: randomUUID(), + network_id: Coinbase.networks.EthereumHoodi, + address_id: newAddress.address_id, + status: StakingOperationStatusEnum.Complete, + transactions: [ + { + from_address_id: newAddress.address_id, + network_id: Coinbase.networks.EthereumHoodi, + status: "pending", + unsigned_payload: + "7b2274797065223a22307832222c22636861696e4964223a22307834323638222c226e6f" + + "6e6365223a2230783137222c22746f223a22307861353534313664653564653631613061" + + "633161613839373061323830653034333838623164653462222c22676173223a22307833" + + "30643430222c226761735072696365223a6e756c6c2c226d61785072696f726974794665" + + "65506572476173223a223078323534306265343030222c226d6178466565506572476173" + + "223a223078326437313162383430222c2276616c7565223a223078356166333130376134" + + "303030222c22696e707574223a2230783361346236366631222c226163636573734c6973" + + "74223a5b5d2c2276223a22307830222c2272223a22307830222c2273223a22307830222c" + + "2279506172697479223a22307830222c2268617368223a22307839613034353830343332" + + "646630666334656139646164653561343836353433623831666239333833316430646239" + + "386263356436373834393339343866333432227d", + }, + ], + }; + + const STAKING_CONTEXT_MODEL: StakingContextModel = { + context: { + stakeable_balance: { + amount: "128000000000000000000", + asset: { + asset_id: Coinbase.assets.Eth, + network_id: Coinbase.networks.EthereumHoodi, + decimals: 18, + contract_address: "0x", + }, + }, + unstakeable_balance: { + amount: "2000000000000000000", + asset: { + asset_id: Coinbase.assets.Eth, + network_id: Coinbase.networks.EthereumHoodi, + decimals: 18, + contract_address: "0x", + }, + }, + pending_claimable_balance: { + amount: "1000000000000000000", + asset: { + asset_id: Coinbase.assets.Eth, + network_id: Coinbase.networks.EthereumHoodi, + decimals: 18, + contract_address: "0x", + }, + }, + claimable_balance: { + amount: "1000000000000000000", + asset: { + asset_id: Coinbase.assets.Eth, + network_id: Coinbase.networks.EthereumHoodi, + decimals: 18, + contract_address: "0x", + }, + }, + }, + }; + + const STAKING_REWARD_RESPONSE: FetchStakingRewards200Response = { + data: [ + { + address_id: newAddress.address_id, + date: "2024-05-01", + amount: "361", + state: StakingRewardStateEnum.Pending, + format: StakingRewardFormat.Usd, + usd_value: { + amount: "361", + conversion_price: "3000", + conversion_time: "2024-05-01T00:00:00Z", + }, + }, + { + address_id: newAddress.address_id, + date: "2024-05-02", + amount: "203", + state: StakingRewardStateEnum.Pending, + format: StakingRewardFormat.Usd, + usd_value: { + amount: "203", + conversion_price: "3000", + conversion_time: "2024-05-02T00:00:00Z", + }, + }, + { + address_id: newAddress.address_id, + date: "2024-05-03", + amount: "226", + state: StakingRewardStateEnum.Pending, + format: StakingRewardFormat.Usd, + usd_value: { + amount: "226", + conversion_price: "3000", + conversion_time: "2024-05-03T00:00:00Z", + }, + }, + ], + has_more: false, + next_page: "", + }; + + const HISTORICAL_STAKING_BALANCES_RESPONSE: FetchHistoricalStakingBalances200Response = { + data: [ + { + address: newAddress.address_id, + date: "2024-05-01", + bonded_stake: { + amount: "32000000000000000000", + asset: { + asset_id: Coinbase.assets.Eth, + network_id: Coinbase.networks.EthereumHoodi, + decimals: 18, + }, + }, + unbonded_balance: { + amount: "2000000000000000000", + asset: { + asset_id: Coinbase.assets.Eth, + network_id: Coinbase.networks.EthereumHoodi, + decimals: 18, + }, + }, + participant_type: "validator", + }, + { + address: newAddress.address_id, + date: "2024-05-02", + bonded_stake: { + amount: "34000000000000000000", + asset: { + asset_id: Coinbase.assets.Eth, + network_id: Coinbase.networks.EthereumHoodi, + decimals: 18, + }, + }, + unbonded_balance: { + amount: "3000000000000000000", + asset: { + asset_id: Coinbase.assets.Eth, + network_id: Coinbase.networks.EthereumHoodi, + decimals: 18, + }, + }, + participant_type: "validator", + }, + ], + has_more: false, + next_page: "", + }; + + beforeAll(() => { + Coinbase.apiClients.externalAddress = externalAddressApiMock; + Coinbase.apiClients.stake = stakeApiMock; + Coinbase.apiClients.walletStake = walletStakeApiMock; + Coinbase.apiClients.asset = assetsApiMock; + }); + + beforeEach(() => { + jest.clearAllMocks(); + STAKING_OPERATION_MODEL.wallet_id = newAddress.wallet_id; + }); + + describe("#createStake", () => { + it("should create a staking operation from the address", async () => { + Coinbase.apiClients.asset!.getAsset = getAssetMock(); + Coinbase.apiClients.stake!.getStakingContext = mockReturnValue(STAKING_CONTEXT_MODEL); + Coinbase.apiClients.walletStake!.createStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + Coinbase.apiClients.walletStake!.broadcastStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + STAKING_OPERATION_MODEL.status = StakingOperationStatusEnum.Complete; + Coinbase.apiClients.walletStake!.getStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + + const op = await walletAddress.createStake(0.001, Coinbase.assets.Eth); + + expect(op).toBeInstanceOf(StakingOperation); + }); + + describe("native eth staking", () => { + it("should successfully create an 0x01 stake operation", async () => { + Coinbase.apiClients.asset!.getAsset = getAssetMock(); + Coinbase.apiClients.stake!.getStakingContext = mockReturnValue(STAKING_CONTEXT_MODEL); + Coinbase.apiClients.walletStake!.createStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + Coinbase.apiClients.walletStake!.broadcastStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + STAKING_OPERATION_MODEL.status = StakingOperationStatusEnum.Complete; + Coinbase.apiClients.walletStake!.getStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + + const op = await walletAddress.createStake( + 32, + Coinbase.assets.Eth, + StakeOptionsMode.NATIVE, + { + withdrawal_credential_type: "0x01", + }, + ); + + expect(Coinbase.apiClients.walletStake!.createStakingOperation).toHaveBeenCalledWith( + walletAddress.getWalletId(), + walletAddress.getId(), + { + network_id: walletAddress.getNetworkId(), + asset_id: Coinbase.assets.Eth, + action: "stake", + options: { + mode: StakeOptionsMode.NATIVE, + amount: "32000000000000000000", + withdrawal_credential_type: "0x01", + }, + }, + ); + expect(op).toBeInstanceOf(StakingOperation); + }); + + it("should successfully create an 0x02 stake operation", async () => { + Coinbase.apiClients.asset!.getAsset = getAssetMock(); + Coinbase.apiClients.stake!.getStakingContext = mockReturnValue(STAKING_CONTEXT_MODEL); + Coinbase.apiClients.walletStake!.createStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + Coinbase.apiClients.walletStake!.broadcastStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + STAKING_OPERATION_MODEL.status = StakingOperationStatusEnum.Complete; + Coinbase.apiClients.walletStake!.getStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + + const op = await walletAddress.createStake( + 64, + Coinbase.assets.Eth, + StakeOptionsMode.NATIVE, + { + withdrawal_credential_type: "0x02", + }, + ); + + expect(Coinbase.apiClients.walletStake!.createStakingOperation).toHaveBeenCalledWith( + walletAddress.getWalletId(), + walletAddress.getId(), + { + network_id: walletAddress.getNetworkId(), + asset_id: Coinbase.assets.Eth, + action: "stake", + options: { + mode: StakeOptionsMode.NATIVE, + amount: "64000000000000000000", + withdrawal_credential_type: "0x02", + }, + }, + ); + expect(op).toBeInstanceOf(StakingOperation); + }); + + it("should create a staking operation from the address but in failed status", async () => { + Coinbase.apiClients.asset!.getAsset = getAssetMock(); + Coinbase.apiClients.stake!.getStakingContext = mockReturnValue(STAKING_CONTEXT_MODEL); + Coinbase.apiClients.walletStake!.createStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + Coinbase.apiClients.walletStake!.broadcastStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + STAKING_OPERATION_MODEL.status = StakingOperationStatusEnum.Failed; + Coinbase.apiClients.walletStake!.getStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + + const op = await walletAddress.createStake(0.001, Coinbase.assets.Eth); + + expect(op).toBeInstanceOf(StakingOperation); + expect(op.getStatus()).toEqual(StakingOperationStatusEnum.Failed); + }); + }); + + it("should create a staking operation from the address when broadcast returns empty transactions", async () => { + Coinbase.apiClients.asset!.getAsset = getAssetMock(); + Coinbase.apiClients.stake!.getStakingContext = mockReturnValue(STAKING_CONTEXT_MODEL); + Coinbase.apiClients.walletStake!.createStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + Coinbase.apiClients.walletStake!.broadcastStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + STAKING_OPERATION_MODEL.status = StakingOperationStatusEnum.Complete; + STAKING_OPERATION_MODEL.transactions = []; + Coinbase.apiClients.walletStake!.getStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + + const op = await walletAddress.createStake(0.001, Coinbase.assets.Eth); + + expect(op).toBeInstanceOf(StakingOperation); + }); + }); + + describe("#createUnstake", () => { + it("should create a staking operation from the address", async () => { + Coinbase.apiClients.asset!.getAsset = getAssetMock(); + Coinbase.apiClients.stake!.getStakingContext = mockReturnValue(STAKING_CONTEXT_MODEL); + Coinbase.apiClients.walletStake!.createStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + Coinbase.apiClients.walletStake!.broadcastStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + STAKING_OPERATION_MODEL.status = StakingOperationStatusEnum.Complete; + Coinbase.apiClients.walletStake!.getStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + + const op = await walletAddress.createUnstake(0.001, Coinbase.assets.Eth); + + expect(op).toBeInstanceOf(StakingOperation); + }); + + describe("with native eth consensus layer exits", () => { + it("should create a staking operation from the address", async () => { + Coinbase.apiClients.asset!.getAsset = getAssetMock(); + Coinbase.apiClients.walletStake!.createStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + Coinbase.apiClients.walletStake!.broadcastStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + STAKING_OPERATION_MODEL.status = StakingOperationStatusEnum.Complete; + Coinbase.apiClients.walletStake!.getStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + + const builder = new ConsensusLayerExitOptionBuilder(); + builder.addValidator("0x123"); + builder.addValidator("0x456"); + builder.addValidator("0x456"); + builder.addValidator("0x789"); + builder.addValidator("0x789"); + const options = await builder.build(); + + const op = await walletAddress.createUnstake( + 0.001, + Coinbase.assets.Eth, + StakeOptionsMode.NATIVE, + options, + ); + + expect(Coinbase.apiClients.walletStake!.createStakingOperation).toHaveBeenCalledWith( + walletAddress.getWalletId(), + walletAddress.getId(), + { + network_id: walletAddress.getNetworkId(), + asset_id: Coinbase.assets.Eth, + action: "unstake", + options: { + mode: StakeOptionsMode.NATIVE, + amount: "1000000000000000", // We let this extraneous amount to be passed through since it isn't used in the backend. + unstake_type: "consensus", + validator_pub_keys: "0x123,0x456,0x789", + }, + }, + ); + expect(op).toBeInstanceOf(StakingOperation); + }); + }); + + describe("with native eth execution layer withdrawals", () => { + it("should create a staking operation from the address", async () => { + Coinbase.apiClients.asset!.getAsset = getAssetMock(); + Coinbase.apiClients.walletStake!.createStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + Coinbase.apiClients.walletStake!.broadcastStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + STAKING_OPERATION_MODEL.status = StakingOperationStatusEnum.Complete; + Coinbase.apiClients.walletStake!.getStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + + const builder = new ExecutionLayerWithdrawalOptionsBuilder(walletAddress.getNetworkId()); + builder.addValidatorWithdrawal("0x123", 100); + builder.addValidatorWithdrawal("0x456", 200); + const options = await builder.build(); + + const op = await walletAddress.createUnstake( + 0.001, + Coinbase.assets.Eth, + StakeOptionsMode.NATIVE, + options, + ); + + expect(Coinbase.apiClients.walletStake!.createStakingOperation).toHaveBeenCalledWith( + walletAddress.getWalletId(), + walletAddress.getId(), + { + network_id: walletAddress.getNetworkId(), + asset_id: Coinbase.assets.Eth, + action: "unstake", + options: { + mode: StakeOptionsMode.NATIVE, + unstake_type: "execution", + amount: "1000000000000000", // We let this extraneous amount to be passed through since it isn't used in the backend. + validator_unstake_amounts: + '{"0x123":"100000000000000000000","0x456":"200000000000000000000"}', + }, + }, + ); + expect(op).toBeInstanceOf(StakingOperation); + }); + }); + }); + + describe("#createClaimStake", () => { + it("should create a staking operation from the address", async () => { + Coinbase.apiClients.asset!.getAsset = getAssetMock(); + Coinbase.apiClients.stake!.getStakingContext = mockReturnValue(STAKING_CONTEXT_MODEL); + Coinbase.apiClients.walletStake!.createStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + Coinbase.apiClients.walletStake!.broadcastStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + STAKING_OPERATION_MODEL.status = StakingOperationStatusEnum.Complete; + Coinbase.apiClients.walletStake!.getStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + + const op = await walletAddress.createClaimStake(0.001, Coinbase.assets.Eth); + + expect(op).toBeInstanceOf(StakingOperation); + }); + }); + + describe("#createValidatorConsolidation", () => { + it("should successfully create a validator consolidation operation", async () => { + Coinbase.apiClients.walletStake!.createStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + Coinbase.apiClients.walletStake!.broadcastStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + Coinbase.apiClients.walletStake!.getStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + + const op = await walletAddress.createValidatorConsolidation({ + source_validator_pubkey: "0xabc123", + target_validator_pubkey: "0xdef456", + }); + + expect(Coinbase.apiClients.walletStake!.createStakingOperation).toHaveBeenCalledWith( + walletAddress.getWalletId(), + walletAddress.getId(), + { + network_id: walletAddress.getNetworkId(), + asset_id: "eth", + action: "consolidate", + options: { + mode: "native", + amount: "0", + source_validator_pubkey: "0xabc123", + target_validator_pubkey: "0xdef456", + }, + }, + ); + + expect(op).toBeInstanceOf(StakingOperation); + }); + }); + + describe("#stakeableBalance", () => { + it("should return the stakeable balance successfully with default params", async () => { + Coinbase.apiClients.stake!.getStakingContext = mockReturnValue(STAKING_CONTEXT_MODEL); + const stakeableBalance = await walletAddress.stakeableBalance(Coinbase.assets.Eth); + expect(stakeableBalance).toEqual(new Decimal("128")); + }); + }); + + describe("#unstakeableBalance", () => { + it("should return the unstakeableBalance balance successfully with default params", async () => { + Coinbase.apiClients.stake!.getStakingContext = mockReturnValue(STAKING_CONTEXT_MODEL); + const stakeableBalance = await walletAddress.unstakeableBalance(Coinbase.assets.Eth); + expect(stakeableBalance).toEqual(new Decimal("2")); + }); + }); + + describe("#claimableBalance", () => { + it("should return the claimableBalance balance successfully with default params", async () => { + Coinbase.apiClients.stake!.getStakingContext = mockReturnValue(STAKING_CONTEXT_MODEL); + const stakeableBalance = await walletAddress.claimableBalance(Coinbase.assets.Eth); + expect(stakeableBalance).toEqual(new Decimal("1")); + }); + }); + + describe("#stakingRewards", () => { + it("should successfully return staking rewards", async () => { + Coinbase.apiClients.stake!.fetchStakingRewards = mockReturnValue(STAKING_REWARD_RESPONSE); + Coinbase.apiClients.asset!.getAsset = getAssetMock(); + const response = await walletAddress.stakingRewards(Coinbase.assets.Eth); + expect(response).toBeInstanceOf(Array); + }); + }); + + describe("#historicalStakingBalances", () => { + it("should successfully return historical staking balances", async () => { + Coinbase.apiClients.stake!.fetchHistoricalStakingBalances = mockReturnValue( + HISTORICAL_STAKING_BALANCES_RESPONSE, + ); + Coinbase.apiClients.asset!.getAsset = getAssetMock(); + const response = await walletAddress.historicalStakingBalances(Coinbase.assets.Eth); + expect(response).toBeInstanceOf(Array); + expect(response.length).toEqual(2); + expect(response[0].bondedStake().amount).toEqual(new Decimal("32")); + expect(response[0].bondedStake().asset?.assetId).toEqual(Coinbase.assets.Eth); + expect(response[0].bondedStake().asset?.decimals).toEqual(18); + expect(response[0].bondedStake().asset?.networkId).toEqual(Coinbase.networks.EthereumHoodi); + expect(response[0].unbondedBalance().amount).toEqual(new Decimal("2")); + expect(response[0].unbondedBalance().asset?.assetId).toEqual(Coinbase.assets.Eth); + expect(response[0].unbondedBalance().asset?.decimals).toEqual(18); + expect(response[0].unbondedBalance().asset?.networkId).toEqual( + Coinbase.networks.EthereumHoodi, + ); + }); + }); + }); + describe("#createTransfer", () => { - let weiAmount, destination, intervalSeconds, timeoutSeconds; + let weiAmount, destination; let walletId, id; beforeEach(() => { weiAmount = new Decimal("500000000000000000"); destination = new WalletAddress(VALID_ADDRESS_MODEL, key as unknown as ethers.Wallet); - intervalSeconds = 0.2; - timeoutSeconds = 10; walletId = crypto.randomUUID(); id = crypto.randomUUID(); + Coinbase.apiClients.externalAddress = externalAddressApiMock; Coinbase.apiClients.asset = assetsApiMock; Coinbase.apiClients.asset.getAsset = getAssetMock(); - Coinbase.apiClients.address!.getAddressBalance = mockFn((...request) => { + Coinbase.apiClients.externalAddress.getExternalAddressBalance = mockFn((...request) => { const [, , asset_id] = request; balanceModel = { amount: "1000000000000000000", @@ -230,58 +886,154 @@ describe("WalletAddress", () => { }); Coinbase.apiClients.transfer = transfersApiMock; + Coinbase.useServerSigner = false; }); - it("should successfully create and complete a transfer", async () => { + it("should successfully create the transfer", async () => { Coinbase.apiClients.transfer!.createTransfer = mockReturnValue(VALID_TRANSFER_MODEL); Coinbase.apiClients.transfer!.broadcastTransfer = mockReturnValue({ transaction_hash: "0x6c087c1676e8269dd81e0777244584d0cbfd39b6997b3477242a008fa9349e11", ...VALID_TRANSFER_MODEL, }); - Coinbase.apiClients.transfer!.getTransfer = mockReturnValue({ - ...VALID_TRANSFER_MODEL, - status: TransferStatus.COMPLETE, - }); - await address.createTransfer({ + const transfer = await address.createTransfer({ amount: weiAmount, assetId: Coinbase.assets.Wei, destination, - timeoutSeconds, - intervalSeconds, }); expect(Coinbase.apiClients.transfer!.createTransfer).toHaveBeenCalledTimes(1); expect(Coinbase.apiClients.transfer!.broadcastTransfer).toHaveBeenCalledTimes(1); - expect(Coinbase.apiClients.transfer!.getTransfer).toHaveBeenCalledTimes(1); + + expect(transfer).toBeInstanceOf(Transfer); + expect(transfer.getId()).toBe(VALID_TRANSFER_MODEL.transfer_id); }); - it("should throw an APIError if the createTransfer API call fails", async () => { - Coinbase.apiClients.transfer!.createTransfer = mockReturnRejectedValue( - new APIError("Failed to create transfer"), - ); - await expect( - address.createTransfer({ - amount: weiAmount, - assetId: Coinbase.assets.Wei, - destination, - timeoutSeconds, - intervalSeconds, + it("should default skipBatching to false", async () => { + Coinbase.apiClients.transfer!.createTransfer = mockReturnValue(VALID_TRANSFER_MODEL); + Coinbase.apiClients.transfer!.broadcastTransfer = mockReturnValue({ + transaction_hash: "0x6c087c1676e8269dd81e0777244584d0cbfd39b6997b3477242a008fa9349e11", + ...VALID_TRANSFER_MODEL, + }); + + await address.createTransfer({ + amount: weiAmount, + assetId: Coinbase.assets.Wei, + destination, + }); + + expect(Coinbase.apiClients.transfer!.createTransfer).toHaveBeenCalledWith( + address.getWalletId(), + address.getId(), + expect.objectContaining({ + skip_batching: false, }), - ).rejects.toThrow(APIError); + ); }); - it("should throw an InternalError if the address key is not provided", async () => { - const addressWithoutKey = new WalletAddress(VALID_ADDRESS_MODEL, null!); - await expect( - addressWithoutKey.createTransfer({ + it("should allow skipBatching to be set to true", async () => { + Coinbase.apiClients.transfer!.createTransfer = mockReturnValue(VALID_TRANSFER_MODEL); + Coinbase.apiClients.transfer!.broadcastTransfer = mockReturnValue({ + transaction_hash: "0x6c087c1676e8269dd81e0777244584d0cbfd39b6997b3477242a008fa9349e11", + ...VALID_TRANSFER_MODEL, + }); + + await address.createTransfer({ + amount: weiAmount, + assetId: Coinbase.assets.Wei, + destination, + gasless: true, + skipBatching: true, + }); + + expect(Coinbase.apiClients.transfer!.createTransfer).toHaveBeenCalledWith( + address.getWalletId(), + address.getId(), + expect.objectContaining({ + skip_batching: true, + }), + ); + }); + + it("should throw an ArgumentError if skipBatching is true but gasless is false", async () => { + await expect( + address.createTransfer({ + amount: weiAmount, + assetId: Coinbase.assets.Wei, + destination, + skipBatching: true, + }), + ).rejects.toThrow(ArgumentError); + }); + + it("should successfully construct createTransfer request when using a large number that causes scientific notation", async () => { + Coinbase.apiClients.transfer!.createTransfer = mockReturnValue(VALID_TRANSFER_MODEL); + Coinbase.apiClients.transfer!.broadcastTransfer = mockReturnValue({ + transaction_hash: "0x6c087c1676e8269dd81e0777244584d0cbfd39b6997b3477242a008fa9349e11", + ...VALID_TRANSFER_MODEL, + }); + Coinbase.apiClients.externalAddress!.getExternalAddressBalance = mockFn(request => { + const [, , asset_id] = request; + balanceModel = { + amount: "10000000000000000000000", + asset: { + asset_id, + network_id: Coinbase.networks.BaseSepolia, + decimals: 18, + contract_address: "0x", + }, + }; + return { data: balanceModel }; + }); + + // construct amount of 1000 with 18 decimal places which is large enough to cause scientific notation + const transfer = await address.createTransfer({ + amount: new Decimal("1000000000000000000000"), + assetId: Coinbase.assets.Wei, + destination, + }); + + expect(Coinbase.apiClients.transfer!.broadcastTransfer).toHaveBeenCalledTimes(1); + expect(Coinbase.apiClients.transfer!.createTransfer).toHaveBeenCalledTimes(1); + expect(Coinbase.apiClients.transfer!.createTransfer).toHaveBeenCalledWith( + address.getWalletId(), + address.getId(), + { + amount: "1000000000000000000000", + asset_id: Coinbase.assets.Eth, + destination: destination.getId(), + gasless: false, + network_id: Coinbase.networks.BaseSepolia, + skip_batching: false, + }, + ); + + expect(transfer).toBeInstanceOf(Transfer); + expect(transfer.getId()).toBe(VALID_TRANSFER_MODEL.transfer_id); + }); + + it("should throw an APIError if the createTransfer API call fails", async () => { + Coinbase.apiClients.transfer!.createTransfer = mockReturnRejectedValue( + new APIError("Failed to create transfer"), + ); + await expect( + address.createTransfer({ amount: weiAmount, assetId: Coinbase.assets.Wei, destination, - timeoutSeconds, - intervalSeconds, }), - ).rejects.toThrow(InternalError); + ).rejects.toThrow(APIError); + }); + + it("should throw an Error if the address key is not provided", async () => { + const addressWithoutKey = new WalletAddress(VALID_ADDRESS_MODEL, null!); + await expect( + addressWithoutKey.createTransfer({ + amount: weiAmount, + assetId: Coinbase.assets.Wei, + destination, + }), + ).rejects.toThrow(Error); }); it("should throw an ArgumentError if the Wallet Network ID does not match the Address Network ID", async () => { @@ -306,8 +1058,6 @@ describe("WalletAddress", () => { amount: weiAmount, assetId: Coinbase.assets.Wei, destination: invalidDestination, - timeoutSeconds, - intervalSeconds, }), ).rejects.toThrow(ArgumentError); }); @@ -322,8 +1072,6 @@ describe("WalletAddress", () => { amount: weiAmount, assetId: Coinbase.assets.Wei, destination: invalidDestination, - timeoutSeconds, - intervalSeconds, }), ).rejects.toThrow(ArgumentError); }); @@ -338,36 +1086,10 @@ describe("WalletAddress", () => { amount: weiAmount, assetId: Coinbase.assets.Wei, destination, - timeoutSeconds, - intervalSeconds, }), ).rejects.toThrow(APIError); }); - it("should throw an Error if the transfer times out", async () => { - Coinbase.apiClients.transfer!.createTransfer = mockReturnValue(VALID_TRANSFER_MODEL); - Coinbase.apiClients.transfer!.broadcastTransfer = mockReturnValue({ - transaction_hash: "0x6c087c1676e8269dd81e0777244584d0cbfd39b6997b3477242a008fa9349e11", - ...VALID_TRANSFER_MODEL, - }); - Coinbase.apiClients.transfer!.getTransfer = mockReturnValue({ - ...VALID_TRANSFER_MODEL, - status: TransferStatus.BROADCAST, - }); - intervalSeconds = 0.000002; - timeoutSeconds = 0.000002; - - await expect( - address.createTransfer({ - amount: weiAmount, - assetId: Coinbase.assets.Wei, - destination, - timeoutSeconds, - intervalSeconds, - }), - ).rejects.toThrow("Transfer timed out"); - }); - it("should throw an ArgumentError if there are insufficient funds", async () => { const insufficientAmount = new Decimal("10000000000000000000"); await expect( @@ -375,30 +1097,21 @@ describe("WalletAddress", () => { amount: insufficientAmount, assetId: Coinbase.assets.Wei, destination, - timeoutSeconds, - intervalSeconds, }), ).rejects.toThrow(ArgumentError); }); - it("should successfully create and complete a transfer when using server signer", async () => { + it("should successfully create a transfer when using server signer", async () => { Coinbase.useServerSigner = true; Coinbase.apiClients.transfer!.createTransfer = mockReturnValue(VALID_TRANSFER_MODEL); - Coinbase.apiClients.transfer!.getTransfer = mockReturnValue({ - ...VALID_TRANSFER_MODEL, - status: TransferStatus.COMPLETE, - }); await address.createTransfer({ amount: weiAmount, assetId: Coinbase.assets.Wei, destination, - timeoutSeconds, - intervalSeconds, }); expect(Coinbase.apiClients.transfer!.createTransfer).toHaveBeenCalledTimes(1); - expect(Coinbase.apiClients.transfer!.getTransfer).toHaveBeenCalledTimes(1); }); afterEach(() => { @@ -406,7 +1119,7 @@ describe("WalletAddress", () => { }); }); - describe("#getTransfers", () => { + describe("#listTransfers", () => { beforeEach(() => { jest.clearAllMocks(); const pages = ["abc", "def"]; @@ -416,33 +1129,21 @@ describe("WalletAddress", () => { next_page: "", total_count: 0, } as TransferList; - Coinbase.apiClients.transfer!.listTransfers = mockFn((walletId, addressId) => { - VALID_TRANSFER_MODEL.wallet_id = walletId; - VALID_TRANSFER_MODEL.address_id = addressId; - response.next_page = pages.shift() as string; - response.data = [VALID_TRANSFER_MODEL]; - response.has_more = !!response.next_page; - return { data: response }; - }); + Coinbase.apiClients.transfer!.listTransfers = mockReturnValue(response); }); it("should return the list of transfers", async () => { - const transfers = await address.listTransfers(); - expect(transfers).toHaveLength(3); + const paginationResponse = await address.listTransfers(); + const transfers = paginationResponse.data; + expect(transfers).toHaveLength(1); expect(transfers[0]).toBeInstanceOf(Transfer); - expect(Coinbase.apiClients.transfer!.listTransfers).toHaveBeenCalledTimes(3); + expect(Coinbase.apiClients.transfer!.listTransfers).toHaveBeenCalledTimes(1); expect(Coinbase.apiClients.transfer!.listTransfers).toHaveBeenCalledWith( address.getWalletId(), address.getId(), 100, undefined, ); - expect(Coinbase.apiClients.transfer!.listTransfers).toHaveBeenCalledWith( - address.getWalletId(), - address.getId(), - 100, - "abc", - ); }); it("should raise an APIError when the API call fails", async () => { @@ -453,7 +1154,7 @@ describe("WalletAddress", () => { }); }); - describe("#trade", () => { + describe("#createTrade", () => { let addressId; let toAddressId; let ethBalanceResponse; @@ -501,8 +1202,19 @@ describe("WalletAddress", () => { }; tradeId = crypto.randomUUID(); transactionHash = "0xdeadbeef"; - unsignedPayload = "unsigned_payload"; - signedPayload = "signed_payload"; + unsignedPayload = + "7b2274797065223a22307832222c22636861696e4964223a2230783134613334222c226e6f6e63" + + "65223a22307830222c22746f223a22307834643965346633663464316138623566346637623166" + + "356235633762386436623262336231623062222c22676173223a22307835323038222c22676173" + + "5072696365223a6e756c6c2c226d61785072696f72697479466565506572476173223a223078" + + "3539363832663030222c226d6178466565506572476173223a2230783539363832663030222c22" + + "76616c7565223a2230783536626337356532643633313030303030222c22696e707574223a22" + + "3078222c226163636573734c697374223a5b5d2c2276223a22307830222c2272223a2230783022" + + "2c2273223a22307830222c2279506172697479223a22307830222c2268617368223a2230783664" + + "633334306534643663323633653363396561396135656438646561346332383966613861363966" + + "3031653635393462333732386230386138323335333433227d"; + signedPayload = + "02f87683014a34808459682f008459682f00825208944d9e4f3f4d1a8b5f4f7b1f5b5c7b8d6b2b3b1b0b89056bc75e2d6310000080c001a07ae1f4655628ac1b226d60a6243aed786a2d36241ffc0f306159674755f4bd9ca050cd207fdfa6944e2b165775e2ca625b474d1eb40fda0f03f4ca9e286eae3cbe"; broadcastTradeRequest = { signed_payload: signedPayload }; transaction = { sign: jest.fn().mockReturnValue(signedPayload) } as unknown as Transaction; approveTransaction = null; @@ -512,19 +1224,23 @@ describe("WalletAddress", () => { approve_transaction: approveTransaction, } as unknown as Trade; transactionModel = { + trade_id: tradeId, status: "pending", unsigned_payload: unsignedPayload, } as unknown as TradeModel; tradeModel = { + trade_id: tradeId, transaction: transactionModel, address_id: addressId, } as unknown as TradeModel; broadcastedTransactionModel = { + trade_id: tradeId, status: "broadcast", unsigned_payload: unsignedPayload, signed_payload: signedPayload, } as unknown as TradeModel; broadcastedTradeModel = { + id: tradeId, transaction: broadcastedTransactionModel, address_id: addressId, } as unknown as TradeModel; @@ -538,7 +1254,7 @@ describe("WalletAddress", () => { balanceResponse = ethBalanceResponse; destination = toAddressId; amount = new Decimal(0.5); - useServerSigner = false; + Coinbase.useServerSigner = false; }); describe("when the trade is successful", () => { @@ -546,15 +1262,21 @@ describe("WalletAddress", () => { jest.clearAllMocks(); Coinbase.apiClients.asset = assetsApiMock; Coinbase.apiClients.trade = tradeApiMock; + Coinbase.apiClients.address = addressesApiMock; Coinbase.apiClients.address!.getAddressBalance = mockReturnValue(balanceResponse); - Coinbase.apiClients.trade!.createTrade = mockReturnValue(tradeModel); Coinbase.apiClients.asset.getAsset = getAssetMock(); - jest.spyOn(Transaction.prototype, "sign").mockReturnValue(signedPayload); + Coinbase.apiClients.trade!.createTrade = mockReturnValue(tradeModel); + Coinbase.apiClients.trade!.broadcastTrade = mockReturnValue(broadcastedTradeModel); + + jest.spyOn(key, "signTransaction").mockReturnValue(signedPayload); }); it("should return the broadcasted trade", async () => { - Coinbase.apiClients.trade!.broadcastTrade = mockReturnValue(broadcastedTradeModel); - const result = await address.createTrade(amount, fromAssetId, toAssetId); + const result = await address.createTrade({ + amount: amount, + fromAssetId: fromAssetId, + toAssetId: toAssetId, + }); const transaction = result.getTransaction(); expect(transaction.getSignedPayload()).toEqual(signedPayload); expect(transaction.getStatus()).toEqual(TransactionStatus.BROADCAST); @@ -568,13 +1290,7 @@ describe("WalletAddress", () => { to_asset_id: toAssetId, }, ); - }); - - it("should sign the transaction with the key", async () => { - Coinbase.apiClients.trade!.broadcastTrade = mockReturnValue(broadcastedTradeModel); - const result = await address.createTrade(amount, fromAssetId, toAssetId); - const transaction = result.getTransaction(); - expect(transaction.sign).toHaveBeenCalledWith(key); + expect(Coinbase.apiClients.trade!.broadcastTrade).toHaveBeenCalledTimes(1); }); describe("when the asset is Gwei", () => { @@ -584,9 +1300,12 @@ describe("WalletAddress", () => { amount = new Decimal(500000000); }); - it("should return the broadcast trade", async () => { - Coinbase.apiClients.trade!.broadcastTrade = mockReturnValue(broadcastedTradeModel); - await address.createTrade(amount, fromAssetId, toAssetId); + it("should return the broadcasted trade", async () => { + await address.createTrade({ + amount: amount, + fromAssetId: fromAssetId, + toAssetId: toAssetId, + }); expect(Coinbase.apiClients.trade!.createTrade).toHaveBeenCalledWith( address.getWalletId(), address.getId(), @@ -596,13 +1315,7 @@ describe("WalletAddress", () => { to_asset_id: toAssetId, }, ); - }); - - it("should sign the transaction with the address key", async () => { - Coinbase.apiClients.trade!.broadcastTrade = mockReturnValue(broadcastedTradeModel); - const result = await address.createTrade(amount, fromAssetId, toAssetId); - const transaction = result.getTransaction(); - expect(transaction.sign).toHaveBeenCalledWith(key); + expect(Coinbase.apiClients.trade!.broadcastTrade).toHaveBeenCalledTimes(1); }); }); @@ -613,9 +1326,12 @@ describe("WalletAddress", () => { amount = new Decimal(0.5); }); - it("should return the broadcast trade", async () => { - Coinbase.apiClients.trade!.broadcastTrade = mockReturnValue(broadcastedTradeModel); - await address.createTrade(amount, fromAssetId, toAssetId); + it("should return the broadcasted trade", async () => { + await address.createTrade({ + amount: amount, + fromAssetId: fromAssetId, + toAssetId: toAssetId, + }); expect(Coinbase.apiClients.trade!.createTrade).toHaveBeenCalledWith( address.getWalletId(), address.getId(), @@ -625,13 +1341,7 @@ describe("WalletAddress", () => { to_asset_id: toAssetId, }, ); - }); - - it("should sign the transaction with the address key", async () => { - Coinbase.apiClients.trade!.broadcastTrade = mockReturnValue(broadcastedTradeModel); - const result = await address.createTrade(amount, fromAssetId, toAssetId); - const transaction = result.getTransaction(); - expect(transaction.sign).toHaveBeenCalledWith(key); + expect(Coinbase.apiClients.trade!.broadcastTrade).toHaveBeenCalledTimes(1); }); }); @@ -641,12 +1351,16 @@ describe("WalletAddress", () => { normalizedFromAssetId = "usdc"; amount = new Decimal(5); balanceResponse = { amount: "5000000", asset: { asset_id: "usdc", decimals: 6 } }; - Coinbase.apiClients.address!.getAddressBalance = mockReturnValue(balanceResponse); + Coinbase.apiClients.externalAddress!.getExternalAddressBalance = + mockReturnValue(balanceResponse); }); - it("should return the broadcast trade", async () => { - Coinbase.apiClients.trade!.broadcastTrade = mockReturnValue(broadcastedTradeModel); - await address.createTrade(amount, fromAssetId, toAssetId); + it("should return the broadcasted trade", async () => { + await address.createTrade({ + amount: amount, + fromAssetId: fromAssetId, + toAssetId: toAssetId, + }); expect(Coinbase.apiClients.trade!.createTrade).toHaveBeenCalledWith( address.getWalletId(), address.getId(), @@ -656,54 +1370,62 @@ describe("WalletAddress", () => { to_asset_id: toAssetId, }, ); - }); - - it("should sign the transaction with the address key", async () => { - Coinbase.apiClients.trade!.broadcastTrade = mockReturnValue(broadcastedTradeModel); - const result = await address.createTrade(amount, fromAssetId, toAssetId); - const transaction = result.getTransaction(); - expect(transaction.sign).toHaveBeenCalledWith(key); + expect(Coinbase.apiClients.trade!.broadcastTrade).toHaveBeenCalledTimes(1); }); }); + }); - describe("when there is an approve transaction", () => { - let approveSignedPayload; + describe("when using server signer", () => { + beforeEach(() => { + jest.clearAllMocks(); + Coinbase.apiClients.asset = assetsApiMock; + Coinbase.apiClients.trade = tradeApiMock; + Coinbase.apiClients.address!.getAddressBalance = mockReturnValue(balanceResponse); + Coinbase.apiClients.trade!.createTrade = mockReturnValue(tradeModel); + Coinbase.apiClients.asset.getAsset = getAssetMock(); + Coinbase.useServerSigner = true; + }); - beforeEach(() => { - approveSignedPayload = "approve_signed_payload"; - approveTransaction = { sign: jest.fn().mockReturnValue(approveSignedPayload) }; - broadcastedTradeModel = { - ...broadcastedTradeModel, - approve_transaction: approveTransaction, - }; + it("should successfully create a trade", async () => { + const trade = await address.createTrade({ + amount: amount, + fromAssetId: fromAssetId, + toAssetId: toAssetId, }); - it("should sign the trade transaction with the address key", async () => { - const trade = await address.createTrade(amount, fromAssetId, toAssetId); - const transaction = trade.getTransaction(); - expect(transaction.sign).toHaveBeenCalledWith(key); - }); + expect(Coinbase.apiClients.trade!.createTrade).toHaveBeenCalledTimes(1); + + expect(trade).toBeInstanceOf(Trade); + expect(trade.getId()).toBe(tradeId); }); }); describe("when the address cannot sign", () => { it("should raise an Error", async () => { const newAddress = new WalletAddress(VALID_ADDRESS_MODEL, null!); - await expect(newAddress.createTrade(new Decimal(100), "eth", "usdc")).rejects.toThrow( - Error, - ); + await expect( + newAddress.createTrade({ + amount: new Decimal(100), + fromAssetId: "eth", + toAssetId: "usdc", + }), + ).rejects.toThrow(Error); }); }); describe("when the to fromAssetId is unsupported", () => { it("should raise an ArgumentError", async () => { - await expect(address.createTrade(new Decimal(100), "XYZ", "eth")).rejects.toThrow(Error); + await expect( + address.createTrade({ amount: new Decimal(100), fromAssetId: "XYZ", toAssetId: "eth" }), + ).rejects.toThrow(Error); }); }); describe("when the to toAssetId is unsupported", () => { it("should raise an ArgumentError", async () => { - await expect(address.createTrade(new Decimal(100), "eth", "XYZ")).rejects.toThrow(Error); + await expect( + address.createTrade({ amount: new Decimal(100), fromAssetId: "eth", toAssetId: "XYZ" }), + ).rejects.toThrow(Error); }); }); @@ -713,25 +1435,1718 @@ describe("WalletAddress", () => { Coinbase.apiClients.address!.getAddressBalance = mockReturnValue({ amount: "0" }); }); it("should raise an Error", async () => { - await expect(address.createTrade(new Decimal(100), "eth", "usdc")).rejects.toThrow(Error); + await expect( + address.createTrade({ amount: new Decimal(100), fromAssetId: "eth", toAssetId: "usdc" }), + ).rejects.toThrow(Error); + }); + }); + }); + + describe("#invokeContract", () => { + const key = ethers.Wallet.createRandom(); + let addressModel: AddressModel; + let walletAddress: WalletAddress; + const unsignedPayload = VALID_CONTRACT_INVOCATION_MODEL.transaction.unsigned_payload; + let expectedSignedPayload: string; + + beforeAll(() => { + Coinbase.apiClients.contractInvocation = contractInvocationApiMock; + }); + + beforeEach(() => { + jest.clearAllMocks(); + + addressModel = newAddressModel(randomUUID(), randomUUID(), Coinbase.networks.BaseSepolia); + }); + + describe("when not using a server-signer", () => { + beforeEach(async () => { + Coinbase.useServerSigner = false; + + walletAddress = new WalletAddress(addressModel, key as unknown as ethers.Wallet); + + const tx = new Transaction(VALID_CONTRACT_INVOCATION_MODEL.transaction); + expectedSignedPayload = await tx.sign(key as unknown as ethers.Wallet); + }); + + describe("when it is successful", () => { + let contractInvocation; + + beforeEach(async () => { + Coinbase.apiClients.contractInvocation!.createContractInvocation = mockReturnValue({ + ...VALID_CONTRACT_INVOCATION_MODEL, + address_id: walletAddress.getId(), + wallet_id: walletAddress.getWalletId(), + }); + + Coinbase.apiClients.contractInvocation!.broadcastContractInvocation = mockReturnValue({ + ...VALID_SIGNED_CONTRACT_INVOCATION_MODEL, + address_id: walletAddress.getId(), + wallet_id: walletAddress.getWalletId(), + }); + + contractInvocation = await walletAddress.invokeContract({ + abi: MINT_NFT_ABI, + args: MINT_NFT_ARGS, + method: VALID_CONTRACT_INVOCATION_MODEL.method, + contractAddress: VALID_CONTRACT_INVOCATION_MODEL.contract_address, + }); + }); + + it("returns a contract invocation", async () => { + expect(contractInvocation).toBeInstanceOf(ContractInvocation); + expect(contractInvocation.getId()).toBe( + VALID_CONTRACT_INVOCATION_MODEL.contract_invocation_id, + ); + }); + + it("creates the contract invocation", async () => { + expect( + Coinbase.apiClients.contractInvocation!.createContractInvocation, + ).toHaveBeenCalledWith(walletAddress.getWalletId(), walletAddress.getId(), { + abi: VALID_CONTRACT_INVOCATION_MODEL.abi, + args: VALID_CONTRACT_INVOCATION_MODEL.args, + method: VALID_CONTRACT_INVOCATION_MODEL.method, + contract_address: VALID_CONTRACT_INVOCATION_MODEL.contract_address, + }); + expect( + Coinbase.apiClients.contractInvocation!.createContractInvocation, + ).toHaveBeenCalledTimes(1); + }); + + it("broadcasts the contract invocation", async () => { + expect( + Coinbase.apiClients.contractInvocation!.broadcastContractInvocation, + ).toHaveBeenCalledWith( + walletAddress.getWalletId(), + walletAddress.getId(), + VALID_CONTRACT_INVOCATION_MODEL.contract_invocation_id, + { + signed_payload: expectedSignedPayload, + }, + ); + + expect( + Coinbase.apiClients.contractInvocation!.broadcastContractInvocation, + ).toHaveBeenCalledTimes(1); + }); + }); + + describe("when it is successful invoking a payable contract method", () => { + let contractInvocation; + const amount = new Decimal("1000"); + const balanceResponse = { amount: "5000000", asset: { asset_id: "eth", decimals: 18 } }; + + beforeEach(async () => { + Coinbase.apiClients.contractInvocation!.createContractInvocation = mockReturnValue({ + ...VALID_CONTRACT_INVOCATION_MODEL, + address_id: walletAddress.getId(), + wallet_id: walletAddress.getWalletId(), + amount, + }); + + Coinbase.apiClients.contractInvocation!.broadcastContractInvocation = mockReturnValue({ + ...VALID_SIGNED_CONTRACT_INVOCATION_MODEL, + address_id: walletAddress.getId(), + wallet_id: walletAddress.getWalletId(), + amount, + }); + + Coinbase.apiClients.externalAddress!.getExternalAddressBalance = + mockReturnValue(balanceResponse); + + contractInvocation = await walletAddress.invokeContract({ + abi: MINT_NFT_ABI, + args: MINT_NFT_ARGS, + method: VALID_CONTRACT_INVOCATION_MODEL.method, + contractAddress: VALID_CONTRACT_INVOCATION_MODEL.contract_address, + amount, + assetId: Coinbase.assets.Wei, + }); + }); + + it("returns a contract invocation", async () => { + expect(contractInvocation).toBeInstanceOf(ContractInvocation); + expect(contractInvocation.getId()).toBe( + VALID_CONTRACT_INVOCATION_MODEL.contract_invocation_id, + ); + expect(contractInvocation.getAmount().toString()).toBe(amount.toString()); + }); + + it("creates the contract invocation", async () => { + expect( + Coinbase.apiClients.contractInvocation!.createContractInvocation, + ).toHaveBeenCalledWith(walletAddress.getWalletId(), walletAddress.getId(), { + abi: VALID_CONTRACT_INVOCATION_MODEL.abi, + args: VALID_CONTRACT_INVOCATION_MODEL.args, + method: VALID_CONTRACT_INVOCATION_MODEL.method, + contract_address: VALID_CONTRACT_INVOCATION_MODEL.contract_address, + amount: amount.toString(), + }); + expect( + Coinbase.apiClients.contractInvocation!.createContractInvocation, + ).toHaveBeenCalledTimes(1); + }); + + it("broadcasts the contract invocation", async () => { + expect( + Coinbase.apiClients.contractInvocation!.broadcastContractInvocation, + ).toHaveBeenCalledWith( + walletAddress.getWalletId(), + walletAddress.getId(), + VALID_CONTRACT_INVOCATION_MODEL.contract_invocation_id, + { + signed_payload: expectedSignedPayload, + }, + ); + + expect( + Coinbase.apiClients.contractInvocation!.broadcastContractInvocation, + ).toHaveBeenCalledTimes(1); + }); + + it("checks for sufficient balance", async () => { + expect( + Coinbase.apiClients.externalAddress!.getExternalAddressBalance, + ).toHaveBeenCalledWith( + walletAddress.getNetworkId(), + walletAddress.getId(), + Coinbase.assets.Eth, + ); + + expect( + Coinbase.apiClients.externalAddress!.getExternalAddressBalance, + ).toHaveBeenCalledTimes(1); + }); + }); + + describe("when it is fails to invoke a payable contract method", () => { + const amount = new Decimal("1000"); + + it("throws an error for invalid input", async () => { + await expect( + walletAddress.invokeContract({ + abi: MINT_NFT_ABI, + args: MINT_NFT_ARGS, + method: VALID_CONTRACT_INVOCATION_MODEL.method, + contractAddress: VALID_CONTRACT_INVOCATION_MODEL.contract_address, + amount, + }), + ).rejects.toThrow(Error); + }); + }); + + describe("when no key is loaded", () => { + beforeEach(() => { + walletAddress = new WalletAddress(addressModel); + }); + + it("throws an error", async () => { + await expect( + walletAddress.invokeContract({ + abi: MINT_NFT_ABI, + args: MINT_NFT_ARGS, + method: VALID_CONTRACT_INVOCATION_MODEL.method, + contractAddress: VALID_CONTRACT_INVOCATION_MODEL.contract_address, + }), + ).rejects.toThrow(Error); + }); + }); + + describe("when it fails to create a contract invocation", () => { + beforeEach(() => { + Coinbase.apiClients.contractInvocation!.createContractInvocation = + mockReturnRejectedValue( + new APIError({ + response: { + status: 400, + data: { + code: "malformed_request", + message: "failed to create contract invocation: invalid abi", + }, + }, + } as AxiosError), + ); + }); + + it("throws an error", async () => { + await expect( + walletAddress.invokeContract({ + abi: { invalid_abi: "abi" }, + args: MINT_NFT_ARGS, + method: VALID_CONTRACT_INVOCATION_MODEL.method, + contractAddress: VALID_CONTRACT_INVOCATION_MODEL.contract_address, + }), + ).rejects.toThrow(APIError); + }); + }); + + describe("when it fails to broadcast a contract invocation", () => { + beforeEach(() => { + Coinbase.apiClients.contractInvocation!.createContractInvocation = mockReturnValue({ + ...VALID_CONTRACT_INVOCATION_MODEL, + address_id: walletAddress.getId(), + wallet_id: walletAddress.getWalletId(), + }); + + Coinbase.apiClients.contractInvocation!.broadcastContractInvocation = + mockReturnRejectedValue( + new APIError({ + response: { + status: 400, + data: { + code: "invalid_signed_payload", + message: "failed to broadcast contract invocation: invalid signed payload", + }, + }, + } as AxiosError), + ); + }); + + it("throws an error", async () => { + await expect( + walletAddress.invokeContract({ + abi: MINT_NFT_ABI, + args: MINT_NFT_ARGS, + method: VALID_CONTRACT_INVOCATION_MODEL.method, + contractAddress: VALID_CONTRACT_INVOCATION_MODEL.contract_address, + }), + ).rejects.toThrow(APIError); + }); + }); + }); + + describe("when using a server-signer", () => { + let contractInvocation; + + beforeEach(async () => { + Coinbase.useServerSigner = true; + + walletAddress = new WalletAddress(addressModel); + }); + + describe("when it is successful", () => { + beforeEach(async () => { + Coinbase.apiClients.contractInvocation!.createContractInvocation = mockReturnValue({ + ...VALID_CONTRACT_INVOCATION_MODEL, + address_id: walletAddress.getId(), + wallet_id: walletAddress.getWalletId(), + }); + + contractInvocation = await walletAddress.invokeContract({ + abi: MINT_NFT_ABI, + args: MINT_NFT_ARGS, + method: VALID_CONTRACT_INVOCATION_MODEL.method, + contractAddress: VALID_CONTRACT_INVOCATION_MODEL.contract_address, + }); + }); + + it("returns a pending contract invocation", async () => { + expect(contractInvocation).toBeInstanceOf(ContractInvocation); + expect(contractInvocation.getId()).toBe( + VALID_CONTRACT_INVOCATION_MODEL.contract_invocation_id, + ); + expect(contractInvocation.getStatus()).toBe(TransactionStatus.PENDING); + }); + + it("creates a contract invocation", async () => { + expect( + Coinbase.apiClients.contractInvocation!.createContractInvocation, + ).toHaveBeenCalledWith(walletAddress.getWalletId(), walletAddress.getId(), { + abi: VALID_CONTRACT_INVOCATION_MODEL.abi, + args: VALID_CONTRACT_INVOCATION_MODEL.args, + method: VALID_CONTRACT_INVOCATION_MODEL.method, + contract_address: VALID_CONTRACT_INVOCATION_MODEL.contract_address, + }); + expect( + Coinbase.apiClients.contractInvocation!.createContractInvocation, + ).toHaveBeenCalledTimes(1); + }); + }); + + describe("when creating a contract invocation fails", () => { + beforeEach(() => { + Coinbase.apiClients.contractInvocation!.createContractInvocation = + mockReturnRejectedValue( + new APIError({ + response: { + status: 400, + data: { + code: "malformed_request", + message: "failed to create contract invocation: invalid abi", + }, + }, + } as AxiosError), + ); + }); + + it("throws an error", async () => { + await expect( + walletAddress.invokeContract({ + abi: { invalid_abi: "abi" }, + args: MINT_NFT_ARGS, + method: VALID_CONTRACT_INVOCATION_MODEL.method, + contractAddress: VALID_CONTRACT_INVOCATION_MODEL.contract_address, + }), + ).rejects.toThrow(APIError); + }); }); }); + }); + + describe("#deployToken", () => { + const key = ethers.Wallet.createRandom(); + let addressModel: AddressModel; + let walletAddress: WalletAddress; + let expectedSignedPayload: string; + + beforeAll(() => { + Coinbase.apiClients.smartContract = smartContractApiMock; + }); + + beforeEach(() => { + jest.clearAllMocks(); + + addressModel = newAddressModel(randomUUID(), randomUUID(), Coinbase.networks.BaseSepolia); + }); + + describe("when not using a server-signer", () => { + beforeEach(async () => { + Coinbase.useServerSigner = false; - describe(".setKey", () => { - it("should set the key successfully", () => { - key = ethers.Wallet.createRandom(); - const newAddress = new WalletAddress(VALID_ADDRESS_MODEL, undefined); - expect(() => { - newAddress.setKey(key); - }).not.toThrow(InternalError); + walletAddress = new WalletAddress(addressModel, key as unknown as ethers.Wallet); + + const tx = new Transaction(VALID_SMART_CONTRACT_ERC20_MODEL.transaction!); + expectedSignedPayload = await tx.sign(key as unknown as ethers.Wallet); }); - it("should not set the key successfully", () => { - key = ethers.Wallet.createRandom(); - const newAddress = new WalletAddress(VALID_ADDRESS_MODEL, key); - expect(() => { - newAddress.setKey(key); - }).toThrow(InternalError); + + describe("when it is successful", () => { + let smartContract; + + beforeEach(async () => { + Coinbase.apiClients.smartContract!.createSmartContract = mockReturnValue({ + ...VALID_SMART_CONTRACT_ERC20_MODEL, + deployer_address: walletAddress.getId(), + wallet_id: walletAddress.getWalletId(), + }); + + Coinbase.apiClients.smartContract!.deploySmartContract = mockReturnValue({ + ...VALID_SMART_CONTRACT_ERC20_MODEL, + address_id: walletAddress.getId(), + wallet_id: walletAddress.getWalletId(), + }); + + smartContract = await walletAddress.deployToken({ + name: ERC20_NAME, + symbol: ERC20_SYMBOL, + totalSupply: ERC20_TOTAL_SUPPLY, + }); + }); + + it("returns a smart contract", async () => { + expect(smartContract).toBeInstanceOf(SmartContract); + expect(smartContract.getId()).toBe(VALID_SMART_CONTRACT_ERC20_MODEL.smart_contract_id); + }); + + it("creates the smart contract", async () => { + expect(Coinbase.apiClients.smartContract!.createSmartContract).toHaveBeenCalledWith( + walletAddress.getWalletId(), + walletAddress.getId(), + { + type: SmartContractType.Erc20, + options: { + name: ERC20_NAME, + symbol: ERC20_SYMBOL, + total_supply: ERC20_TOTAL_SUPPLY.toString(), + }, + }, + ); + expect(Coinbase.apiClients.smartContract!.createSmartContract).toHaveBeenCalledTimes(1); + }); + + it("broadcasts the smart contract", async () => { + expect(Coinbase.apiClients.smartContract!.deploySmartContract).toHaveBeenCalledWith( + walletAddress.getWalletId(), + walletAddress.getId(), + VALID_SMART_CONTRACT_ERC20_MODEL.smart_contract_id, + { + signed_payload: expectedSignedPayload, + }, + ); + + expect(Coinbase.apiClients.smartContract!.deploySmartContract).toHaveBeenCalledTimes(1); + }); }); + + describe("when it is successful deploying a smart contract", () => { + let smartContract; + + beforeEach(async () => { + Coinbase.apiClients.smartContract!.createSmartContract = mockReturnValue({ + ...VALID_SMART_CONTRACT_ERC20_MODEL, + deployer_address: walletAddress.getId(), + wallet_id: walletAddress.getWalletId(), + }); + + Coinbase.apiClients.smartContract!.deploySmartContract = mockReturnValue({ + ...VALID_SMART_CONTRACT_ERC20_MODEL, + deployer_address: walletAddress.getId(), + wallet_id: walletAddress.getWalletId(), + }); + + Coinbase.apiClients.smartContract!.getSmartContract = mockReturnValue( + VALID_SMART_CONTRACT_ERC20_MODEL, + ); + + smartContract = await walletAddress.deployToken({ + name: ERC20_NAME, + symbol: ERC20_SYMBOL, + totalSupply: ERC20_TOTAL_SUPPLY, + }); + }); + + it("returns a smart contract", async () => { + expect(smartContract).toBeInstanceOf(SmartContract); + expect(smartContract.getId()).toBe(VALID_SMART_CONTRACT_ERC20_MODEL.smart_contract_id); + }); + + it("creates the smart contract", async () => { + expect(Coinbase.apiClients.smartContract!.createSmartContract).toHaveBeenCalledWith( + walletAddress.getWalletId(), + walletAddress.getId(), + { + type: SmartContractType.Erc20, + options: { + name: ERC20_NAME, + symbol: ERC20_SYMBOL, + total_supply: ERC20_TOTAL_SUPPLY.toString(), + }, + }, + ); + expect(Coinbase.apiClients.smartContract!.createSmartContract).toHaveBeenCalledTimes(1); + }); + + it("broadcasts the smart contract", async () => { + expect(Coinbase.apiClients.smartContract!.deploySmartContract).toHaveBeenCalledWith( + walletAddress.getWalletId(), + walletAddress.getId(), + VALID_SMART_CONTRACT_ERC20_MODEL.smart_contract_id, + { + signed_payload: expectedSignedPayload, + }, + ); + + expect(Coinbase.apiClients.smartContract!.deploySmartContract).toHaveBeenCalledTimes(1); + }); + }); + + describe("when no key is loaded", () => { + beforeEach(() => { + walletAddress = new WalletAddress(addressModel); + }); + + it("throws an error", async () => { + await expect( + walletAddress.deployToken({ + name: ERC20_NAME, + symbol: ERC20_SYMBOL, + totalSupply: ERC20_TOTAL_SUPPLY, + }), + ).rejects.toThrow(Error); + }); + }); + + describe("when it fails to create a smart contract", () => { + beforeEach(() => { + Coinbase.apiClients.smartContract!.createSmartContract = mockReturnRejectedValue( + new APIError({ + response: { + status: 400, + data: { + code: "malformed_request", + message: "failed to create smart contract: invalid abi", + }, + }, + } as AxiosError), + ); + }); + + it("throws an error", async () => { + await expect( + walletAddress.deployToken({ + name: ERC20_NAME, + symbol: ERC20_SYMBOL, + totalSupply: ERC20_TOTAL_SUPPLY, + }), + ).rejects.toThrow(APIError); + }); + }); + + describe("when it fails to broadcast a smart contract", () => { + beforeEach(() => { + Coinbase.apiClients.smartContract!.createSmartContract = mockReturnValue({ + ...VALID_CONTRACT_INVOCATION_MODEL, + address_id: walletAddress.getId(), + wallet_id: walletAddress.getWalletId(), + }); + + Coinbase.apiClients.smartContract!.deploySmartContract = mockReturnRejectedValue( + new APIError({ + response: { + status: 400, + data: { + code: "invalid_signed_payload", + message: "failed to broadcast smart contract: invalid signed payload", + }, + }, + } as AxiosError), + ); + }); + + it("throws an error", async () => { + await expect( + walletAddress.deployToken({ + name: ERC20_NAME, + symbol: ERC20_SYMBOL, + totalSupply: ERC20_TOTAL_SUPPLY, + }), + ).rejects.toThrow(APIError); + }); + }); + }); + + describe("when using a server-signer", () => { + let smartContract; + + beforeEach(async () => { + Coinbase.useServerSigner = true; + + walletAddress = new WalletAddress(addressModel); + }); + + describe("when it is successful", () => { + beforeEach(async () => { + Coinbase.apiClients.smartContract!.createSmartContract = mockReturnValue({ + ...VALID_SMART_CONTRACT_ERC20_MODEL, + address_id: walletAddress.getId(), + wallet_id: walletAddress.getWalletId(), + }); + + smartContract = await walletAddress.deployToken({ + name: ERC20_NAME, + symbol: ERC20_SYMBOL, + totalSupply: ERC20_TOTAL_SUPPLY, + }); + }); + + it("returns a pending contract invocation", async () => { + expect(smartContract).toBeInstanceOf(SmartContract); + expect(smartContract.getId()).toBe(VALID_SMART_CONTRACT_ERC20_MODEL.smart_contract_id); + expect(smartContract.getTransaction().getStatus()).toBe(TransactionStatus.PENDING); + }); + + it("creates a contract invocation", async () => { + expect(Coinbase.apiClients.smartContract!.createSmartContract).toHaveBeenCalledWith( + walletAddress.getWalletId(), + walletAddress.getId(), + { + type: SmartContractType.Erc20, + options: { + name: ERC20_NAME, + symbol: ERC20_SYMBOL, + total_supply: ERC20_TOTAL_SUPPLY.toString(), + }, + }, + ); + expect(Coinbase.apiClients.smartContract!.createSmartContract).toHaveBeenCalledTimes(1); + }); + }); + + describe("when creating a contract invocation fails", () => { + beforeEach(() => { + Coinbase.apiClients.smartContract!.createSmartContract = mockReturnRejectedValue( + new APIError({ + response: { + status: 400, + data: { + code: "malformed_request", + message: "failed to create contract invocation: invalid abi", + }, + }, + } as AxiosError), + ); + }); + + it("throws an error", async () => { + await expect( + walletAddress.deployToken({ + name: ERC20_NAME, + symbol: ERC20_SYMBOL, + totalSupply: ERC20_TOTAL_SUPPLY, + }), + ).rejects.toThrow(APIError); + }); + }); + }); + }); + + describe("#deployNFT", () => { + const key = ethers.Wallet.createRandom(); + let addressModel: AddressModel; + let walletAddress: WalletAddress; + let expectedSignedPayload: string; + + beforeAll(() => { + Coinbase.apiClients.smartContract = smartContractApiMock; + }); + + beforeEach(() => { + jest.clearAllMocks(); + + addressModel = newAddressModel(randomUUID(), randomUUID(), Coinbase.networks.BaseSepolia); + }); + + describe("when not using a server-signer", () => { + beforeEach(async () => { + Coinbase.useServerSigner = false; + + walletAddress = new WalletAddress(addressModel, key as unknown as ethers.Wallet); + + const tx = new Transaction(VALID_SMART_CONTRACT_ERC721_MODEL.transaction!); + expectedSignedPayload = await tx.sign(key as unknown as ethers.Wallet); + }); + + describe("when it is successful", () => { + let smartContract; + + beforeEach(async () => { + Coinbase.apiClients.smartContract!.createSmartContract = mockReturnValue({ + ...VALID_SMART_CONTRACT_ERC721_MODEL, + deployer_address: walletAddress.getId(), + wallet_id: walletAddress.getWalletId(), + }); + + Coinbase.apiClients.smartContract!.deploySmartContract = mockReturnValue({ + ...VALID_SMART_CONTRACT_ERC721_MODEL, + address_id: walletAddress.getId(), + wallet_id: walletAddress.getWalletId(), + }); + + smartContract = await walletAddress.deployNFT({ + name: ERC721_NAME, + symbol: ERC721_SYMBOL, + baseURI: ERC721_BASE_URI, + }); + }); + + it("returns a smart contract", async () => { + expect(smartContract).toBeInstanceOf(SmartContract); + expect(smartContract.getId()).toBe(VALID_SMART_CONTRACT_ERC721_MODEL.smart_contract_id); + }); + + it("creates the smart contract", async () => { + expect(Coinbase.apiClients.smartContract!.createSmartContract).toHaveBeenCalledWith( + walletAddress.getWalletId(), + walletAddress.getId(), + { + type: SmartContractType.Erc721, + options: { + name: ERC721_NAME, + symbol: ERC721_SYMBOL, + base_uri: ERC721_BASE_URI, + }, + }, + ); + expect(Coinbase.apiClients.smartContract!.createSmartContract).toHaveBeenCalledTimes(1); + }); + + it("broadcasts the smart contract", async () => { + expect(Coinbase.apiClients.smartContract!.deploySmartContract).toHaveBeenCalledWith( + walletAddress.getWalletId(), + walletAddress.getId(), + VALID_SMART_CONTRACT_ERC721_MODEL.smart_contract_id, + { + signed_payload: expectedSignedPayload, + }, + ); + + expect(Coinbase.apiClients.smartContract!.deploySmartContract).toHaveBeenCalledTimes(1); + }); + }); + + describe("when it is successful deploying a smart contract", () => { + let smartContract; + + beforeEach(async () => { + Coinbase.apiClients.smartContract!.createSmartContract = mockReturnValue({ + ...VALID_SMART_CONTRACT_ERC721_MODEL, + deployer_address: walletAddress.getId(), + wallet_id: walletAddress.getWalletId(), + }); + + Coinbase.apiClients.smartContract!.deploySmartContract = mockReturnValue({ + ...VALID_SMART_CONTRACT_ERC721_MODEL, + deployer_address: walletAddress.getId(), + wallet_id: walletAddress.getWalletId(), + }); + + Coinbase.apiClients.smartContract!.getSmartContract = mockReturnValue( + VALID_SMART_CONTRACT_ERC721_MODEL, + ); + + smartContract = await walletAddress.deployNFT({ + name: ERC721_NAME, + symbol: ERC721_SYMBOL, + baseURI: ERC721_BASE_URI, + }); + }); + + it("returns a smart contract", async () => { + expect(smartContract).toBeInstanceOf(SmartContract); + expect(smartContract.getId()).toBe(VALID_SMART_CONTRACT_ERC721_MODEL.smart_contract_id); + }); + + it("creates the smart contract", async () => { + expect(Coinbase.apiClients.smartContract!.createSmartContract).toHaveBeenCalledWith( + walletAddress.getWalletId(), + walletAddress.getId(), + { + type: SmartContractType.Erc721, + options: { + name: ERC721_NAME, + symbol: ERC721_SYMBOL, + base_uri: ERC721_BASE_URI, + }, + }, + ); + expect(Coinbase.apiClients.smartContract!.createSmartContract).toHaveBeenCalledTimes(1); + }); + + it("broadcasts the smart contract", async () => { + expect(Coinbase.apiClients.smartContract!.deploySmartContract).toHaveBeenCalledWith( + walletAddress.getWalletId(), + walletAddress.getId(), + VALID_SMART_CONTRACT_ERC721_MODEL.smart_contract_id, + { + signed_payload: expectedSignedPayload, + }, + ); + + expect(Coinbase.apiClients.smartContract!.deploySmartContract).toHaveBeenCalledTimes(1); + }); + }); + + describe("when no key is loaded", () => { + beforeEach(() => { + walletAddress = new WalletAddress(addressModel); + }); + + it("throws an error", async () => { + await expect( + walletAddress.deployNFT({ + name: ERC721_NAME, + symbol: ERC721_SYMBOL, + baseURI: ERC721_BASE_URI, + }), + ).rejects.toThrow(Error); + }); + }); + + describe("when it fails to create a smart contract", () => { + beforeEach(() => { + Coinbase.apiClients.smartContract!.createSmartContract = mockReturnRejectedValue( + new APIError({ + response: { + status: 400, + data: { + code: "malformed_request", + message: "failed to create smart contract: invalid abi", + }, + }, + } as AxiosError), + ); + }); + + it("throws an error", async () => { + await expect( + walletAddress.deployNFT({ + name: ERC721_NAME, + symbol: ERC721_SYMBOL, + baseURI: ERC721_BASE_URI, + }), + ).rejects.toThrow(APIError); + }); + }); + + describe("when it fails to broadcast a smart contract", () => { + beforeEach(() => { + Coinbase.apiClients.smartContract!.createSmartContract = mockReturnValue({ + ...VALID_CONTRACT_INVOCATION_MODEL, + address_id: walletAddress.getId(), + wallet_id: walletAddress.getWalletId(), + }); + + Coinbase.apiClients.smartContract!.deploySmartContract = mockReturnRejectedValue( + new APIError({ + response: { + status: 400, + data: { + code: "invalid_signed_payload", + message: "failed to broadcast smart contract: invalid signed payload", + }, + }, + } as AxiosError), + ); + }); + + it("throws an error", async () => { + await expect( + walletAddress.deployNFT({ + name: ERC721_NAME, + symbol: ERC721_SYMBOL, + baseURI: ERC721_BASE_URI, + }), + ).rejects.toThrow(APIError); + }); + }); + }); + + describe("when using a server-signer", () => { + let smartContract; + + beforeEach(async () => { + Coinbase.useServerSigner = true; + + walletAddress = new WalletAddress(addressModel); + }); + + describe("when it is successful", () => { + beforeEach(async () => { + Coinbase.apiClients.smartContract!.createSmartContract = mockReturnValue({ + ...VALID_SMART_CONTRACT_ERC721_MODEL, + address_id: walletAddress.getId(), + wallet_id: walletAddress.getWalletId(), + }); + + smartContract = await walletAddress.deployNFT({ + name: ERC721_NAME, + symbol: ERC721_SYMBOL, + baseURI: ERC721_BASE_URI, + }); + }); + + it("returns a pending contract invocation", async () => { + expect(smartContract).toBeInstanceOf(SmartContract); + expect(smartContract.getId()).toBe(VALID_SMART_CONTRACT_ERC721_MODEL.smart_contract_id); + expect(smartContract.getTransaction().getStatus()).toBe(TransactionStatus.PENDING); + }); + + it("creates a contract invocation", async () => { + expect(Coinbase.apiClients.smartContract!.createSmartContract).toHaveBeenCalledWith( + walletAddress.getWalletId(), + walletAddress.getId(), + { + type: SmartContractType.Erc721, + options: { + name: ERC721_NAME, + symbol: ERC721_SYMBOL, + base_uri: ERC721_BASE_URI, + }, + }, + ); + expect(Coinbase.apiClients.smartContract!.createSmartContract).toHaveBeenCalledTimes(1); + }); + }); + + describe("when creating a contract invocation fails", () => { + beforeEach(() => { + Coinbase.apiClients.smartContract!.createSmartContract = mockReturnRejectedValue( + new APIError({ + response: { + status: 400, + data: { + code: "malformed_request", + message: "failed to create contract invocation: invalid abi", + }, + }, + } as AxiosError), + ); + }); + + it("throws an error", async () => { + await expect( + walletAddress.deployNFT({ + name: ERC721_NAME, + symbol: ERC721_SYMBOL, + baseURI: ERC721_BASE_URI, + }), + ).rejects.toThrow(APIError); + }); + }); + }); + }); + + describe("#deployMultiToken", () => { + const key = ethers.Wallet.createRandom(); + let addressModel: AddressModel; + let walletAddress: WalletAddress; + let expectedSignedPayload: string; + + beforeAll(() => { + Coinbase.apiClients.smartContract = smartContractApiMock; + }); + + beforeEach(() => { + jest.clearAllMocks(); + + addressModel = newAddressModel(randomUUID(), randomUUID(), Coinbase.networks.BaseSepolia); + }); + + describe("when not using a server-signer", () => { + beforeEach(async () => { + Coinbase.useServerSigner = false; + + walletAddress = new WalletAddress(addressModel, key as unknown as ethers.Wallet); + + const tx = new Transaction(VALID_SMART_CONTRACT_ERC1155_MODEL.transaction!); + expectedSignedPayload = await tx.sign(key as unknown as ethers.Wallet); + }); + + describe("when it is successful", () => { + let smartContract; + + beforeEach(async () => { + Coinbase.apiClients.smartContract!.createSmartContract = mockReturnValue({ + ...VALID_SMART_CONTRACT_ERC1155_MODEL, + deployer_address: walletAddress.getId(), + wallet_id: walletAddress.getWalletId(), + }); + + Coinbase.apiClients.smartContract!.deploySmartContract = mockReturnValue({ + ...VALID_SMART_CONTRACT_ERC1155_MODEL, + address_id: walletAddress.getId(), + wallet_id: walletAddress.getWalletId(), + }); + + smartContract = await walletAddress.deployMultiToken({ + uri: ERC1155_URI, + }); + }); + + it("returns a smart contract", async () => { + expect(smartContract).toBeInstanceOf(SmartContract); + expect(smartContract.getId()).toBe(VALID_SMART_CONTRACT_ERC1155_MODEL.smart_contract_id); + }); + + it("creates the smart contract", async () => { + expect(Coinbase.apiClients.smartContract!.createSmartContract).toHaveBeenCalledWith( + walletAddress.getWalletId(), + walletAddress.getId(), + { + type: SmartContractType.Erc1155, + options: { + uri: ERC1155_URI, + }, + }, + ); + expect(Coinbase.apiClients.smartContract!.createSmartContract).toHaveBeenCalledTimes(1); + }); + + it("broadcasts the smart contract", async () => { + expect(Coinbase.apiClients.smartContract!.deploySmartContract).toHaveBeenCalledWith( + walletAddress.getWalletId(), + walletAddress.getId(), + VALID_SMART_CONTRACT_ERC1155_MODEL.smart_contract_id, + { + signed_payload: expectedSignedPayload, + }, + ); + + expect(Coinbase.apiClients.smartContract!.deploySmartContract).toHaveBeenCalledTimes(1); + }); + }); + + describe("when it is successful deploying a smart contract", () => { + let smartContract; + + beforeEach(async () => { + Coinbase.apiClients.smartContract!.createSmartContract = mockReturnValue({ + ...VALID_SMART_CONTRACT_ERC1155_MODEL, + deployer_address: walletAddress.getId(), + wallet_id: walletAddress.getWalletId(), + }); + + Coinbase.apiClients.smartContract!.deploySmartContract = mockReturnValue({ + ...VALID_SMART_CONTRACT_ERC1155_MODEL, + deployer_address: walletAddress.getId(), + wallet_id: walletAddress.getWalletId(), + }); + + Coinbase.apiClients.smartContract!.getSmartContract = mockReturnValue( + VALID_SMART_CONTRACT_ERC1155_MODEL, + ); + + smartContract = await walletAddress.deployMultiToken({ + uri: ERC1155_URI, + }); + }); + + it("returns a smart contract", async () => { + expect(smartContract).toBeInstanceOf(SmartContract); + expect(smartContract.getId()).toBe(VALID_SMART_CONTRACT_ERC1155_MODEL.smart_contract_id); + }); + + it("creates the smart contract", async () => { + expect(Coinbase.apiClients.smartContract!.createSmartContract).toHaveBeenCalledWith( + walletAddress.getWalletId(), + walletAddress.getId(), + { + type: SmartContractType.Erc1155, + options: { + uri: ERC1155_URI, + }, + }, + ); + expect(Coinbase.apiClients.smartContract!.createSmartContract).toHaveBeenCalledTimes(1); + }); + + it("broadcasts the smart contract", async () => { + expect(Coinbase.apiClients.smartContract!.deploySmartContract).toHaveBeenCalledWith( + walletAddress.getWalletId(), + walletAddress.getId(), + VALID_SMART_CONTRACT_ERC1155_MODEL.smart_contract_id, + { + signed_payload: expectedSignedPayload, + }, + ); + + expect(Coinbase.apiClients.smartContract!.deploySmartContract).toHaveBeenCalledTimes(1); + }); + }); + + describe("when no key is loaded", () => { + beforeEach(() => { + walletAddress = new WalletAddress(addressModel); + }); + + it("throws an error", async () => { + await expect( + walletAddress.deployMultiToken({ + uri: ERC1155_URI, + }), + ).rejects.toThrow(Error); + }); + }); + + describe("when it fails to create a smart contract", () => { + beforeEach(() => { + Coinbase.apiClients.smartContract!.createSmartContract = mockReturnRejectedValue( + new APIError({ + response: { + status: 400, + data: { + code: "malformed_request", + message: "failed to create smart contract: invalid abi", + }, + }, + } as AxiosError), + ); + }); + + it("throws an error", async () => { + await expect( + walletAddress.deployMultiToken({ + uri: ERC1155_URI, + }), + ).rejects.toThrow(APIError); + }); + }); + + describe("when it fails to broadcast a smart contract", () => { + beforeEach(() => { + Coinbase.apiClients.smartContract!.createSmartContract = mockReturnValue({ + ...VALID_CONTRACT_INVOCATION_MODEL, + address_id: walletAddress.getId(), + wallet_id: walletAddress.getWalletId(), + }); + + Coinbase.apiClients.smartContract!.deploySmartContract = mockReturnRejectedValue( + new APIError({ + response: { + status: 400, + data: { + code: "invalid_signed_payload", + message: "failed to broadcast smart contract: invalid signed payload", + }, + }, + } as AxiosError), + ); + }); + + it("throws an error", async () => { + await expect( + walletAddress.deployMultiToken({ + uri: ERC1155_URI, + }), + ).rejects.toThrow(APIError); + }); + }); + }); + + describe("when using a server-signer", () => { + let smartContract; + + beforeEach(async () => { + Coinbase.useServerSigner = true; + + walletAddress = new WalletAddress(addressModel); + }); + + describe("when it is successful", () => { + beforeEach(async () => { + Coinbase.apiClients.smartContract!.createSmartContract = mockReturnValue({ + ...VALID_SMART_CONTRACT_ERC1155_MODEL, + address_id: walletAddress.getId(), + wallet_id: walletAddress.getWalletId(), + }); + + smartContract = await walletAddress.deployMultiToken({ + uri: ERC1155_URI, + }); + }); + + it("returns a pending contract invocation", async () => { + expect(smartContract).toBeInstanceOf(SmartContract); + expect(smartContract.getId()).toBe(VALID_SMART_CONTRACT_ERC1155_MODEL.smart_contract_id); + expect(smartContract.getTransaction().getStatus()).toBe(TransactionStatus.PENDING); + }); + + it("creates a contract invocation", async () => { + expect(Coinbase.apiClients.smartContract!.createSmartContract).toHaveBeenCalledWith( + walletAddress.getWalletId(), + walletAddress.getId(), + { + type: SmartContractType.Erc1155, + options: { + uri: ERC1155_URI, + }, + }, + ); + expect(Coinbase.apiClients.smartContract!.createSmartContract).toHaveBeenCalledTimes(1); + }); + }); + + describe("when creating a contract invocation fails", () => { + beforeEach(() => { + Coinbase.apiClients.smartContract!.createSmartContract = mockReturnRejectedValue( + new APIError({ + response: { + status: 400, + data: { + code: "malformed_request", + message: "failed to create contract invocation: invalid abi", + }, + }, + } as AxiosError), + ); + }); + + it("throws an error", async () => { + await expect( + walletAddress.deployMultiToken({ + uri: ERC1155_URI, + }), + ).rejects.toThrow(APIError); + }); + }); + }); + }); + + describe("#deployContract", () => { + const key = ethers.Wallet.createRandom(); + let addressModel: AddressModel; + let walletAddress: WalletAddress; + let expectedSignedPayload: string; + + beforeAll(() => { + Coinbase.apiClients.smartContract = smartContractApiMock; + }); + + beforeEach(() => { + jest.clearAllMocks(); + + addressModel = newAddressModel(randomUUID(), randomUUID(), Coinbase.networks.BaseSepolia); + }); + + describe("when not using a server-signer", () => { + beforeEach(async () => { + Coinbase.useServerSigner = false; + + walletAddress = new WalletAddress(addressModel, key as unknown as ethers.Wallet); + + const tx = new Transaction(VALID_SMART_CONTRACT_CUSTOM_MODEL.transaction!); + expectedSignedPayload = await tx.sign(key as unknown as ethers.Wallet); + }); + + describe("when it is successful", () => { + let smartContract; + + beforeEach(async () => { + Coinbase.apiClients.smartContract!.compileSmartContract = mockReturnValue({ + ...VALID_COMPILED_CONTRACT_MODEL, + }); + + Coinbase.apiClients.smartContract!.createSmartContract = mockReturnValue({ + ...VALID_SMART_CONTRACT_CUSTOM_MODEL, + deployer_address: walletAddress.getId(), + wallet_id: walletAddress.getWalletId(), + }); + + Coinbase.apiClients.smartContract!.deploySmartContract = mockReturnValue({ + ...VALID_SMART_CONTRACT_CUSTOM_MODEL, + address_id: walletAddress.getId(), + wallet_id: walletAddress.getWalletId(), + }); + + smartContract = await walletAddress.deployContract({ + solidityVersion: "0.8.0", + solidityInputJson: "{}", + contractName: "TestContract", + constructorArgs: { + arg1: "arg1", + arg2: "arg2", + }, + }); + }); + + it("returns a smart contract", async () => { + expect(smartContract).toBeInstanceOf(SmartContract); + expect(smartContract.getId()).toBe(VALID_SMART_CONTRACT_CUSTOM_MODEL.smart_contract_id); + }); + + it("creates the smart contract", async () => { + expect(Coinbase.apiClients.smartContract!.createSmartContract).toHaveBeenCalledWith( + walletAddress.getWalletId(), + walletAddress.getId(), + { + type: SmartContractType.Custom, + options: `{"arg1":"arg1","arg2":"arg2"}`, + compiled_smart_contract_id: "test-compiled-contract-1", + }, + ); + expect(Coinbase.apiClients.smartContract!.createSmartContract).toHaveBeenCalledTimes(1); + }); + + it("broadcasts the smart contract", async () => { + expect(Coinbase.apiClients.smartContract!.deploySmartContract).toHaveBeenCalledWith( + walletAddress.getWalletId(), + walletAddress.getId(), + VALID_SMART_CONTRACT_CUSTOM_MODEL.smart_contract_id, + { + signed_payload: expectedSignedPayload, + }, + ); + + expect(Coinbase.apiClients.smartContract!.deploySmartContract).toHaveBeenCalledTimes(1); + }); + }); + + describe("when it is successful deploying a smart contract", () => { + let smartContract; + + beforeEach(async () => { + Coinbase.apiClients.smartContract!.createSmartContract = mockReturnValue({ + ...VALID_SMART_CONTRACT_CUSTOM_MODEL, + deployer_address: walletAddress.getId(), + wallet_id: walletAddress.getWalletId(), + }); + + Coinbase.apiClients.smartContract!.deploySmartContract = mockReturnValue({ + ...VALID_SMART_CONTRACT_CUSTOM_MODEL, + deployer_address: walletAddress.getId(), + wallet_id: walletAddress.getWalletId(), + }); + + Coinbase.apiClients.smartContract!.getSmartContract = mockReturnValue( + VALID_SMART_CONTRACT_CUSTOM_MODEL, + ); + + smartContract = await walletAddress.deployContract({ + solidityVersion: "0.8.0", + solidityInputJson: "{}", + contractName: "TestContract", + constructorArgs: { + arg1: "arg1", + arg2: "arg2", + }, + }); + }); + + it("returns a smart contract", async () => { + expect(smartContract).toBeInstanceOf(SmartContract); + expect(smartContract.getId()).toBe(VALID_SMART_CONTRACT_CUSTOM_MODEL.smart_contract_id); + }); + + it("creates the smart contract", async () => { + expect(Coinbase.apiClients.smartContract!.createSmartContract).toHaveBeenCalledWith( + walletAddress.getWalletId(), + walletAddress.getId(), + { + type: SmartContractType.Custom, + options: `{"arg1":"arg1","arg2":"arg2"}`, + compiled_smart_contract_id: "test-compiled-contract-1", + }, + ); + expect(Coinbase.apiClients.smartContract!.createSmartContract).toHaveBeenCalledTimes(1); + }); + + it("broadcasts the smart contract", async () => { + expect(Coinbase.apiClients.smartContract!.deploySmartContract).toHaveBeenCalledWith( + walletAddress.getWalletId(), + walletAddress.getId(), + VALID_SMART_CONTRACT_CUSTOM_MODEL.smart_contract_id, + { + signed_payload: expectedSignedPayload, + }, + ); + + expect(Coinbase.apiClients.smartContract!.deploySmartContract).toHaveBeenCalledTimes(1); + }); + }); + + describe("when no key is loaded", () => { + beforeEach(() => { + walletAddress = new WalletAddress(addressModel); + }); + + it("throws an error", async () => { + await expect( + walletAddress.deployContract({ + solidityVersion: "0.8.0", + solidityInputJson: "{}", + contractName: "TestContract", + constructorArgs: ["arg1", "arg2"], + }), + ).rejects.toThrow(Error); + }); + }); + + describe("when it fails to create a smart contract", () => { + beforeEach(() => { + Coinbase.apiClients.smartContract!.createSmartContract = mockReturnRejectedValue( + new APIError({ + response: { + status: 400, + data: { + code: "malformed_request", + message: "failed to create smart contract: invalid abi", + }, + }, + } as AxiosError), + ); + }); + + it("throws an error", async () => { + await expect( + walletAddress.deployContract({ + solidityVersion: "0.8.0", + solidityInputJson: "{}", + contractName: "TestContract", + constructorArgs: ["arg1", "arg2"], + }), + ).rejects.toThrow(APIError); + }); + }); + + describe("when it fails to broadcast a smart contract", () => { + beforeEach(() => { + Coinbase.apiClients.smartContract!.createSmartContract = mockReturnValue({ + ...VALID_SMART_CONTRACT_CUSTOM_MODEL, + address_id: walletAddress.getId(), + wallet_id: walletAddress.getWalletId(), + }); + + Coinbase.apiClients.smartContract!.deploySmartContract = mockReturnRejectedValue( + new APIError({ + response: { + status: 400, + data: { + code: "invalid_signed_payload", + message: "failed to broadcast smart contract: invalid signed payload", + }, + }, + } as AxiosError), + ); + }); + + it("throws an error", async () => { + await expect( + walletAddress.deployContract({ + solidityVersion: "0.8.0", + solidityInputJson: "{}", + contractName: "TestContract", + constructorArgs: ["arg1", "arg2"], + }), + ).rejects.toThrow(APIError); + }); + }); + }); + describe("when using a server-signer", () => { + let smartContract; + + beforeEach(() => { + Coinbase.useServerSigner = true; + walletAddress = new WalletAddress(addressModel); + }); + + describe("when it is successful", () => { + beforeEach(async () => { + Coinbase.apiClients.smartContract!.createSmartContract = mockReturnValue({ + ...VALID_SMART_CONTRACT_CUSTOM_MODEL, + address_id: walletAddress.getId(), + wallet_id: walletAddress.getWalletId(), + }); + + smartContract = await walletAddress.deployContract({ + solidityVersion: "0.8.0", + solidityInputJson: "{}", + contractName: "TestContract", + constructorArgs: { + arg1: "arg1", + arg2: "arg2", + }, + }); + }); + + it("returns a pending contract invocation", async () => { + expect(smartContract).toBeInstanceOf(SmartContract); + expect(smartContract.getId()).toBe(VALID_SMART_CONTRACT_CUSTOM_MODEL.smart_contract_id); + expect(smartContract.getTransaction().getStatus()).toBe(TransactionStatus.PENDING); + }); + + it("creates a contract invocation", async () => { + expect(Coinbase.apiClients.smartContract!.createSmartContract).toHaveBeenCalledWith( + walletAddress.getWalletId(), + walletAddress.getId(), + { + type: SmartContractType.Custom, + options: `{"arg1":"arg1","arg2":"arg2"}`, + compiled_smart_contract_id: "test-compiled-contract-1", + }, + ); + expect(Coinbase.apiClients.smartContract!.createSmartContract).toHaveBeenCalledTimes(1); + }); + }); + }); + }); + + describe("#createPayloadSignature", () => { + const key = ethers.Wallet.createRandom(); + let addressModel: AddressModel; + let walletAddress: WalletAddress; + const unsignedPayload = VALID_PAYLOAD_SIGNATURE_MODEL.unsigned_payload; + let signature: string; + + beforeAll(() => { + Coinbase.apiClients.address = addressesApiMock; + }); + + beforeEach(() => { + jest.clearAllMocks(); + }); + + describe("when not using a server-signer", () => { + beforeEach(() => { + addressModel = newAddressModel(randomUUID(), randomUUID(), Coinbase.networks.BaseSepolia); + walletAddress = new WalletAddress(addressModel, key as unknown as ethers.Wallet); + signature = key.signingKey.sign(unsignedPayload).serialized; + Coinbase.useServerSigner = false; + }); + + it("should successfully create a payload signature", async () => { + Coinbase.apiClients.address!.createPayloadSignature = mockReturnValue( + VALID_PAYLOAD_SIGNATURE_MODEL, + ); + + const payloadSignature = await walletAddress.createPayloadSignature(unsignedPayload); + + expect(Coinbase.apiClients.address!.createPayloadSignature).toHaveBeenCalledWith( + walletAddress.getWalletId(), + walletAddress.getId(), + { + unsigned_payload: unsignedPayload, + signature, + }, + ); + expect(Coinbase.apiClients.address!.createPayloadSignature).toHaveBeenCalledTimes(1); + expect(payloadSignature).toBeInstanceOf(PayloadSignature); + }); + + it("should throw an error when no key is loaded", async () => { + walletAddress = new WalletAddress(addressModel); + + expect(async () => { + await walletAddress.createPayloadSignature(unsignedPayload); + }).rejects.toThrow(Error); + }); + + it("should throw an APIError when the API call to create a payload signature fails", async () => { + Coinbase.apiClients.address!.createPayloadSignature = mockReturnRejectedValue( + new APIError("Failed to create payload signature"), + ); + + expect(async () => { + await walletAddress.createPayloadSignature(unsignedPayload); + }).rejects.toThrow(Error); + + expect(Coinbase.apiClients.address!.createPayloadSignature).toHaveBeenCalledWith( + walletAddress.getWalletId(), + walletAddress.getId(), + { + unsigned_payload: unsignedPayload, + signature, + }, + ); + expect(Coinbase.apiClients.address!.createPayloadSignature).toHaveBeenCalledTimes(1); + }); + }); + + describe("when using a server-signer", () => { + beforeEach(() => { + addressModel = newAddressModel(randomUUID(), randomUUID(), Coinbase.networks.BaseSepolia); + walletAddress = new WalletAddress(addressModel); + Coinbase.useServerSigner = true; + }); + + it("should successfully create a payload signature", async () => { + Coinbase.apiClients.address!.createPayloadSignature = mockReturnValue( + VALID_PAYLOAD_SIGNATURE_MODEL, + ); + + const payloadSignature = await walletAddress.createPayloadSignature(unsignedPayload); + + expect(Coinbase.apiClients.address!.createPayloadSignature).toHaveBeenCalledWith( + walletAddress.getWalletId(), + walletAddress.getId(), + { + unsigned_payload: unsignedPayload, + }, + ); + expect(Coinbase.apiClients.address!.createPayloadSignature).toHaveBeenCalledTimes(1); + expect(payloadSignature).toBeInstanceOf(PayloadSignature); + }); + + it("should throw an APIError when the API call to create a payload signature fails", async () => { + Coinbase.apiClients.address!.createPayloadSignature = mockReturnRejectedValue( + new APIError("Failed to create payload signature"), + ); + + expect(async () => { + await walletAddress.createPayloadSignature(unsignedPayload); + }).rejects.toThrow(Error); + + expect(Coinbase.apiClients.address!.createPayloadSignature).toHaveBeenCalledWith( + walletAddress.getWalletId(), + walletAddress.getId(), + { + unsigned_payload: unsignedPayload, + }, + ); + expect(Coinbase.apiClients.address!.createPayloadSignature).toHaveBeenCalledTimes(1); + }); + }); + }); + + describe("#getPayloadSignature", () => { + const key = ethers.Wallet.createRandom(); + let addressModel: AddressModel; + let walletAddress: WalletAddress; + const payloadSignatureId = VALID_PAYLOAD_SIGNATURE_MODEL.payload_signature_id; + + beforeAll(() => { + Coinbase.apiClients.address = addressesApiMock; + }); + + beforeEach(() => { + addressModel = newAddressModel(randomUUID(), randomUUID(), Coinbase.networks.BaseSepolia); + walletAddress = new WalletAddress(addressModel, key as unknown as ethers.Wallet); + Coinbase.useServerSigner = false; + jest.clearAllMocks(); + }); + + it("should successfully get the payload signature", async () => { + Coinbase.apiClients.address!.getPayloadSignature = mockReturnValue( + VALID_PAYLOAD_SIGNATURE_MODEL, + ); + + const payloadSignature = await walletAddress.getPayloadSignature(payloadSignatureId); + + expect(Coinbase.apiClients.address!.getPayloadSignature).toHaveBeenCalledWith( + walletAddress.getWalletId(), + walletAddress.getId(), + payloadSignatureId, + ); + expect(Coinbase.apiClients.address!.getPayloadSignature).toHaveBeenCalledTimes(1); + expect(payloadSignature).toBeInstanceOf(PayloadSignature); + }); + + it("should throw an APIError when the API call to get the payload signature fails", async () => { + Coinbase.apiClients.address!.getPayloadSignature = mockReturnRejectedValue( + new APIError("Failed to get payload signature"), + ); + + expect(async () => { + await walletAddress.getPayloadSignature(payloadSignatureId); + }).rejects.toThrow(Error); + + expect(Coinbase.apiClients.address!.getPayloadSignature).toHaveBeenCalledWith( + walletAddress.getWalletId(), + walletAddress.getId(), + payloadSignatureId, + ); + expect(Coinbase.apiClients.address!.getPayloadSignature).toHaveBeenCalledTimes(1); + }); + }); + + describe("#listPayloadSignatures", () => { + const key = ethers.Wallet.createRandom(); + let addressModel: AddressModel; + let walletAddress: WalletAddress; + + beforeAll(() => { + Coinbase.apiClients.address = addressesApiMock; + }); + + beforeEach(() => { + addressModel = newAddressModel(randomUUID(), randomUUID(), Coinbase.networks.BaseSepolia); + walletAddress = new WalletAddress(addressModel, key as unknown as ethers.Wallet); + Coinbase.useServerSigner = false; + jest.clearAllMocks(); + }); + + it("should successfully list payload signatures", async () => { + Coinbase.apiClients.address!.listPayloadSignatures = mockReturnValue( + VALID_PAYLOAD_SIGNATURE_LIST, + ); + + const paginationResponse = await walletAddress.listPayloadSignatures(); + + expect(Coinbase.apiClients.address!.listPayloadSignatures).toHaveBeenCalledTimes(1); + expect(paginationResponse.data).toHaveLength(VALID_PAYLOAD_SIGNATURE_LIST.data.length); + expect(paginationResponse.hasMore).toBe(false); + expect(paginationResponse.nextPage).toBe(undefined); + }); + + it("should throw an APIError when the API call to list payload signatures fails", async () => { + Coinbase.apiClients.address!.listPayloadSignatures = mockReturnRejectedValue( + new APIError("Failed to list payload signatures"), + ); + + expect(async () => { + await walletAddress.listPayloadSignatures(); + }).rejects.toThrow(Error); + + expect(Coinbase.apiClients.address!.listPayloadSignatures).toHaveBeenCalledTimes(1); }); }); }); diff --git a/src/tests/wallet_fund_test.ts b/src/tests/wallet_fund_test.ts new file mode 100644 index 00000000..5c715a14 --- /dev/null +++ b/src/tests/wallet_fund_test.ts @@ -0,0 +1,142 @@ +import { Wallet } from "../coinbase/wallet"; +import { WalletAddress } from "../coinbase/address/wallet_address"; +import { FundOperation } from "../coinbase/fund_operation"; +import { FundQuote } from "../coinbase/fund_quote"; +import { newAddressModel } from "./utils"; +import { Decimal } from "decimal.js"; +import { Coinbase, PaginationResponse } from ".."; +import { FeatureSet, Wallet as WalletModel } from "../client/api"; + +describe("Wallet Fund", () => { + let wallet: Wallet; + let walletModel: WalletModel; + let defaultAddress: WalletAddress; + const walletId = "test-wallet-id"; + const addressId = "0x123abc..."; + + beforeEach(() => { + const addressModel = newAddressModel(walletId, addressId); + defaultAddress = new WalletAddress(addressModel); + + walletModel = { + id: walletId, + network_id: Coinbase.networks.BaseSepolia, + default_address: addressModel, + feature_set: {} as FeatureSet, + }; + + wallet = Wallet.init(walletModel, ""); + + // Mock getDefaultAddress to return our test address + jest.spyOn(wallet, "getDefaultAddress").mockResolvedValue(defaultAddress); + + // Mock the fund and quoteFund methods on the default address + jest.spyOn(defaultAddress, "fund").mockResolvedValue({} as FundOperation); + jest.spyOn(defaultAddress, "quoteFund").mockResolvedValue({} as FundQuote); + jest + .spyOn(defaultAddress, "listFundOperations") + .mockResolvedValue({} as PaginationResponse); + }); + + afterEach(() => { + jest.restoreAllMocks(); + }); + + describe("#fund", () => { + it("should call defaultAddress.fund with correct parameters when passing in decimal amount", async () => { + const amount = new Decimal("1.0"); + const assetId = "eth"; + + await wallet.fund({ amount, assetId }); + + expect(defaultAddress.fund).toHaveBeenCalledWith({ amount, assetId }); + }); + + it("should call defaultAddress.fund with correct parameters when passing in number amount", async () => { + const amount = 1; + const assetId = "eth"; + + await wallet.fund({ amount, assetId }); + + expect(defaultAddress.fund).toHaveBeenCalledWith({ amount, assetId }); + }); + + it("should call defaultAddress.fund with correct parameters when passing in bigint amount", async () => { + const amount = BigInt(1); + const assetId = "eth"; + + await wallet.fund({ amount, assetId }); + + expect(defaultAddress.fund).toHaveBeenCalledWith({ amount, assetId }); + }); + + it("should throw error if default address does not exist", async () => { + jest + .spyOn(wallet, "getDefaultAddress") + .mockRejectedValue(new Error("Default address does not exist")); + + const amount = new Decimal("1.0"); + const assetId = "eth"; + + await expect(wallet.fund({ amount, assetId })).rejects.toThrow( + "Default address does not exist", + ); + }); + }); + + describe("#quoteFund", () => { + it("should call defaultAddress.quoteFund with correct parameters when passing in decimal amount", async () => { + const amount = new Decimal("1.0"); + const assetId = "eth"; + + await wallet.quoteFund({ amount, assetId }); + + expect(defaultAddress.quoteFund).toHaveBeenCalledWith({ amount, assetId }); + }); + + it("should call defaultAddress.quoteFund with correct parameters when passing in number amount", async () => { + const amount = 1; + const assetId = "eth"; + + await wallet.quoteFund({ amount, assetId }); + + expect(defaultAddress.quoteFund).toHaveBeenCalledWith({ amount, assetId }); + }); + + it("should call defaultAddress.quoteFund with correct parameters when passing in bigint amount", async () => { + const amount = BigInt(1); + const assetId = "eth"; + + await wallet.quoteFund({ amount, assetId }); + + expect(defaultAddress.quoteFund).toHaveBeenCalledWith({ amount, assetId }); + }); + + it("should throw error if default address does not exist", async () => { + jest + .spyOn(wallet, "getDefaultAddress") + .mockRejectedValue(new Error("Default address does not exist")); + + const amount = new Decimal("1.0"); + const assetId = "eth"; + + await expect(wallet.quoteFund({ amount, assetId })).rejects.toThrow( + "Default address does not exist", + ); + }); + }); + + describe("#listFundOperations", () => { + it("should call defaultAddress.listFundOperations with correct parameters", async () => { + await wallet.listFundOperations({ + limit: 10, + page: "test-page", + }); + + expect(defaultAddress.listFundOperations).toHaveBeenCalledWith({ + limit: 10, + page: "test-page", + }); + }); + }); +}); diff --git a/src/tests/wallet_test.ts b/src/tests/wallet_test.ts index 5f05738f..697bda9d 100644 --- a/src/tests/wallet_test.ts +++ b/src/tests/wallet_test.ts @@ -1,19 +1,33 @@ import * as fs from "fs"; -import crypto from "crypto"; +import crypto, { randomUUID } from "crypto"; import Decimal from "decimal.js"; import { ethers } from "ethers"; import { APIError } from "../coinbase/api_error"; import { Coinbase } from "../coinbase/coinbase"; -import { ArgumentError, InternalError } from "../coinbase/errors"; +import { ArgumentError } from "../coinbase/errors"; import { Wallet } from "../coinbase/wallet"; -import { ServerSignerStatus, TransferStatus } from "../coinbase/types"; +import { Transfer } from "../coinbase/transfer"; +import { FaucetTransaction } from "../coinbase/faucet_transaction"; +import { ServerSignerStatus, StakeOptionsMode, TransferStatus } from "../coinbase/types"; import { AddressBalanceList, + AddressHistoricalBalanceList, Address as AddressModel, Balance as BalanceModel, TransactionStatusEnum, Wallet as WalletModel, Trade as TradeModel, + Webhook as WebhookModel, + StakingOperation as StakingOperationModel, + StakingOperationStatusEnum, + StakingContext as StakingContextModel, + FetchStakingRewards200Response, + FetchHistoricalStakingBalances200Response, + StakingRewardStateEnum, + StakingRewardFormat, + FeatureSet, + WebhookWalletActivityFilter, + WebhookStatus, } from "./../client"; import { VALID_ADDRESS_MODEL, @@ -31,9 +45,38 @@ import { walletsApiMock, mockListAddress, getAssetMock, + externalAddressApiMock, + balanceHistoryApiMock, + stakeApiMock, + walletStakeApiMock, + MINT_NFT_ABI, + MINT_NFT_ARGS, + VALID_FAUCET_TRANSACTION_MODEL, + VALID_SIGNED_PAYLOAD_SIGNATURE_MODEL, + VALID_SIGNED_CONTRACT_INVOCATION_MODEL, + VALID_SMART_CONTRACT_ERC20_MODEL, + ERC20_NAME, + ERC20_SYMBOL, + ERC20_TOTAL_SUPPLY, + ERC721_NAME, + ERC721_SYMBOL, + ERC721_BASE_URI, + VALID_SMART_CONTRACT_ERC721_MODEL, + VALID_SMART_CONTRACT_ERC1155_MODEL, + VALID_SMART_CONTRACT_CUSTOM_MODEL, + newAddressModelsFromWallet, } from "./utils"; import { Trade } from "../coinbase/trade"; import { WalletAddress } from "../coinbase/address/wallet_address"; +import { StakingOperation } from "../coinbase/staking_operation"; +import { StakingReward } from "../coinbase/staking_reward"; +import { StakingBalance } from "../coinbase/staking_balance"; +import { PayloadSignature } from "../coinbase/payload_signature"; +import { ContractInvocation } from "../coinbase/contract_invocation"; +import { SmartContract } from "../coinbase/smart_contract"; +import { Webhook } from "../coinbase/webhook"; +import { WalletData } from "../coinbase/types"; +import { Address } from "../coinbase/address"; describe("Wallet Class", () => { let wallet: Wallet; @@ -57,6 +100,7 @@ describe("Wallet Class", () => { id: walletId, network_id, default_address: newAddressModel(walletId), + index: 0, }; return { data: apiResponses[walletId] }; }); @@ -75,8 +119,358 @@ describe("Wallet Class", () => { Coinbase.useServerSigner = false; }); - describe(".createTransfer", () => { - let weiAmount, destination, intervalSeconds, timeoutSeconds; + describe("#stakingOperation", () => { + let walletModel: WalletModel; + const addressID = "0xdeadbeef"; + const STAKING_OPERATION_MODEL: StakingOperationModel = { + id: randomUUID(), + network_id: Coinbase.networks.EthereumHoodi, + address_id: addressID, + status: StakingOperationStatusEnum.Complete, + transactions: [ + { + from_address_id: addressID, + network_id: Coinbase.networks.EthereumHoodi, + status: "pending", + unsigned_payload: + "7b2274797065223a22307832222c22636861696e4964223a22307834323638222c226e6f" + + "6e6365223a2230783137222c22746f223a22307861353534313664653564653631613061" + + "633161613839373061323830653034333838623164653462222c22676173223a22307833" + + "30643430222c226761735072696365223a6e756c6c2c226d61785072696f726974794665" + + "65506572476173223a223078323534306265343030222c226d6178466565506572476173" + + "223a223078326437313162383430222c2276616c7565223a223078356166333130376134" + + "303030222c22696e707574223a2230783361346236366631222c226163636573734c6973" + + "74223a5b5d2c2276223a22307830222c2272223a22307830222c2273223a22307830222c" + + "2279506172697479223a22307830222c2268617368223a22307839613034353830343332" + + "646630666334656139646164653561343836353433623831666239333833316430646239" + + "386263356436373834393339343866333432227d", + }, + ], + }; + + const STAKING_CONTEXT_MODEL: StakingContextModel = { + context: { + stakeable_balance: { + amount: "3000000000000000000", + asset: { + asset_id: Coinbase.assets.Eth, + network_id: Coinbase.networks.EthereumHoodi, + decimals: 18, + contract_address: "0x", + }, + }, + unstakeable_balance: { + amount: "2000000000000000000", + asset: { + asset_id: Coinbase.assets.Eth, + network_id: Coinbase.networks.EthereumHoodi, + decimals: 18, + contract_address: "0x", + }, + }, + pending_claimable_balance: { + amount: "1000000000000000000", + asset: { + asset_id: Coinbase.assets.Eth, + network_id: Coinbase.networks.EthereumHoodi, + decimals: 18, + contract_address: "0x", + }, + }, + claimable_balance: { + amount: "1000000000000000000", + asset: { + asset_id: Coinbase.assets.Eth, + network_id: Coinbase.networks.EthereumHoodi, + decimals: 18, + contract_address: "0x", + }, + }, + }, + }; + + const STAKING_REWARD_RESPONSE: FetchStakingRewards200Response = { + data: [ + { + address_id: addressID, + date: "2024-05-01", + amount: "361", + state: StakingRewardStateEnum.Pending, + format: StakingRewardFormat.Usd, + usd_value: { + amount: "361", + conversion_price: "3000", + conversion_time: "2024-05-01T00:00:00Z", + }, + }, + { + address_id: addressID, + date: "2024-05-02", + amount: "203", + state: StakingRewardStateEnum.Pending, + format: StakingRewardFormat.Usd, + usd_value: { + amount: "203", + conversion_price: "3000", + conversion_time: "2024-05-02T00:00:00Z", + }, + }, + { + address_id: addressID, + date: "2024-05-03", + amount: "226", + state: StakingRewardStateEnum.Pending, + format: StakingRewardFormat.Usd, + usd_value: { + amount: "226", + conversion_price: "3000", + conversion_time: "2024-05-03T00:00:00Z", + }, + }, + ], + has_more: false, + next_page: "", + }; + + const HISTORICAL_STAKING_BALANCES_RESPONSE: FetchHistoricalStakingBalances200Response = { + data: [ + { + address: addressID, + date: "2024-05-01", + bonded_stake: { + amount: "32000000000000000000", + asset: { + asset_id: Coinbase.assets.Eth, + network_id: Coinbase.networks.EthereumHoodi, + decimals: 18, + }, + }, + unbonded_balance: { + amount: "2000000000000000000", + asset: { + asset_id: Coinbase.assets.Eth, + network_id: Coinbase.networks.EthereumHoodi, + decimals: 18, + }, + }, + participant_type: "validator", + }, + { + address: addressID, + date: "2024-05-02", + bonded_stake: { + amount: "32000000000000000000", + asset: { + asset_id: Coinbase.assets.Eth, + network_id: Coinbase.networks.EthereumHoodi, + decimals: 18, + }, + }, + unbonded_balance: { + amount: "2000000000000000000", + asset: { + asset_id: Coinbase.assets.Eth, + network_id: Coinbase.networks.EthereumHoodi, + decimals: 18, + }, + }, + participant_type: "validator", + }, + ], + has_more: false, + next_page: "", + }; + + beforeAll(() => { + Coinbase.apiClients.stake = stakeApiMock; + Coinbase.apiClients.walletStake = walletStakeApiMock; + Coinbase.apiClients.asset = assetsApiMock; + }); + + beforeEach(() => { + jest.clearAllMocks(); + }); + + describe(".createStake", () => { + it("should create a staking operation from the default address", async () => { + const wallet = await Wallet.create({ networkId: Coinbase.networks.EthereumHoodi }); + STAKING_OPERATION_MODEL.wallet_id = wallet.getId(); + Coinbase.apiClients.asset!.getAsset = getAssetMock(); + Coinbase.apiClients.stake!.getStakingContext = mockReturnValue(STAKING_CONTEXT_MODEL); + Coinbase.apiClients.walletStake!.createStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + Coinbase.apiClients.walletStake!.broadcastStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + STAKING_OPERATION_MODEL.status = StakingOperationStatusEnum.Complete; + Coinbase.apiClients.walletStake!.getStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + + const op = await wallet.createStake(0.001, Coinbase.assets.Eth); + + expect(op).toBeInstanceOf(StakingOperation); + }); + + it("should throw an error when wait is called on wallet address based staking operation", async () => { + const wallet = await Wallet.create({ networkId: Coinbase.networks.EthereumHoodi }); + const op = await wallet.createStake(0.001, Coinbase.assets.Eth); + expect(op).toBeInstanceOf(StakingOperation); + await expect(async () => await op.wait()).rejects.toThrow(Error); + }); + + it("should fail when reloading without a wallet id", async () => { + const stakingOperation = new StakingOperation(STAKING_OPERATION_MODEL); + STAKING_OPERATION_MODEL.wallet_id = undefined; + await expect(async () => await stakingOperation.reload()).rejects.toThrow(Error); + }); + }); + + describe(".createUnstake", () => { + it("should create a staking operation from the default address", async () => { + const wallet = await Wallet.create({ networkId: Coinbase.networks.EthereumHoodi }); + STAKING_OPERATION_MODEL.wallet_id = wallet.getId(); + Coinbase.apiClients.asset!.getAsset = getAssetMock(); + Coinbase.apiClients.stake!.getStakingContext = mockReturnValue(STAKING_CONTEXT_MODEL); + Coinbase.apiClients.walletStake!.createStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + Coinbase.apiClients.walletStake!.broadcastStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + STAKING_OPERATION_MODEL.status = StakingOperationStatusEnum.Complete; + Coinbase.apiClients.walletStake!.getStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + + const op = await wallet.createUnstake(0.001, Coinbase.assets.Eth); + + expect(op).toBeInstanceOf(StakingOperation); + }); + }); + + describe(".createClaimStake", () => { + it("should create a staking operation from the default address", async () => { + const wallet = await Wallet.create({ networkId: Coinbase.networks.EthereumHoodi }); + STAKING_OPERATION_MODEL.wallet_id = wallet.getId(); + Coinbase.apiClients.asset!.getAsset = getAssetMock(); + Coinbase.apiClients.stake!.getStakingContext = mockReturnValue(STAKING_CONTEXT_MODEL); + Coinbase.apiClients.walletStake!.createStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + Coinbase.apiClients.walletStake!.broadcastStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + STAKING_OPERATION_MODEL.status = StakingOperationStatusEnum.Complete; + Coinbase.apiClients.walletStake!.getStakingOperation = + mockReturnValue(STAKING_OPERATION_MODEL); + + const op = await wallet.createClaimStake(0.001, Coinbase.assets.Eth); + + expect(op).toBeInstanceOf(StakingOperation); + }); + }); + + describe(".stakeableBalance", () => { + it("should return the stakeable balance successfully with default params", async () => { + Coinbase.apiClients.stake!.getStakingContext = mockReturnValue(STAKING_CONTEXT_MODEL); + const stakeableBalance = await wallet.stakeableBalance(Coinbase.assets.Eth); + expect(stakeableBalance).toEqual(new Decimal("3")); + }); + }); + + describe(".unstakeableBalance", () => { + it("should return the unstakeableBalance balance successfully with default params", async () => { + const wallet = await Wallet.create({ networkId: Coinbase.networks.EthereumHoodi }); + Coinbase.apiClients.stake!.getStakingContext = mockReturnValue(STAKING_CONTEXT_MODEL); + const stakeableBalance = await wallet.unstakeableBalance(Coinbase.assets.Eth); + expect(stakeableBalance).toEqual(new Decimal("2")); + }); + }); + + describe(".claimableBalance", () => { + it("should return the claimableBalance balance successfully with default params", async () => { + const wallet = await Wallet.create({ networkId: Coinbase.networks.EthereumHoodi }); + Coinbase.apiClients.stake!.getStakingContext = mockReturnValue(STAKING_CONTEXT_MODEL); + const stakeableBalance = await wallet.claimableBalance(Coinbase.assets.Eth); + expect(stakeableBalance).toEqual(new Decimal("1")); + }); + }); + + describe(".stakingRewards", () => { + it("should successfully return staking rewards", async () => { + const wallet = await Wallet.create({ networkId: Coinbase.networks.EthereumHoodi }); + Coinbase.apiClients.stake!.fetchStakingRewards = mockReturnValue(STAKING_REWARD_RESPONSE); + Coinbase.apiClients.asset!.getAsset = getAssetMock(); + const response = await wallet.stakingRewards(Coinbase.assets.Eth); + expect(response).toBeInstanceOf(Array); + }); + }); + + describe(".historicalStakingBalances", () => { + it("should successfully return historical staking balances", async () => { + const wallet = await Wallet.create({ networkId: Coinbase.networks.EthereumHoodi }); + Coinbase.apiClients.stake!.fetchHistoricalStakingBalances = mockReturnValue( + HISTORICAL_STAKING_BALANCES_RESPONSE, + ); + Coinbase.apiClients.asset!.getAsset = getAssetMock(); + const response = await wallet.historicalStakingBalances(Coinbase.assets.Eth); + expect(response).toBeInstanceOf(Array); + expect(response.length).toEqual(2); + expect(response[0].bondedStake().amount).toEqual(new Decimal("32")); + expect(response[0].bondedStake().asset?.assetId).toEqual("eth"); + expect(response[0].bondedStake().asset?.decimals).toEqual(18); + expect(response[0].bondedStake().asset?.networkId).toEqual(Coinbase.networks.EthereumHoodi); + expect(response[0].unbondedBalance().amount).toEqual(new Decimal("2")); + expect(response[0].unbondedBalance().asset?.assetId).toEqual("eth"); + expect(response[0].unbondedBalance().asset?.decimals).toEqual(18); + expect(response[0].unbondedBalance().asset?.networkId).toEqual( + Coinbase.networks.EthereumHoodi, + ); + }); + }); + }); + + describe(".listHistoricalBalances", () => { + beforeEach(() => { + const mockHistoricalBalanceResponse: AddressHistoricalBalanceList = { + data: [ + { + amount: "1000000", + block_hash: "0x0dadd465fb063ceb78babbb30abbc6bfc0730d0c57a53e8f6dc778dafcea568f", + block_height: "12345", + asset: { + asset_id: "usdc", + network_id: Coinbase.networks.EthereumHoodi, + decimals: 6, + }, + }, + { + amount: "5000000", + block_hash: "0x5c05a37dcb4910b22a775fc9480f8422d9d615ad7a6a0aa9d8778ff8cc300986", + block_height: "67890", + asset: { + asset_id: "usdc", + network_id: Coinbase.networks.EthereumHoodi, + decimals: 6, + }, + }, + ], + has_more: false, + next_page: "", + }; + Coinbase.apiClients.balanceHistory = balanceHistoryApiMock; + Coinbase.apiClients.balanceHistory!.listAddressHistoricalBalance = mockReturnValue( + mockHistoricalBalanceResponse, + ); + }); + + it("should successfully return historical balances", async () => { + const wallet = await Wallet.create({ networkId: Coinbase.networks.EthereumHoodi }); + Coinbase.apiClients.asset!.getAsset = getAssetMock(); + const response = await wallet.listHistoricalBalances(Coinbase.assets.Usdc); + expect(response.data.length).toEqual(2); + expect(response.data[0].amount).toEqual(new Decimal(1)); + expect(response.data[1].amount).toEqual(new Decimal(5)); + expect(response.nextPage).toBe(undefined); + }); + }); + + describe("#createTransfer", () => { + let weiAmount, destination; let balanceModel: BalanceModel; beforeEach(() => { @@ -84,12 +478,11 @@ describe("Wallet Class", () => { const key = ethers.Wallet.createRandom(); weiAmount = new Decimal("5"); destination = new WalletAddress(VALID_ADDRESS_MODEL, key as unknown as ethers.Wallet); - intervalSeconds = 0.2; - timeoutSeconds = 10; + Coinbase.apiClients.externalAddress = externalAddressApiMock; Coinbase.apiClients.asset = assetsApiMock; Coinbase.apiClients.asset!.getAsset = getAssetMock(); - Coinbase.apiClients.address!.getAddressBalance = mockFn(request => { + Coinbase.apiClients.externalAddress.getExternalAddressBalance = mockFn(request => { const { asset_id } = request; balanceModel = { amount: "5000000000000000000", @@ -106,27 +499,24 @@ describe("Wallet Class", () => { Coinbase.apiClients.transfer = transfersApiMock; }); - it("should successfully create and complete a transfer", async () => { + it("should successfully create a transfer", async () => { Coinbase.apiClients.transfer!.createTransfer = mockReturnValue(VALID_TRANSFER_MODEL); Coinbase.apiClients.transfer!.broadcastTransfer = mockReturnValue({ transaction_hash: "0x6c087c1676e8269dd81e0777244584d0cbfd39b6997b3477242a008fa9349e11", ...VALID_TRANSFER_MODEL, }); - Coinbase.apiClients.transfer!.getTransfer = mockReturnValue({ - ...VALID_TRANSFER_MODEL, - status: TransferStatus.COMPLETE, - }); - await wallet.createTransfer({ + + const transfer = await wallet.createTransfer({ amount: weiAmount, assetId: Coinbase.assets.Wei, destination, - timeoutSeconds, - intervalSeconds, }); expect(Coinbase.apiClients.transfer!.createTransfer).toHaveBeenCalledTimes(1); expect(Coinbase.apiClients.transfer!.broadcastTransfer).toHaveBeenCalledTimes(1); - expect(Coinbase.apiClients.transfer!.getTransfer).toHaveBeenCalledTimes(1); + + expect(transfer).toBeInstanceOf(Transfer); + expect(transfer.getId()).toBe(VALID_TRANSFER_MODEL.transfer_id); }); it("should throw an APIError if the createTransfer API call fails", async () => { @@ -138,8 +528,6 @@ describe("Wallet Class", () => { amount: weiAmount, assetId: Coinbase.assets.Wei, destination, - timeoutSeconds, - intervalSeconds, }), ).rejects.toThrow(APIError); }); @@ -154,36 +542,10 @@ describe("Wallet Class", () => { amount: weiAmount, assetId: Coinbase.assets.Wei, destination, - timeoutSeconds, - intervalSeconds, }), ).rejects.toThrow(APIError); }); - it("should throw an Error if the transfer times out", async () => { - Coinbase.apiClients.transfer!.createTransfer = mockReturnValue(VALID_TRANSFER_MODEL); - Coinbase.apiClients.transfer!.broadcastTransfer = mockReturnValue({ - transaction_hash: "0x6c087c1676e8269dd81e0777244584d0cbfd39b6997b3477242a008fa9349e11", - ...VALID_TRANSFER_MODEL, - }); - Coinbase.apiClients.transfer!.getTransfer = mockReturnValue({ - ...VALID_TRANSFER_MODEL, - status: TransferStatus.BROADCAST, - }); - intervalSeconds = 0.000002; - timeoutSeconds = 0.000002; - - await expect( - wallet.createTransfer({ - amount: weiAmount, - assetId: Coinbase.assets.Wei, - destination, - timeoutSeconds, - intervalSeconds, - }), - ).rejects.toThrow("Transfer timed out"); - }); - it("should throw an ArgumentError if there are insufficient funds", async () => { const insufficientAmount = new Decimal("10000000000000000000"); await expect( @@ -191,30 +553,24 @@ describe("Wallet Class", () => { amount: insufficientAmount, assetId: Coinbase.assets.Wei, destination, - timeoutSeconds, - intervalSeconds, }), ).rejects.toThrow(ArgumentError); }); - it("should successfully create and complete a transfer when using server signer", async () => { + it("should successfully create a transfer when using server signer", async () => { Coinbase.useServerSigner = true; Coinbase.apiClients.transfer!.createTransfer = mockReturnValue(VALID_TRANSFER_MODEL); - Coinbase.apiClients.transfer!.getTransfer = mockReturnValue({ - ...VALID_TRANSFER_MODEL, - status: TransferStatus.COMPLETE, - }); - await wallet.createTransfer({ + const transfer = await wallet.createTransfer({ amount: weiAmount, assetId: Coinbase.assets.Wei, destination, - timeoutSeconds, - intervalSeconds, }); expect(Coinbase.apiClients.transfer!.createTransfer).toHaveBeenCalledTimes(1); - expect(Coinbase.apiClients.transfer!.getTransfer).toHaveBeenCalledTimes(1); + + expect(transfer).toBeInstanceOf(Transfer); + expect(transfer.getId()).toBe(VALID_TRANSFER_MODEL.transfer_id); }); afterEach(() => { @@ -222,6 +578,224 @@ describe("Wallet Class", () => { }); }); + describe("#invokeContract", () => { + let expectedInvocation; + const options = { + abi: MINT_NFT_ABI, + args: MINT_NFT_ARGS, + method: VALID_SIGNED_CONTRACT_INVOCATION_MODEL.method, + contractAddress: VALID_SIGNED_CONTRACT_INVOCATION_MODEL.contract_address, + }; + + beforeEach(async () => { + expectedInvocation = ContractInvocation.fromModel(VALID_SIGNED_CONTRACT_INVOCATION_MODEL); + + (await wallet.getDefaultAddress()).invokeContract = jest + .fn() + .mockResolvedValue(expectedInvocation); + }); + + it("successfully invokes a contract on the default address", async () => { + const contractInvocation = await wallet.invokeContract(options); + + expect((await wallet.getDefaultAddress()).invokeContract).toHaveBeenCalledTimes(1); + expect((await wallet.getDefaultAddress()).invokeContract).toHaveBeenCalledWith(options); + + expect(contractInvocation).toBeInstanceOf(ContractInvocation); + expect(contractInvocation).toEqual(expectedInvocation); + }); + }); + + describe("#faucet", () => { + let expectedFaucetTx; + + beforeEach(async () => { + expectedFaucetTx = new FaucetTransaction(VALID_FAUCET_TRANSACTION_MODEL); + + (await wallet.getDefaultAddress()).faucet = jest.fn().mockResolvedValue(expectedFaucetTx); + }); + + it("successfully requests faucet funds", async () => { + const faucetTx = await wallet.faucet(); + + expect((await wallet.getDefaultAddress()).faucet).toHaveBeenCalledTimes(1); + expect((await wallet.getDefaultAddress()).faucet).toHaveBeenCalledWith(undefined); + + expect(faucetTx).toBeInstanceOf(FaucetTransaction); + expect(faucetTx).toEqual(expectedFaucetTx); + }); + + it("successfully requests faucet funds with an asset specified", async () => { + const faucetTx = await wallet.faucet("usdc"); + + expect((await wallet.getDefaultAddress()).faucet).toHaveBeenCalledTimes(1); + expect((await wallet.getDefaultAddress()).faucet).toHaveBeenCalledWith("usdc"); + + expect(faucetTx).toBeInstanceOf(FaucetTransaction); + expect(faucetTx).toEqual(expectedFaucetTx); + }); + }); + + describe("#deployToken", () => { + let expectedSmartContract; + const options = { + name: ERC20_NAME, + symbol: ERC20_SYMBOL, + totalSupply: ERC20_TOTAL_SUPPLY, + }; + + beforeEach(async () => { + expectedSmartContract = SmartContract.fromModel(VALID_SMART_CONTRACT_ERC20_MODEL); + + (await wallet.getDefaultAddress()).deployToken = jest + .fn() + .mockResolvedValue(expectedSmartContract); + }); + + it("successfully deploys an ERC20 contract on the default address", async () => { + const smartContract = await wallet.deployToken(options); + + expect((await wallet.getDefaultAddress()).deployToken).toHaveBeenCalledTimes(1); + expect((await wallet.getDefaultAddress()).deployToken).toHaveBeenCalledWith(options); + + expect(smartContract).toBeInstanceOf(SmartContract); + expect(smartContract).toEqual(expectedSmartContract); + }); + }); + + describe("#deployNFT", () => { + let expectedSmartContract; + const options = { + name: ERC721_NAME, + symbol: ERC721_SYMBOL, + baseURI: ERC721_BASE_URI, + }; + + beforeEach(async () => { + expectedSmartContract = SmartContract.fromModel(VALID_SMART_CONTRACT_ERC721_MODEL); + + (await wallet.getDefaultAddress()).deployNFT = jest + .fn() + .mockResolvedValue(expectedSmartContract); + }); + + it("successfully deploys an ERC721 contract on the default address", async () => { + const smartContract = await wallet.deployNFT(options); + + expect((await wallet.getDefaultAddress()).deployNFT).toHaveBeenCalledTimes(1); + expect((await wallet.getDefaultAddress()).deployNFT).toHaveBeenCalledWith(options); + + expect(smartContract).toBeInstanceOf(SmartContract); + expect(smartContract).toEqual(expectedSmartContract); + }); + }); + + describe("#deployMultiToken", () => { + let expectedSmartContract; + const options = { + uri: "https://example.com/metadata", + }; + + beforeEach(async () => { + expectedSmartContract = SmartContract.fromModel(VALID_SMART_CONTRACT_ERC1155_MODEL); + + (await wallet.getDefaultAddress()).deployMultiToken = jest + .fn() + .mockResolvedValue(expectedSmartContract); + }); + + it("successfully deploys an ERC1155 contract on the default address", async () => { + const smartContract = await wallet.deployMultiToken(options); + + expect((await wallet.getDefaultAddress()).deployMultiToken).toHaveBeenCalledTimes(1); + expect((await wallet.getDefaultAddress()).deployMultiToken).toHaveBeenCalledWith(options); + + expect(smartContract).toBeInstanceOf(SmartContract); + expect(smartContract).toEqual(expectedSmartContract); + }); + }); + + describe("#deployContract", () => { + let expectedSmartContract; + const options = { + solidityVersion: "0.8.0", + solidityInputJson: "{}", + contractName: "TestContract", + constructorArgs: ["arg1", "arg2"], + }; + + beforeEach(async () => { + expectedSmartContract = SmartContract.fromModel(VALID_SMART_CONTRACT_CUSTOM_MODEL); + + (await wallet.getDefaultAddress()).deployContract = jest + .fn() + .mockResolvedValue(expectedSmartContract); + }); + + it("successfully deploys a custom contract on the default address", async () => { + const smartContract = await wallet.deployContract(options); + + expect((await wallet.getDefaultAddress()).deployContract).toHaveBeenCalledTimes(1); + expect((await wallet.getDefaultAddress()).deployContract).toHaveBeenCalledWith(options); + + expect(smartContract).toBeInstanceOf(SmartContract); + expect(smartContract).toEqual(expectedSmartContract); + }); + }); + + describe("#createPayloadSignature", () => { + const unsignedPayload = VALID_SIGNED_PAYLOAD_SIGNATURE_MODEL.unsigned_payload; + const signature = + "0xa4e14b28d86dfd7bae739d724ba2ffb13b4458d040930b805eea0a4bc2f5251e7901110677d1ef2ec23ef810c755d0bc72cc6472a4cfb3c53ef242c6ba9fa60a1b"; + + beforeAll(() => { + Coinbase.apiClients.address = addressesApiMock; + }); + + beforeEach(() => { + jest.clearAllMocks(); + }); + + it("should successfully create a payload signature", async () => { + Coinbase.apiClients.address!.createPayloadSignature = mockReturnValue( + VALID_SIGNED_PAYLOAD_SIGNATURE_MODEL, + ); + + const payloadSignature = await wallet.createPayloadSignature(unsignedPayload); + + expect(Coinbase.apiClients.address!.createPayloadSignature).toHaveBeenCalledWith( + wallet.getId(), + (await wallet.getDefaultAddress()).getId(), + { + unsigned_payload: unsignedPayload, + signature, + }, + ); + expect(Coinbase.apiClients.address!.createPayloadSignature).toHaveBeenCalledTimes(1); + expect(payloadSignature).toBeInstanceOf(PayloadSignature); + }); + + it("should throw an APIError when the API call to create a payload signature fails", async () => { + Coinbase.apiClients.address!.createPayloadSignature = mockReturnRejectedValue( + new APIError("Failed to create payload signature"), + ); + + expect(async () => { + await wallet.createPayloadSignature(unsignedPayload); + }).rejects.toThrow(Error); + + expect(Coinbase.apiClients.address!.createPayloadSignature).toHaveBeenCalledWith( + wallet.getId(), + (await wallet.getDefaultAddress()).getId(), + { + unsigned_payload: unsignedPayload, + signature, + }, + ); + expect(Coinbase.apiClients.address!.createPayloadSignature).toHaveBeenCalledTimes(1); + }); + }); + describe(".create", () => { beforeEach(() => {}); it("should return a Wallet instance", async () => { @@ -236,7 +810,8 @@ describe("Wallet Class", () => { describe("#getNetworkId", () => { let wallet; - let network_id = Coinbase.networks.BaseMainnet; + let network_id; + let createWalletParams; beforeEach(async () => { Coinbase.apiClients.wallet = walletsApiMock; @@ -252,27 +827,27 @@ describe("Wallet Class", () => { server_signer_status: ServerSignerStatus.ACTIVE, }); Coinbase.apiClients.address!.createAddress = mockReturnValue(newAddressModel(walletId)); - const createWalletParams = - network_id === Coinbase.networks.BaseMainnet - ? { - networkId: network_id, - } - : undefined; + wallet = await Wallet.create(createWalletParams); }); describe("when a network is specified", () => { beforeAll(() => { network_id = Coinbase.networks.BaseMainnet; + createWalletParams = { networkId: network_id }; }); + it("it creates a wallet scoped to the specified network", () => { expect(wallet.getNetworkId()).toBe(Coinbase.networks.BaseMainnet); }); }); + describe("when no network is specified", () => { beforeAll(() => { network_id = Coinbase.networks.BaseSepolia; + createWalletParams = {}; }); + it("it creates a wallet scoped to the default network", () => { expect(wallet.getNetworkId()).toBe(Coinbase.networks.BaseSepolia); }); @@ -281,7 +856,9 @@ describe("Wallet Class", () => { describe("#getDefaultAddress", () => { it("should return the correct default address", async () => { - expect(wallet.getDefaultAddress()!.getId()).toBe(walletModel.default_address!.address_id); + expect((await wallet.getDefaultAddress()).getId()).toBe( + walletModel.default_address!.address_id, + ); }); }); @@ -289,7 +866,7 @@ describe("Wallet Class", () => { expect(wallet.canSign()).toBe(true); }); - it("should throw InternalError if derived key is not valid", async () => { + it("should throw Error if derived key is not valid", async () => { Coinbase.apiClients.address!.listAddresses = mockFn(() => { return { data: { @@ -300,7 +877,26 @@ describe("Wallet Class", () => { }, }; }); - await expect(wallet.listAddresses()).rejects.toThrow(InternalError); + await expect(wallet.listAddresses()).rejects.toThrow(Error); + }); + it("should succeed when addresses are returned out of order", async () => { + const addresses = await newAddressModelsFromWallet(wallet.getId()!, wallet.export().seed); + Coinbase.apiClients.address!.listAddresses = mockFn(() => { + return { + data: { + data: [addresses[1], addresses[0]], // out of order + has_more: false, + next_page: "", + total_count: 1, + }, + }; + }); + + const response = await wallet.listAddresses(); + expect(response).toBeInstanceOf(Array); + expect(response).toHaveLength(2); + expect(response[0].getId()).toBe(addresses[1].address_id); + expect(response[1].getId()).toBe(addresses[0].address_id); }); it("should create new address and update the existing address list", async () => { @@ -313,7 +909,7 @@ describe("Wallet Class", () => { mockListAddress(existingSeed, 2); addresses = await wallet.listAddresses(); expect(addresses.length).toBe(2); - expect(wallet.getAddress(newAddress.getId())!.getId()).toBe(newAddress.getId()); + expect((await wallet.getAddress(newAddress.getId()))!.getId()).toBe(newAddress.getId()); expect(Coinbase.apiClients.address!.createAddress).toHaveBeenCalledTimes(1); }); @@ -377,19 +973,21 @@ describe("Wallet Class", () => { network_id: Coinbase.networks.BaseSepolia, public_key: wallet1PrivateKey, wallet_id: walletId, + index: 0, }, { address_id: address2, network_id: Coinbase.networks.BaseSepolia, public_key: wallet2PrivateKey, wallet_id: walletId, + index: 1, }, ]; walletModel = { id: walletId, network_id: Coinbase.networks.BaseSepolia, default_address: addressList[0], - enabled_features: [], + feature_set: {} as FeatureSet, }; wallet = Wallet.init(walletModel, existingSeed); Coinbase.apiClients.address!.createAddress = mockFn(walletId => { @@ -410,15 +1008,6 @@ describe("Wallet Class", () => { }); }); - it("should throw an error when the wallet does not have a default address", async () => { - const wallet = Wallet.init({ - id: walletId, - network_id: Coinbase.networks.BaseSepolia, - enabled_features: [], - }); - await expect(async () => await wallet.faucet()).rejects.toThrow(InternalError); - }); - it("should return a Wallet instance", async () => { expect(wallet).toBeInstanceOf(Wallet); }); @@ -446,7 +1035,7 @@ describe("Wallet Class", () => { expect(newAddress).toBeInstanceOf(WalletAddress); addresses = await wallet.listAddresses(); expect(addresses.length).toBe(3); - expect(wallet.getAddress(newAddress.getId())!.getId()).toBe(newAddress.getId()); + expect((await wallet.getAddress(newAddress.getId()))!.getId()).toBe(newAddress.getId()); }); it("should return the correct string representation", async () => { @@ -460,20 +1049,6 @@ describe("Wallet Class", () => { expect(() => newWallet.setSeed(``)).toThrow(ArgumentError); expect(() => newWallet.setSeed(`invalid-seed`)).toThrow(ArgumentError); }); - - it("should raise an error when creating a wallet with an invalid network", async () => { - const newWallet = Wallet.init( - { - ...walletModel, - network_id: "invalid_network_id", - }, - "", - ); - newWallet.setSeed(existingSeed); - await expect(newWallet.createAddress()).rejects.toThrow( - "Unsupported network ID: invalid_network_id", - ); - }); }); describe("#export", () => { @@ -490,7 +1065,7 @@ describe("Wallet Class", () => { id: walletId, network_id: Coinbase.networks.BaseSepolia, default_address: addressModel, - enabled_features: [], + feature_set: {} as FeatureSet, }; Coinbase.apiClients.address = addressesApiMock; Coinbase.apiClients.address!.getAddress = mockFn(() => { @@ -513,12 +1088,126 @@ describe("Wallet Class", () => { it("throws an error when the Wallet is seedless", async () => { const seedlessWallet = Wallet.init(walletModel, ""); - expect(() => seedlessWallet.export()).toThrow(InternalError); + expect(() => seedlessWallet.export()).toThrow(Error); }); it("should return true for canSign when the wallet is initialized with a seed", () => { expect(wallet.canSign()).toBe(true); }); + + it("should be able to be imported", async () => { + const walletData = seedWallet.export(); + const importedWallet = await Wallet.import(walletData); + expect(importedWallet).toBeInstanceOf(Wallet); + expect(Coinbase.apiClients.address!.listAddresses).toHaveBeenCalledTimes(1); + }); + it("should throw an error when walletId is not provided", async () => { + const walletData = seedWallet.export(); + walletData.walletId = ""; + await expect(async () => await Wallet.import(walletData)).rejects.toThrow( + "Wallet ID must be provided", + ); + }); + it("should throw an error when seed is not provided", async () => { + const walletData = seedWallet.export(); + walletData.seed = ""; + await expect(async () => await Wallet.import(walletData)).rejects.toThrow( + "Seed must be provided", + ); + }); + it("should throw an error when both walletId and wallet_id are provided", async () => { + const walletData = seedWallet.export(); + walletData.wallet_id = walletData.walletId; + await expect(async () => await Wallet.import(walletData)).rejects.toThrow( + "Invalid import data format", + ); + }); + it("should throw an error when wallet data format is invalid", async () => { + const invalidWalletData = { + foo: "bar", + bar: 123, + } as unknown as WalletData; + await expect(async () => await Wallet.import(invalidWalletData)).rejects.toThrow( + "Invalid import data format", + ); + }); + }); + + describe("#importFromMnemonicSeedPhrase", () => { + const validMnemonic = + "crouch cereal notice one canyon kiss tape employ ghost column vanish despair eight razor laptop keen rally gaze riot regret assault jacket risk curve"; + const address0 = "0x43A0477E658C6e05136e81C576CF02daCEa067bB"; + const publicKey = "0x037e6cbdd1d949f60f41d5db7ffa9b3ddce0b77eab35ef7affd3f64cbfd9e33a91"; + const addressModel = { + ...VALID_ADDRESS_MODEL, + address_id: address0, + public_key: publicKey, + }; + + beforeEach(() => { + jest.clearAllMocks(); + Coinbase.apiClients.wallet = walletsApiMock; + Coinbase.apiClients.address = addressesApiMock; + Coinbase.apiClients.wallet!.createWallet = mockFn(request => { + const { network_id } = request.wallet; + apiResponses[walletId] = { + id: walletId, + network_id, + default_address: addressModel, + }; + return { data: apiResponses[walletId] }; + }); + Coinbase.apiClients.wallet!.getWallet = mockFn(walletId => { + walletModel = apiResponses[walletId]; + walletModel.default_address!.address_id = address0; + return { data: apiResponses[walletId] }; + }); + Coinbase.apiClients.address!.createAddress = mockReturnValue(addressModel); + Coinbase.apiClients.address!.listAddresses = mockFn(() => { + return { + data: { + data: [addressModel], + has_more: false, + next_page: "", + total_count: 1, + }, + }; + }); + }); + + it("successfully imports a wallet from a valid 24-word mnemonic", async () => { + const wallet = await Wallet.import({ mnemonicPhrase: validMnemonic }); + expect(wallet).toBeInstanceOf(Wallet); + expect(Coinbase.apiClients.wallet!.createWallet).toHaveBeenCalledTimes(1); + expect(Coinbase.apiClients.address!.createAddress).toHaveBeenCalledTimes(1); + expect(Coinbase.apiClients.address!.listAddresses).toHaveBeenCalledTimes(1); + }); + + it("successfully imports a wallet from a valid 24-word mnemonic on base-mainnet", async () => { + const wallet = await Wallet.import( + { mnemonicPhrase: validMnemonic }, + Coinbase.networks.BaseMainnet, + ); + expect(wallet).toBeInstanceOf(Wallet); + expect(wallet.getNetworkId()).toEqual(Coinbase.networks.BaseMainnet); + expect(Coinbase.apiClients.wallet!.createWallet).toHaveBeenCalledTimes(1); + expect(Coinbase.apiClients.address!.createAddress).toHaveBeenCalledTimes(1); + expect(Coinbase.apiClients.address!.listAddresses).toHaveBeenCalledTimes(1); + }); + + it("throws an error when mnemonic is empty", async () => { + await expect(Wallet.import({ mnemonicPhrase: "" })).rejects.toThrow( + "BIP-39 mnemonic seed phrase must be provided", + ); + expect(Coinbase.apiClients.wallet!.createWallet).not.toHaveBeenCalled(); + }); + + it("throws an error when mnemonic is invalid", async () => { + await expect(Wallet.import({ mnemonicPhrase: "invalid mnemonic phrase" })).rejects.toThrow( + "Invalid BIP-39 mnemonic seed phrase", + ); + expect(Coinbase.apiClients.wallet!.createWallet).not.toHaveBeenCalled(); + }); }); describe("#listBalances", () => { @@ -684,17 +1373,18 @@ describe("Wallet Class", () => { }); it("should save the seed when encryption is false", async () => { - seedWallet.saveSeed(filePath, false); + seedWallet.saveSeedToFile(filePath, false); const storedSeedData = fs.readFileSync(filePath); const walletSeedData = JSON.parse(storedSeedData.toString()); expect(walletSeedData[walletId].encrypted).toBe(false); expect(walletSeedData[walletId].iv).toBe(""); expect(walletSeedData[walletId].authTag).toBe(""); expect(walletSeedData[walletId].seed).toBe(seed); + expect(walletSeedData[walletId].networkId).toBe(seedWallet.getNetworkId()); }); it("should save the seed when encryption is true", async () => { - seedWallet.saveSeed(filePath, true); + seedWallet.saveSeedToFile(filePath, true); const storedSeedData = fs.readFileSync(filePath); const walletSeedData = JSON.parse(storedSeedData.toString()); expect(walletSeedData[walletId].encrypted).toBe(true); @@ -705,11 +1395,60 @@ describe("Wallet Class", () => { it("should throw an error when the wallet is seedless", async () => { const seedlessWallet = Wallet.init(walletModel, ""); - expect(() => seedlessWallet.saveSeed(filePath, false)).toThrow(InternalError); + expect(() => seedlessWallet.saveSeedToFile(filePath, false)).toThrow(Error); + }); + + describe("#saveSeedToFile: correctly merges seed data and handles malformed JSON errors", () => { + const filePath = "test_seeds.json"; + let walletForSave: Wallet; + let originalFileContent: string | null = null; + + beforeEach(() => { + try { + originalFileContent = fs.readFileSync(filePath, "utf8"); + } catch {} + fs.writeFileSync(filePath, JSON.stringify({}), "utf8"); + walletForSave = Wallet.init(walletModel, seed); + }); + + afterEach(() => { + try { + fs.unlinkSync(filePath); + } catch {} + if (originalFileContent !== null) { + fs.writeFileSync(filePath, originalFileContent, "utf8"); + } + }); + + it("should merge new seed data with existing seed data in file", () => { + const otherWalletId = crypto.randomUUID(); + const otherSeedData = { + [otherWalletId]: { + seed: "abcdef", + encrypted: false, + iv: "", + authTag: "", + networkId: Coinbase.networks.BaseSepolia, + }, + }; + fs.writeFileSync(filePath, JSON.stringify(otherSeedData), "utf8"); + + const result = walletForSave.saveSeedToFile(filePath, false); + const storedData = JSON.parse(fs.readFileSync(filePath, "utf8")); + expect(Object.keys(storedData).length).toBe(2); + expect(storedData[walletForSave.getId()!].seed).toBe(seed); + expect(storedData[otherWalletId].seed).toBe("abcdef"); + expect(result).toContain(`Successfully saved seed for ${walletForSave.getId()}`); + }); + + it("should throw an error when the seed file contains malformed JSON", () => { + fs.writeFileSync(filePath, "not a valid json", "utf8"); + expect(() => walletForSave.saveSeedToFile(filePath, false)).toThrow(ArgumentError); + }); }); }); - describe(".loadSeed", () => { + describe("#loadSeed", () => { const seed = "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f"; let apiPrivateKey; const filePath = "seeds.json"; @@ -743,34 +1482,34 @@ describe("Wallet Class", () => { }); it("loads the seed from the file", async () => { - await seedlessWallet.loadSeed(filePath); + await seedlessWallet.loadSeedFromFile(filePath); expect(seedlessWallet.canSign()).toBe(true); }); it("loads the encrypted seed from the file", async () => { - seedWallet.saveSeed(filePath, true); - await seedlessWallet.loadSeed(filePath); + seedWallet.saveSeedToFile(filePath, true); + await seedlessWallet.loadSeedFromFile(filePath); expect(seedlessWallet.canSign()).toBe(true); }); it("loads the encrypted seed from the file with multiple seeds", async () => { - seedWallet.saveSeed(filePath, true); + seedWallet.saveSeedToFile(filePath, true); const otherModel = { id: crypto.randomUUID(), network_id: Coinbase.networks.BaseSepolia, - enabled_features: [], + feature_set: {} as FeatureSet, }; const randomSeed = ethers.Wallet.createRandom().privateKey.slice(2); const otherWallet = Wallet.init(otherModel, randomSeed); - otherWallet.saveSeed(filePath, true); + otherWallet.saveSeedToFile(filePath, true); - await seedlessWallet.loadSeed(filePath); + await seedlessWallet.loadSeedFromFile(filePath); expect(seedlessWallet.canSign()).toBe(true); }); it("raises an error if the wallet is already hydrated", async () => { - await expect(seedWallet.loadSeed(filePath)).rejects.toThrow(InternalError); + await expect(seedWallet.loadSeedFromFile(filePath)).rejects.toThrow(Error); }); it("raises an error when file contains different wallet data", async () => { @@ -784,33 +1523,112 @@ describe("Wallet Class", () => { }; fs.writeFileSync(filePath, JSON.stringify(otherSeedData), "utf8"); - await expect(seedlessWallet.loadSeed(filePath)).rejects.toThrow(ArgumentError); + await expect(seedlessWallet.loadSeedFromFile(filePath)).rejects.toThrow(ArgumentError); }); it("raises an error when the file is absent", async () => { - await expect(seedlessWallet.loadSeed("non-file.json")).rejects.toThrow(ArgumentError); + await expect(seedlessWallet.loadSeedFromFile("non-file.json")).rejects.toThrow(ArgumentError); }); it("raises an error when the file is corrupted", async () => { fs.writeFileSync(filePath, "corrupted data", "utf8"); - await expect(seedlessWallet.loadSeed(filePath)).rejects.toThrow(ArgumentError); + await expect(seedlessWallet.loadSeedFromFile(filePath)).rejects.toThrow(ArgumentError); }); it("throws an error when the file is empty", async () => { fs.writeFileSync("invalid-file.json", "", "utf8"); - await expect(wallet.loadSeed("invalid-file.json")).rejects.toThrow(ArgumentError); + await expect(wallet.loadSeedFromFile("invalid-file.json")).rejects.toThrow(ArgumentError); fs.unlinkSync("invalid-file.json"); }); it("throws an error when the file is not a valid JSON", async () => { fs.writeFileSync("invalid-file.json", `{"test":{"authTag":false}}`, "utf8"); - await expect(wallet.loadSeed("invalid-file.json")).rejects.toThrow(ArgumentError); + await expect(wallet.loadSeedFromFile("invalid-file.json")).rejects.toThrow(ArgumentError); fs.unlinkSync("invalid-file.json"); }); + + describe("#loadSeedFromFile: validates seed data integrity and loads unencrypted seed", () => { + const filePath = "test_seeds_load.json"; + let seedlessWalletForLoad: Wallet; + + beforeEach(() => { + seedlessWalletForLoad = Wallet.init(walletModel, ""); + }); + + afterEach(() => { + try { + fs.unlinkSync(filePath); + } catch {} + }); + + it("should throw an error if the seed data in file is missing the seed property", async () => { + const incompleteSeedData = { + [walletModel.id]: { + encrypted: false, + iv: "", + authTag: "", + seed: "", + networkId: Coinbase.networks.BaseSepolia, + }, + }; + fs.writeFileSync(filePath, JSON.stringify(incompleteSeedData), "utf8"); + await expect(seedlessWalletForLoad.loadSeedFromFile(filePath)).rejects.toThrow( + "Seed data is malformed", + ); + }); + + it("should throw an error if encrypted seed data is missing iv", async () => { + const badEncryptedData = { + [walletModel.id]: { + encrypted: true, + iv: "", + authTag: "someauthtag", + seed: "deadbeef", + networkId: Coinbase.networks.BaseSepolia, + }, + }; + fs.writeFileSync(filePath, JSON.stringify(badEncryptedData), "utf8"); + await expect(seedlessWalletForLoad.loadSeedFromFile(filePath)).rejects.toThrow( + "Encrypted seed data is malformed", + ); + }); + + it("should throw an error if encrypted seed data is missing authTag", async () => { + const badEncryptedData = { + [walletModel.id]: { + encrypted: true, + iv: "abcdef123456", + authTag: "", + seed: "deadbeef", + networkId: Coinbase.networks.BaseSepolia, + }, + }; + fs.writeFileSync(filePath, JSON.stringify(badEncryptedData), "utf8"); + await expect(seedlessWalletForLoad.loadSeedFromFile(filePath)).rejects.toThrow( + "Encrypted seed data is malformed", + ); + }); + + it("should successfully load an unencrypted seed and set the wallet master", async () => { + const seedData = { + [walletModel.id]: { + encrypted: false, + iv: "", + authTag: "", + seed, + networkId: Coinbase.networks.BaseSepolia, + }, + }; + fs.writeFileSync(filePath, JSON.stringify(seedData), "utf8"); + const msg = await seedlessWalletForLoad.loadSeedFromFile(filePath); + expect(msg).toContain(`Successfully loaded seed for wallet ${walletModel.id}`); + expect(seedlessWalletForLoad.canSign()).toBe(true); + }); + }); }); - describe("#trade", () => { + describe("#createTrade", () => { const tradeObject = new Trade({ network_id: Coinbase.networks.BaseSepolia, wallet_id: walletId, @@ -825,18 +1643,15 @@ describe("Wallet Class", () => { }, } as TradeModel); - it("should throw an error when the wallet does not have a default address", async () => { - const newWallet = Wallet.init(walletModel); - await expect(async () => await newWallet.createTrade(0.01, "eth", "usdc")).rejects.toThrow( - InternalError, - ); - }); - it("should create a trade from the default address", async () => { const trade = Promise.resolve(tradeObject); jest.spyOn(Wallet.prototype, "createTrade").mockReturnValue(trade); const wallet = await Wallet.create(); - const result = await wallet.createTrade(0.01, "eth", "usdc"); + const result = await wallet.createTrade({ + amount: 0.01, + fromAssetId: "eth", + toAssetId: "usdc", + }); expect(result).toBeInstanceOf(Trade); expect(result.getAddressId()).toBe(tradeObject.getAddressId()); expect(result.getWalletId()).toBe(tradeObject.getWalletId()); @@ -860,9 +1675,92 @@ describe("Wallet Class", () => { const [address1] = await wallet.listAddresses(); const tradeWallet = (await wallet.getAddress(address1.getId())) as WalletAddress; - const trades = await tradeWallet.listTrades(); + const paginationResponse = await tradeWallet.listTrades(); + const trades = paginationResponse.data; expect(trades[0]).toBeInstanceOf(Trade); - expect(trades.length).toBe(2); + expect(trades.length).toBe(1); + }); + }); + + describe("#createWebhook", () => { + let wallet: Wallet; + let addressList: AddressModel[]; + let walletModel: WalletModel; + const existingSeed = "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f"; + const { address1, address2, address3, wallet1PrivateKey, wallet2PrivateKey } = + generateWalletFromSeed(existingSeed, 3); + + beforeEach(async () => { + jest.clearAllMocks(); + addressList = [ + { + address_id: address1, + network_id: Coinbase.networks.BaseSepolia, + public_key: wallet1PrivateKey, + wallet_id: "w1", + index: 0, + }, + { + address_id: address2, + network_id: Coinbase.networks.BaseSepolia, + public_key: wallet2PrivateKey, + wallet_id: "w1", + index: 1, + }, + ]; + walletModel = { + id: "w1", + network_id: Coinbase.networks.BaseSepolia, + default_address: addressList[0], + feature_set: {} as FeatureSet, + }; + wallet = Wallet.init(walletModel, existingSeed); + }); + + const mockModel: WebhookModel = { + id: "test-id", + network_id: "test-network", + notification_uri: "https://example.com/callback", + event_type: "wallet_activity", + event_type_filter: { addresses: [address1], wallet_id: "w1" }, + status: WebhookStatus.Active, + }; + + Coinbase.apiClients.webhook = { + createWalletWebhook: jest.fn().mockResolvedValue({ data: mockModel }), + createWebhook: jest.fn().mockResolvedValue({ data: mockModel }), + listWebhooks: jest.fn().mockResolvedValue({ + data: { + data: [mockModel], + has_more: false, + next_page: null, + }, + }), + updateWebhook: jest.fn().mockImplementation((id, updateRequest) => { + return Promise.resolve({ + data: { + ...mockModel, + notification_uri: updateRequest.notification_uri, + }, + }); + }), + deleteWebhook: jest.fn().mockResolvedValue({}), + }; + + it("should create a webhook for the default address", async () => { + const webhookObject = Webhook.init(mockModel); + + const wh = Promise.resolve(webhookObject); + jest.spyOn(Wallet.prototype, "createWebhook").mockReturnValue(wh); + const result = await wallet.createWebhook("https://example.com/callback"); + expect(result).toBeInstanceOf(Webhook); + expect((result.getEventTypeFilter() as WebhookWalletActivityFilter)?.wallet_id).toBe( + walletModel.id, + ); + expect((result.getEventTypeFilter() as WebhookWalletActivityFilter)?.addresses).toStrictEqual( + [address1], + ); + expect(result.getEventType()).toBe("wallet_activity"); }); }); }); diff --git a/src/tests/wallet_transfer_test.ts b/src/tests/wallet_transfer_test.ts new file mode 100644 index 00000000..7b0dd695 --- /dev/null +++ b/src/tests/wallet_transfer_test.ts @@ -0,0 +1,75 @@ +import { Wallet } from "../coinbase/wallet"; +import { WalletAddress } from "../coinbase/address/wallet_address"; +import { newAddressModel } from "./utils"; +import { Coinbase, Transfer } from ".."; +import { FeatureSet, Wallet as WalletModel } from "../client/api"; + +describe("Wallet Transfer", () => { + let wallet: Wallet; + let walletModel: WalletModel; + let defaultAddress: WalletAddress; + const walletId = "test-wallet-id"; + const addressId = "0x123abc..."; + + beforeEach(() => { + const addressModel = newAddressModel(walletId, addressId); + defaultAddress = new WalletAddress(addressModel); + + walletModel = { + id: walletId, + network_id: Coinbase.networks.BaseSepolia, + default_address: addressModel, + feature_set: {} as FeatureSet, + }; + + wallet = Wallet.init(walletModel, ""); + + // Mock getDefaultAddress to return our test address + jest.spyOn(wallet, "getDefaultAddress").mockResolvedValue(defaultAddress); + + // Mock the createTransfer method on the default address + jest.spyOn(defaultAddress, "createTransfer").mockResolvedValue({} as Transfer); + }); + + afterEach(() => { + jest.restoreAllMocks(); + }); + + describe("#createTransfer", () => { + it("should pass through skipBatching to defaultAddress.createTransfer", async () => { + const assetId = "eth"; + + await wallet.createTransfer({ + amount: 1, + assetId, + destination: "0x123abc...", + gasless: true, + skipBatching: true, + }); + + expect(defaultAddress.createTransfer).toHaveBeenCalledWith({ + amount: 1, + assetId, + destination: "0x123abc...", + gasless: true, + skipBatching: true, + }); + + await wallet.createTransfer({ + amount: 1, + assetId, + destination: "0x123abc...", + gasless: true, + skipBatching: false, + }); + + expect(defaultAddress.createTransfer).toHaveBeenCalledWith({ + amount: 1, + assetId, + destination: "0x123abc...", + gasless: true, + skipBatching: false, + }); + }); + }); +}); diff --git a/src/tests/webhook_test.ts b/src/tests/webhook_test.ts new file mode 100644 index 00000000..2b600439 --- /dev/null +++ b/src/tests/webhook_test.ts @@ -0,0 +1,330 @@ +import { Webhook } from "../coinbase/webhook"; +import { Coinbase } from "../coinbase/coinbase"; +import { Webhook as WebhookModel, WebhookWalletActivityFilter, WebhookStatus } from "../client/api"; +import { mockReturnRejectedValue } from "./utils"; +import { APIError } from "../coinbase/api_error"; + +describe("Webhook", () => { + const mockModel: WebhookModel = { + id: "test-id", + network_id: "test-network", + notification_uri: "https://example.com/callback", + event_type: "erc20_transfer", + event_filters: [{ contract_address: "0x...", from_address: "0x...", to_address: "0x..." }], + status: WebhookStatus.Active, + }; + + const mockWalletActivityWebhookModel: WebhookModel = { + id: "test-id", + network_id: "test-network", + notification_uri: "https://example.com/callback", + event_type: "wallet_activity", + event_type_filter: { + addresses: ["0xa55C5950F7A3C42Fa5799B2Cac0e455774a07382"], + wallet_id: "test-wallet-id", + }, + status: WebhookStatus.Active, + }; + + const mockContractActivityWebhookModel: WebhookModel = { + id: "test-id", + network_id: "test-network", + notification_uri: "https://example.com/callback", + event_type: "smart_contract_event_activity", + event_type_filter: { + contract_addresses: ["0xa55C5950F7A3C42Fa5799B2Cac0e455774a07382"], + }, + status: WebhookStatus.Active, + }; + + beforeEach(() => { + Coinbase.apiClients.webhook = { + createWalletWebhook: jest.fn().mockResolvedValue({ data: mockModel }), + createWebhook: jest.fn().mockResolvedValue({ data: mockModel }), + listWebhooks: jest.fn().mockResolvedValue({ + data: { + data: [mockModel], + has_more: true, + next_page: null, + }, + }), + updateWebhook: jest.fn().mockImplementation((id, updateRequest) => { + return Promise.resolve({ + data: { + ...mockModel, + notification_uri: updateRequest.notification_uri, + event_type_filter: updateRequest.event_type_filter, + }, + }); + }), + deleteWebhook: jest.fn().mockResolvedValue({}), + }; + }); + + describe(".init", () => { + it("should throw an error if the model is null", () => { + expect(() => Webhook.init(null as never)).toThrow("Webhook model cannot be empty"); + }); + + it("should create an instance of Webhook", () => { + const webhook = Webhook.init(mockModel); + expect(webhook).toBeInstanceOf(Webhook); + }); + }); + + describe("#getId", () => { + it("should return the ID of the webhook", () => { + const webhook = Webhook.init(mockModel); + expect(webhook.getId()).toBe("test-id"); + }); + + it("should return undefined if the ID is not set", () => { + const modelWithoutId: WebhookModel = { + ...mockModel, + id: undefined, + }; + const webhook = Webhook.init(modelWithoutId); + expect(webhook.getId()).toBeUndefined(); + }); + }); + + describe("#getNetworkId", () => { + it("should return the network ID of the webhook", () => { + const webhook = Webhook.init(mockModel); + expect(webhook.getNetworkId()).toBe("test-network"); + }); + + it("should return undefined if the network ID is not set", () => { + const modelWithoutNetworkId: WebhookModel = { + ...mockModel, + network_id: undefined, + }; + const webhook = Webhook.init(modelWithoutNetworkId); + expect(webhook.getNetworkId()).toBeUndefined(); + }); + }); + + describe("#getNotificationURI", () => { + it("should return the notification URI of the webhook", () => { + const webhook = Webhook.init(mockModel); + expect(webhook.getNotificationURI()).toBe("https://example.com/callback"); + }); + + it("should return undefined if the notification URI is not set", () => { + const modelWithoutNotificationURI: WebhookModel = { + ...mockModel, + notification_uri: undefined, + }; + const webhook = Webhook.init(modelWithoutNotificationURI); + expect(webhook.getNotificationURI()).toBeUndefined(); + }); + }); + + describe("#getEventType", () => { + it("should return the event type of the webhook", () => { + const webhook = Webhook.init(mockModel); + expect(webhook.getEventType()).toBe("erc20_transfer"); + }); + + it("should return undefined if the event type is not set", () => { + const modelWithoutEventType: WebhookModel = { + ...mockModel, + event_type: undefined, + }; + const webhook = Webhook.init(modelWithoutEventType); + expect(webhook.getEventType()).toBeUndefined(); + }); + }); + + describe("#getEventFilters", () => { + it("should return the event filters of the webhook", () => { + const webhook = Webhook.init(mockModel); + expect(webhook.getEventFilters()).toEqual([ + { contract_address: "0x...", from_address: "0x...", to_address: "0x..." }, + ]); + }); + + it("should return undefined when event filters are not set", () => { + const modelWithoutFilters: WebhookModel = { + ...mockModel, + event_filters: undefined, + }; + const webhook = Webhook.init(modelWithoutFilters); + expect(webhook.getEventFilters()).toBeUndefined(); + }); + }); + + describe("#getSignatureHeader", () => { + it("should return undefined since the signature header can not be set via SDK", () => { + const modelWithoutSignatureHeader: WebhookModel = { + ...mockModel, + signature_header: undefined, + }; + const webhook = Webhook.init(modelWithoutSignatureHeader); + expect(webhook.getSignatureHeader()).toBeUndefined(); + }); + }); + + describe(".create", () => { + it("should create a new webhook", async () => { + const webhook = await Webhook.create({ + networkId: "test-network", + notificationUri: "https://example.com/callback", + eventType: "erc20_transfer", + eventFilters: [{ contract_address: "0x...", from_address: "0x...", to_address: "0x..." }], + }); + + expect(Coinbase.apiClients.webhook!.createWebhook).toHaveBeenCalledWith({ + network_id: "test-network", + notification_uri: "https://example.com/callback", + event_type: "erc20_transfer", + event_filters: [{ contract_address: "0x...", from_address: "0x...", to_address: "0x..." }], + }); + expect(webhook).toBeInstanceOf(Webhook); + expect(webhook.getId()).toBe("test-id"); + }); + + it("should throw an error if creation fails", async () => { + Coinbase.apiClients.webhook!.createWebhook = jest + .fn() + .mockRejectedValue(new Error("Failed to create webhook")); + await expect( + Webhook.create({ + networkId: "test-network", + notificationUri: "https://example.com/callback", + eventType: "erc20_transfer", + }), + ).rejects.toThrow("Failed to create webhook"); + }); + }); + + describe(".list", () => { + it("should list all webhooks", async () => { + const paginationResponse = await Webhook.list({ limit: 1 }); + const webhooks = paginationResponse.data; + + expect(Coinbase.apiClients.webhook!.listWebhooks).toHaveBeenCalledWith(1, undefined); + expect(webhooks.length).toBe(1); + expect(webhooks[0].getId()).toBe("test-id"); + expect(paginationResponse.hasMore).toBe(true); + expect(paginationResponse.nextPage).toBe(undefined); + }); + + it("should throw an error if list fails", async () => { + Coinbase.apiClients.webhook!.listWebhooks = mockReturnRejectedValue(new APIError("")); + await expect(Webhook.list()).rejects.toThrow(APIError); + }); + }); + + describe("#update", () => { + it("should update the webhook notification URI", async () => { + const webhook = Webhook.init(mockModel); + await webhook.update({ notificationUri: "https://new-url.com/callback" }); + + expect(Coinbase.apiClients.webhook!.updateWebhook).toHaveBeenCalledWith("test-id", { + notification_uri: "https://new-url.com/callback", + event_filters: [{ contract_address: "0x...", from_address: "0x...", to_address: "0x..." }], + }); + + expect(webhook.getNotificationURI()).toBe("https://new-url.com/callback"); + }); + it("should update the webhook address list only", async () => { + const webhook = Webhook.init(mockModel); + + await webhook.update({ + eventTypeFilter: { wallet_id: "test-wallet-id", addresses: ["0x1..", "0x2.."] }, + }); + + expect(Coinbase.apiClients.webhook!.updateWebhook).toHaveBeenCalledWith("test-id", { + notification_uri: "https://example.com/callback", + event_filters: [{ contract_address: "0x...", from_address: "0x...", to_address: "0x..." }], + event_type_filter: { wallet_id: "test-wallet-id", addresses: ["0x1..", "0x2.."] }, + }); + + expect(webhook.getNotificationURI()).toBe("https://example.com/callback"); + expect((webhook.getEventTypeFilter() as WebhookWalletActivityFilter)?.addresses).toEqual([ + "0x1..", + "0x2..", + ]); + }); + it("should update both the webhook notification URI and the list of addresses monitoring", async () => { + const webhook = Webhook.init(mockWalletActivityWebhookModel); + await webhook.update({ + notificationUri: "https://new-url.com/callback", + eventTypeFilter: { wallet_id: "test-wallet-id", addresses: ["0x1..", "0x2.."] }, + }); + + expect(Coinbase.apiClients.webhook!.updateWebhook).toHaveBeenCalledWith("test-id", { + notification_uri: "https://new-url.com/callback", + event_type_filter: { addresses: ["0x1..", "0x2.."], wallet_id: "test-wallet-id" }, + }); + + expect(webhook.getNotificationURI()).toBe("https://new-url.com/callback"); + expect(webhook.getEventTypeFilter()).toEqual({ + addresses: ["0x1..", "0x2.."], + wallet_id: "test-wallet-id", + }); + }); + it("should update notification URI for contract webhook", async () => { + const webhook = Webhook.init(mockContractActivityWebhookModel); + await webhook.update({ + notificationUri: "https://new-url-for-contract-webhook.com/callback", + }); + + expect(Coinbase.apiClients.webhook!.updateWebhook).toHaveBeenCalledWith("test-id", { + notification_uri: "https://new-url-for-contract-webhook.com/callback", + event_type_filter: { + contract_addresses: ["0xa55C5950F7A3C42Fa5799B2Cac0e455774a07382"], + }, + }); + + expect(webhook.getNotificationURI()).toBe( + "https://new-url-for-contract-webhook.com/callback", + ); + expect(webhook.getEventTypeFilter()).toEqual({ + contract_addresses: ["0xa55C5950F7A3C42Fa5799B2Cac0e455774a07382"], + }); + }); + it("should update contract addresses for contract webhook", async () => { + const webhook = Webhook.init(mockContractActivityWebhookModel); + await webhook.update({ + eventTypeFilter: { + contract_addresses: ["0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"], + }, + }); + + expect(Coinbase.apiClients.webhook!.updateWebhook).toHaveBeenCalledWith("test-id", { + notification_uri: "https://example.com/callback", + event_type_filter: { + contract_addresses: ["0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"], + }, + }); + + expect(webhook.getNotificationURI()).toBe("https://example.com/callback"); + expect(webhook.getEventTypeFilter()).toEqual({ + contract_addresses: ["0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"], + }); + }); + }); + + describe("#delete", () => { + it("should delete the webhook and set the model to null", async () => { + const webhook = Webhook.init(mockModel); + await webhook.delete(); + + expect(Coinbase.apiClients.webhook!.deleteWebhook).toHaveBeenCalledWith("test-id"); + expect(webhook.getId()).toBeUndefined(); + expect(webhook.getNetworkId()).toBeUndefined(); + }); + }); + + describe("#toString", () => { + it("should return a string representation of the webhook", () => { + const webhook = Webhook.init(mockModel); + const stringRepresentation = webhook.toString(); + expect(stringRepresentation).toBe( + `Webhook { id: 'test-id', networkId: 'test-network', eventType: 'erc20_transfer', eventFilter: [{"contract_address":"0x...","from_address":"0x...","to_address":"0x..."}], eventTypeFilter: undefined, notificationUri: 'https://example.com/callback', signatureHeader: 'undefined' }`, + ); + }); + }); +}); diff --git a/src/types/calls.ts b/src/types/calls.ts new file mode 100644 index 00000000..5ec2afc3 --- /dev/null +++ b/src/types/calls.ts @@ -0,0 +1,39 @@ +// Adapted from viem (https://github.com/wevm/viem) + +import type { AbiStateMutability, Address } from "viem"; +import type { GetMulticallContractParameters } from "./multicall"; +import type { OneOf, Prettify } from "./utils"; +import type { Hex } from "./misc"; + +export type Call = {}> = OneOf< + | (extraProperties & { + data?: Hex | undefined; + to: Address; + value?: bigint | undefined; + }) + | (extraProperties & + (Omit, "address"> & { + to: Address; + value?: bigint | undefined; + })) +>; + +export type Calls< + calls extends readonly unknown[], + extraProperties extends Record = {}, + /// + result extends readonly any[] = [], +> = calls extends readonly [] // no calls, return empty + ? readonly [] + : calls extends readonly [infer call] // one call left before returning `result` + ? readonly [...result, Prettify>] + : calls extends readonly [infer call, ...infer rest] // grab first call and recurse through `rest` + ? Calls<[...rest], extraProperties, [...result, Prettify>]> + : readonly unknown[] extends calls + ? calls + : // If `calls` is *some* array but we couldn't assign `unknown[]` to it, then it must hold some known/homogenous type! + // use this to infer the param types in the case of Array.map() argument + calls extends readonly (infer call extends OneOf)[] + ? readonly Prettify[] + : // Fallback + readonly OneOf[]; diff --git a/src/types/chain.ts b/src/types/chain.ts new file mode 100644 index 00000000..2bfc07fa --- /dev/null +++ b/src/types/chain.ts @@ -0,0 +1,22 @@ +import { NetworkIdentifier } from "../client/api"; + +/** + * Maps chain IDs to their corresponding Coinbase network IDs. Only SmartWallet related chains are listed here right now. + */ +export const CHAIN_ID_TO_NETWORK_ID = { + 8453: NetworkIdentifier.BaseMainnet, + 84532: NetworkIdentifier.BaseSepolia, +} as const; + +/** + * Supported chain IDs are the keys of the CHAIN_ID_TO_NETWORK_ID object + */ +export type SupportedChainId = keyof typeof CHAIN_ID_TO_NETWORK_ID; + +/** + * Represents a chainID and the corresponding Coinbase network ID + */ +export type Network = { + chainId: SupportedChainId; + networkId: NetworkIdentifier; +}; diff --git a/src/types/contract.ts b/src/types/contract.ts new file mode 100644 index 00000000..2e668b50 --- /dev/null +++ b/src/types/contract.ts @@ -0,0 +1,123 @@ +// Adapted from viem (https://github.com/wevm/viem) + +import type { + Abi, + AbiFunction, + AbiParametersToPrimitiveTypes, + AbiStateMutability, + Address, + ExtractAbiFunction, + ExtractAbiFunctionNames, + ResolvedRegister, +} from "abitype"; + +import type { Hex } from "./misc"; +import type { IsUnion, UnionToTuple } from "./utils"; + +export type ContractFunctionName< + abi extends Abi | readonly unknown[] = Abi, + mutability extends AbiStateMutability = AbiStateMutability, +> = + ExtractAbiFunctionNames< + abi extends Abi ? abi : Abi, + mutability + > extends infer functionName extends string + ? [functionName] extends [never] + ? string + : functionName + : string; + +export type ContractFunctionArgs< + abi extends Abi | readonly unknown[] = Abi, + mutability extends AbiStateMutability = AbiStateMutability, + functionName extends ContractFunctionName = ContractFunctionName< + abi, + mutability + >, +> = + AbiParametersToPrimitiveTypes< + ExtractAbiFunction["inputs"], + "inputs" + > extends infer args + ? [args] extends [never] + ? readonly unknown[] + : args + : readonly unknown[]; + +export type Widen = + | ([unknown] extends [type] ? unknown : never) + | (type extends Function ? type : never) + | (type extends ResolvedRegister["BigIntType"] ? bigint : never) + | (type extends boolean ? boolean : never) + | (type extends ResolvedRegister["IntType"] ? number : never) + | (type extends string + ? type extends ResolvedRegister["AddressType"] + ? ResolvedRegister["AddressType"] + : type extends ResolvedRegister["BytesType"]["inputs"] + ? ResolvedRegister["BytesType"] + : string + : never) + | (type extends readonly [] ? readonly [] : never) + | (type extends Record ? { [K in keyof type]: Widen } : never) + | (type extends { length: number } + ? { + [K in keyof type]: Widen; + } extends infer Val extends readonly unknown[] + ? readonly [...Val] + : never + : never); + +export type UnionWiden = type extends any ? Widen : never; + +export type ExtractAbiFunctionForArgs< + abi extends Abi, + mutability extends AbiStateMutability, + functionName extends ContractFunctionName, + args extends ContractFunctionArgs, +> = + ExtractAbiFunction extends infer abiFunction extends AbiFunction + ? IsUnion extends true // narrow overloads using `args` by converting to tuple and filtering out overloads that don't match + ? UnionToTuple extends infer abiFunctions extends readonly AbiFunction[] + ? // convert back to union (removes `never` tuple entries) + { [k in keyof abiFunctions]: CheckArgs }[number] + : never + : abiFunction + : never; +type CheckArgs< + abiFunction extends AbiFunction, + args, + /// + targetArgs extends AbiParametersToPrimitiveTypes< + abiFunction["inputs"], + "inputs" + > = AbiParametersToPrimitiveTypes, +> = (readonly [] extends args ? readonly [] : args) extends targetArgs // fallback to `readonly []` if `args` has no value (e.g. `args` property not provided) + ? abiFunction + : never; + +export type ContractFunctionParameters< + abi extends Abi | readonly unknown[] = Abi, + mutability extends AbiStateMutability = AbiStateMutability, + functionName extends ContractFunctionName = ContractFunctionName< + abi, + mutability + >, + args extends ContractFunctionArgs = ContractFunctionArgs< + abi, + mutability, + functionName + >, + deployless extends boolean = false, + /// + allFunctionNames = ContractFunctionName, + allArgs = ContractFunctionArgs, + // when `args` is inferred to `readonly []` ("inputs": []) or `never` (`abi` declared as `Abi` or not inferrable), allow `args` to be optional. + // important that both branches return same structural type +> = { + abi: abi; + functionName: + | allFunctionNames // show all options + | (functionName extends allFunctionNames ? functionName : never); // infer value + args?: (abi extends Abi ? UnionWiden : never) | allArgs | undefined; +} & (readonly [] extends allArgs ? {} : { args: Widen }) & + (deployless extends true ? { address?: undefined; code: Hex } : { address: Address }); diff --git a/src/types/misc.ts b/src/types/misc.ts new file mode 100644 index 00000000..0331005a --- /dev/null +++ b/src/types/misc.ts @@ -0,0 +1,5 @@ +// Adapted from viem (https://github.com/wevm/viem) + +export type Hex = `0x${string}`; +export type Hash = `0x${string}`; +export type Address = `0x${string}`; diff --git a/src/types/multicall.ts b/src/types/multicall.ts new file mode 100644 index 00000000..b92449bf --- /dev/null +++ b/src/types/multicall.ts @@ -0,0 +1,30 @@ +// Adapted from viem (https://github.com/wevm/viem) +import type { Abi, AbiStateMutability } from "abitype"; + +import type { + ContractFunctionArgs, + ContractFunctionName, + ContractFunctionParameters, +} from "./contract"; + +// infer contract parameters from `unknown` +export type GetMulticallContractParameters< + contract, + mutability extends AbiStateMutability, +> = contract extends { abi: infer abi extends Abi } // 1. Check if `abi` is const-asserted or defined inline + ? // 1a. Check if `functionName` is valid for `abi` + contract extends { + functionName: infer functionName extends ContractFunctionName; + } + ? // 1aa. Check if `args` is valid for `abi` and `functionName` + contract extends { + args: infer args extends ContractFunctionArgs; + } + ? ContractFunctionParameters // `args` valid, pass through + : ContractFunctionParameters // invalid `args` + : // 1b. `functionName` is invalid, check if `abi` is declared as `Abi` + Abi extends abi + ? ContractFunctionParameters // `abi` declared as `Abi`, unable to infer types further + : // `abi` is const-asserted or defined inline, infer types for `functionName` and `args` + ContractFunctionParameters + : ContractFunctionParameters; // invalid `contract['abi']`, set to `readonly unknown[]` diff --git a/src/types/utils.ts b/src/types/utils.ts new file mode 100644 index 00000000..9e02c30a --- /dev/null +++ b/src/types/utils.ts @@ -0,0 +1,286 @@ +// Adapted from viem (https://github.com/wevm/viem) + +/** + * Filters out all members of {@link T} that are not {@link P} + * + * @param T - Items to filter + * @param P - Type to filter out + * @returns Filtered items + * + * @example + * type Result = Filter<['a', 'b', 'c'], 'b'> + * // ^? type Result = ['a', 'c'] + */ +export type Filter< + T extends readonly unknown[], + P, + Acc extends readonly unknown[] = [], +> = T extends readonly [infer F, ...infer Rest extends readonly unknown[]] + ? [F] extends [P] + ? Filter + : Filter + : readonly [...Acc]; + +/** + * @description Checks if {@link T} can be narrowed further than {@link U} + * @param T - Type to check + * @param U - Type to against + * @example + * type Result = IsNarrowable<'foo', string> + * // ^? true + */ +export type IsNarrowable = + IsNever<(T extends U ? true : false) & (U extends T ? false : true)> extends true ? false : true; + +/** + * @description Checks if {@link T} is `never` + * @param T - Type to check + * @example + * type Result = IsNever + * // ^? type Result = true + */ +export type IsNever = [T] extends [never] ? true : false; + +/** Removes `readonly` from all properties of an object. */ +export type Mutable = { + -readonly [key in keyof type]: type[key]; +}; + +/** + * @description Evaluates boolean "or" condition for {@link T} properties. + * @param T - Type to check + * + * * @example + * type Result = Or<[false, true, false]> + * // ^? type Result = true + * + * @example + * type Result = Or<[false, false, false]> + * // ^? type Result = false + */ +export type Or = T extends readonly [infer Head, ...infer Tail] + ? Head extends true + ? true + : Or + : false; + +/** + * @description Checks if {@link T} is `undefined` + * @param T - Type to check + * @example + * type Result = IsUndefined + * // ^? type Result = true + */ +export type IsUndefined = [undefined] extends [T] ? true : false; + +export type MaybePromise = T | Promise; + +/** + * @description Makes attributes on the type T required if required is true. + * + * @example + * MaybeRequired<{ a: string, b?: number }, true> + * => { a: string, b: number } + * + * MaybeRequired<{ a: string, b?: number }, false> + * => { a: string, b?: number } + */ +export type MaybeRequired = required extends true + ? ExactRequired + : T; + +/** + * @description Assigns the properties of U onto T. + * + * @example + * Assign<{ a: string, b: number }, { a: undefined, c: boolean }> + * => { a: undefined, b: number, c: boolean } + */ +export type Assign = Assign_ & U; +type Assign_ = { + [K in keyof T as K extends keyof U ? (U[K] extends void ? never : K) : K]: K extends keyof U + ? U[K] + : T[K]; +}; + +// TODO: Remove when peer dep `typescript@>=4.5` (NoInfer is native) +export type NoInfer = [type][type extends any ? 0 : never]; + +/** + * @description Constructs a type by excluding `undefined` from `T`. + * + * @example + * NoUndefined + * => string + * + * @internal + */ +export type NoUndefined = T extends undefined ? never : T; + +/** Strict version of built-in Omit type */ +export type Omit = Pick>; + +/** + * @description Creates a type that is a partial of T, but with the required keys K. + * + * @example + * PartialBy<{ a: string, b: number }, 'a'> + * => { a?: string, b: number } + */ +export type PartialBy = Omit & ExactPartial>; + +/** + * @description Combines members of an intersection into a readable type. + * + * @see {@link https://twitter.com/mattpocockuk/status/1622730173446557697?s=20&t=NdpAcmEFXY01xkqU3KO0Mg} + * @example + * Prettify<{ a: string } & { b: string } & { c: number, d: bigint }> + * => { a: string, b: string, c: number, d: bigint } + */ +export type Prettify = { + [K in keyof T]: T[K]; +} & {}; + +/** @internal */ +export type Evaluate = { + [key in keyof type]: type[key]; +} & {}; + +/** + * @description Creates a type that is T with the required keys K. + * + * @example + * RequiredBy<{ a?: string, b: number }, 'a'> + * => { a: string, b: number } + */ +export type RequiredBy = Omit & ExactRequired>; + +/** + * @description Returns truthy if `array` contains `value`. + * + * @example + * Some<[1, 2, 3], 2> + * => true + */ +export type Some = array extends readonly [ + value, + ...unknown[], +] + ? true + : array extends readonly [unknown, ...infer rest] + ? Some + : false; + +/** + * @description Creates a type that extracts the values of T. + * + * @example + * ValueOf<{ a: string, b: number }> + * => string | number + * + * @internal + */ +export type ValueOf = T[keyof T]; + +export type UnionToTuple< + union, + /// + last = LastInUnion, +> = [union] extends [never] ? [] : [...UnionToTuple>, last]; +type LastInUnion = + UnionToIntersection 0 : never> extends (x: infer l) => 0 + ? l + : never; +type UnionToIntersection = (union extends unknown ? (arg: union) => 0 : never) extends ( + arg: infer i, +) => 0 + ? i + : never; + +export type IsUnion< + union, + /// + union2 = union, +> = union extends union2 ? ([union2] extends [union] ? false : true) : never; + +export type MaybePartial = enabled extends true + ? Prettify> + : type; + +export type ExactPartial = { + [key in keyof type]?: type[key] | undefined; +}; + +export type ExactRequired = { + [P in keyof type]-?: Exclude; +}; + +export type OneOf< + union extends object, + fallback extends object | undefined = undefined, + /// + keys extends KeyofUnion = KeyofUnion, +> = union extends infer item + ? Prettify< + item & { + [key in Exclude]?: fallback extends object + ? key extends keyof fallback + ? fallback[key] + : undefined + : undefined; + } + > + : never; +type KeyofUnion = type extends type ? keyof type : never; + +/////////////////////////////////////////////////////////////////////////// +// Loose types + +/** + * Loose version of {@link Omit} + * @internal + */ +export type LooseOmit = Pick>; + +/////////////////////////////////////////////////////////////////////////// +// Union types + +export type UnionEvaluate = type extends object ? Prettify : type; + +export type UnionLooseOmit = type extends any + ? LooseOmit + : never; + +/** + * @description Construct a type with the properties of union type T except for those in type K. + * @example + * type Result = UnionOmit<{ a: string, b: number } | { a: string, b: undefined, c: number }, 'a'> + * => { b: number } | { b: undefined, c: number } + */ +export type UnionOmit = type extends any ? Omit : never; + +/** + * @description Construct a type with the properties of union type T except for those in type K. + * @example + * type Result = UnionOmit<{ a: string, b: number } | { a: string, b: undefined, c: number }, 'a'> + * => { b: number } | { b: undefined, c: number } + */ +export type UnionPick = type extends any ? Pick : never; + +/** + * @description Creates a type that is a partial of T, but with the required keys K. + * + * @example + * PartialBy<{ a: string, b: number } | { a: string, b: undefined, c: number }, 'a'> + * => { a?: string, b: number } | { a?: string, b: undefined, c: number } + */ +export type UnionPartialBy = T extends any ? PartialBy : never; + +/** + * @description Creates a type that is T with the required keys K. + * + * @example + * RequiredBy<{ a?: string, b: number } | { a?: string, c?: number }, 'a'> + * => { a: string, b: number } | { a: string, c?: number } + */ +export type UnionRequiredBy = T extends any ? RequiredBy : never; diff --git a/src/utils/chain.test.ts b/src/utils/chain.test.ts new file mode 100644 index 00000000..85a3d613 --- /dev/null +++ b/src/utils/chain.test.ts @@ -0,0 +1,23 @@ +import { createNetwork } from "./chain"; +import { CHAIN_ID_TO_NETWORK_ID, SupportedChainId } from "../types/chain"; + +describe("createNetwork", () => { + it("should handle all supported chain IDs", () => { + const supportedChainIds = Object.keys(CHAIN_ID_TO_NETWORK_ID).map(Number) as SupportedChainId[]; + + supportedChainIds.forEach(chainId => { + const result = createNetwork(chainId); + expect(result).toEqual({ + chainId: chainId, + networkId: CHAIN_ID_TO_NETWORK_ID[chainId], + }); + }); + }); + it("should return undefined networkId for an unsupported chain ID", () => { + const result = createNetwork(1 as SupportedChainId); + expect(result).toEqual({ + chainId: 1, + networkId: undefined, + }); + }); +}); diff --git a/src/utils/chain.ts b/src/utils/chain.ts new file mode 100644 index 00000000..8e95bbcd --- /dev/null +++ b/src/utils/chain.ts @@ -0,0 +1,13 @@ +import { CHAIN_ID_TO_NETWORK_ID, SupportedChainId, Network } from "../types/chain"; + +/** + * Creates a network configuration for a given chain ID + * @param chainId - The chain ID to create a network configuration for + * @returns The network configuration + */ +export function createNetwork(chainId: SupportedChainId): Network { + return { + chainId, + networkId: CHAIN_ID_TO_NETWORK_ID[chainId], + }; +} diff --git a/src/utils/wait.test.ts b/src/utils/wait.test.ts new file mode 100644 index 00000000..830d86eb --- /dev/null +++ b/src/utils/wait.test.ts @@ -0,0 +1,97 @@ +import { wait } from "./wait"; +import { TimeoutError } from "../coinbase/errors"; + +describe("wait", () => { + beforeEach(() => { + jest.useFakeTimers(); + }); + + afterEach(() => { + jest.useRealTimers(); + }); + + it("should resolve immediately if initial state is terminal", async () => { + const mockReload = jest.fn().mockResolvedValue("COMPLETED"); + const isTerminal = (status: string) => status === "COMPLETED"; + + const promise = wait(mockReload, isTerminal); + await jest.runAllTimersAsync(); + + const result = await promise; + expect(result).toBe("COMPLETED"); + expect(mockReload).toHaveBeenCalledTimes(1); + }); + + it("should poll until terminal state is reached", async () => { + const mockReload = jest + .fn() + .mockResolvedValueOnce("PENDING") + .mockResolvedValueOnce("PROCESSING") + .mockResolvedValue("COMPLETED"); + const isTerminal = (status: string) => status === "COMPLETED"; + + const promise = wait(mockReload, isTerminal, undefined, { + intervalSeconds: 0.01, + }); + await jest.runAllTimersAsync(); + + const result = await promise; + expect(result).toBe("COMPLETED"); + expect(mockReload).toHaveBeenCalledTimes(3); + }); + + it("should transform the result using provided transform function", async () => { + const mockReload = jest.fn().mockResolvedValue("COMPLETED"); + const isTerminal = (status: string) => status === "COMPLETED"; + const transform = (status: string) => ({ status }); + + const promise = wait(mockReload, isTerminal, transform); + await jest.runAllTimersAsync(); + + const result = await promise; + expect(result).toEqual({ status: "COMPLETED" }); + }); + + it("should respect custom interval", async () => { + const mockReload = jest.fn().mockResolvedValueOnce("PENDING").mockResolvedValue("COMPLETED"); + + const isTerminal = (status: string) => status === "COMPLETED"; + + wait(mockReload, isTerminal, undefined, { intervalSeconds: 0.5 }); + + await jest.advanceTimersByTimeAsync(0); + expect(mockReload).toHaveBeenCalledTimes(1); + + await jest.advanceTimersByTimeAsync(499); + expect(mockReload).toHaveBeenCalledTimes(1); + + await jest.advanceTimersByTimeAsync(1); + expect(mockReload).toHaveBeenCalledTimes(2); + }); + + it("should throw TimeoutError after specified timeout", async () => { + const mockReload = jest.fn().mockResolvedValue("PENDING"); + const isTerminal = (status: string) => status === "COMPLETED"; + + const promise = wait(mockReload, isTerminal, undefined, { + timeoutSeconds: 1, + intervalSeconds: 0.2, + }); + promise.catch(error => { + expect(error).toBeInstanceOf(TimeoutError); + }); + + await jest.runAllTimersAsync(); + + expect(mockReload.mock.calls.length).toBeGreaterThanOrEqual(4); + expect(mockReload.mock.calls.length).toBeLessThanOrEqual(6); + }); + + it("should handle reload function failures", async () => { + const mockReload = jest.fn().mockRejectedValue(new Error("Network error")); + const isTerminal = (status: string) => status === "COMPLETED"; + + const promise = wait(mockReload, isTerminal); + await expect(promise).rejects.toThrow("Network error"); + }); +}); diff --git a/src/utils/wait.ts b/src/utils/wait.ts new file mode 100644 index 00000000..16e2a8ec --- /dev/null +++ b/src/utils/wait.ts @@ -0,0 +1,52 @@ +import { TimeoutError } from "../coinbase/errors"; + +/** + * Options for the wait function + */ +export type WaitOptions = { + /** Interval between retries in seconds. Defaults to 0.2 */ + intervalSeconds?: number; + /** Maximum time to wait before timing out in seconds. Defaults to 10 */ + timeoutSeconds?: number; +}; + +/** + * Polls a resource until a terminal condition is met or timeout occurs. + * + * @param reload - Function that fetches the latest state of the resource + * @param isTerminal - Function that determines if the current state is terminal + * @param transform - Function that transforms the resource into a new type + * @param options - Configuration options for polling behavior + * @returns The resource in its terminal state + * @throws {TimeoutError} If the operation exceeds the timeout duration + * + * @example + * const result = await wait( + * () => fetchOrderStatus(orderId), + * (status) => status === 'completed', + * (status) => status === 'completed' ? { status } : undefined, + * { timeoutSeconds: 30 } + * ); + */ +export async function wait( + reload: () => Promise, + isTerminal: (obj: T) => boolean, + transform: (obj: T) => K = (obj: T) => obj as unknown as K, + options: WaitOptions = {}, +): Promise { + const { intervalSeconds = 0.2, timeoutSeconds = 10 } = options; + const startTime = Date.now(); + + while (Date.now() - startTime < timeoutSeconds * 1000) { + const updatedObject = await reload(); + + if (isTerminal(updatedObject)) { + return transform(updatedObject); + } + + await new Promise(resolve => setTimeout(resolve, intervalSeconds * 1000)); + } + throw new TimeoutError( + `Operation has not reached a terminal state after ${timeoutSeconds} seconds and may still succeed. Retry with a longer timeout using the timeoutSeconds option.`, + ); +} diff --git a/src/wallets/createSmartWallet.test.ts b/src/wallets/createSmartWallet.test.ts new file mode 100644 index 00000000..329d8265 --- /dev/null +++ b/src/wallets/createSmartWallet.test.ts @@ -0,0 +1,132 @@ +import { createSmartWallet } from "./createSmartWallet"; +import { Coinbase } from "../coinbase/coinbase"; +import type { Address } from "../types/misc"; +import { smartWalletApiMock, mockReturnValue, mockReturnRejectedValue } from "../tests/utils"; +import { sendUserOperation } from "../actions/sendUserOperation"; + +jest.mock("../actions/sendUserOperation", () => ({ + sendUserOperation: jest.fn(), +})); + +describe("createSmartWallet", () => { + const VALID_SIGNER = { + address: "0x1234567890123456789012345678901234567890" as Address, + sign: jest.fn(), + }; + + const VALID_CREATE_RESPONSE = { + address: "0x2234567890123456789012345678901234567890" as Address, + owners: [VALID_SIGNER.address], + }; + + beforeEach(() => { + jest.clearAllMocks(); + + Coinbase.apiClients.smartWallet = smartWalletApiMock; + Coinbase.apiClients.smartWallet!.createSmartWallet = mockReturnValue(VALID_CREATE_RESPONSE); + }); + + afterEach(() => { + jest.restoreAllMocks(); + }); + + it("should successfully create a smart wallet", async () => { + const result = await createSmartWallet({ + signer: VALID_SIGNER, + }); + + expect(Coinbase.apiClients.smartWallet!.createSmartWallet).toHaveBeenCalledWith({ + owner: VALID_SIGNER.address, + }); + + expect(result).toEqual({ + address: VALID_CREATE_RESPONSE.address, + owners: [VALID_SIGNER], + type: "smart", + sendUserOperation: expect.any(Function), + useNetwork: expect.any(Function), + }); + }); + + it("should create a wallet that can send user operations", async () => { + const wallet = await createSmartWallet({ + signer: VALID_SIGNER, + }); + + const operationOptions = { + calls: [ + { + to: "0x3234567890123456789012345678901234567890" as Address, + data: "0x123abc", + value: 0n, + }, + ], + chainId: 8453, + } as const; + + await wallet.sendUserOperation(operationOptions); + + expect(sendUserOperation).toHaveBeenCalledWith(wallet, operationOptions); + }); + + it("should create a wallet that can be network-scoped", async () => { + const wallet = await createSmartWallet({ + signer: VALID_SIGNER, + }); + + const networkOptions = { + chainId: 8453, + paymasterUrl: "https://paymaster.example.com", + } as const; + + const networkWallet = wallet.useNetwork(networkOptions); + + expect(networkWallet).toEqual({ + ...wallet, + network: expect.objectContaining({ + chainId: networkOptions.chainId, + }), + paymasterUrl: networkOptions.paymasterUrl, + sendUserOperation: expect.any(Function), + }); + + const operationOptions = { + calls: [ + { + to: "0x3234567890123456789012345678901234567890" as Address, + data: "0x123abc", + value: 0n, + }, + ], + } as const; + + await networkWallet.sendUserOperation(operationOptions); + + expect(sendUserOperation).toHaveBeenCalledWith(wallet, { + ...operationOptions, + chainId: networkOptions.chainId, + }); + }); + + it("should throw if API client is not initialized", async () => { + Coinbase.apiClients.smartWallet = undefined; + + await expect( + createSmartWallet({ + signer: VALID_SIGNER, + }), + ).rejects.toThrow(); + }); + + it("should handle API errors during creation", async () => { + Coinbase.apiClients.smartWallet!.createSmartWallet = mockReturnRejectedValue( + new Error("Failed to create smart wallet"), + ); + + await expect( + createSmartWallet({ + signer: VALID_SIGNER, + }), + ).rejects.toThrow("Failed to create smart wallet"); + }); +}); diff --git a/src/wallets/createSmartWallet.ts b/src/wallets/createSmartWallet.ts new file mode 100644 index 00000000..9e66f240 --- /dev/null +++ b/src/wallets/createSmartWallet.ts @@ -0,0 +1,48 @@ +import { Signer, type SmartWallet } from "./types"; +import { Coinbase } from "../index"; +import type { Address } from "../types/misc"; +import { toSmartWallet } from "./toSmartWallet"; + +/** + * Options for creating a smart wallet + */ +export type CreateSmartWalletOptions = { + /** The signer object that will own the smart wallet */ + signer: Signer; +}; + +/** + * @description Creates a new smart wallet using the Coinbase API + * + * @param - {@link CreateSmartWalletOptions} options - Configuration options for creating the smart wallet + * @returns {Promise} A promise that resolves to the newly created smart wallet instance + * @throws {Error} If the Coinbase API client is not initialized + * + * See https://viem.sh/docs/accounts/local/privateKeyToAccount for using a Viem LocalAccount with SmartWallet + * + * @example + * ```ts + * import { generatePrivateKey, privateKeyToAccount } from "viem/accounts"; + * import { createSmartWallet } from "@coinbase/coinbase-sdk"; + * import { Coinbase } from "@coinbase/coinbase-sdk"; + * + * Coinbase.configureFromJson({filePath: "~/.apikeys/prod.json"}); + * + * const privateKey = generatePrivateKey(); + * const owner = privateKeyToAccount(privateKey); + * const wallet = await createSmartWallet({ + * signer: owner + * }); + * ``` + * + */ +export async function createSmartWallet(options: CreateSmartWalletOptions): Promise { + const result = await Coinbase.apiClients.smartWallet!.createSmartWallet({ + owner: options.signer.address, + }); + + return toSmartWallet({ + smartWalletAddress: result.data.address as Address, + signer: options.signer, + }); +} diff --git a/src/wallets/toSmartWallet.test.ts b/src/wallets/toSmartWallet.test.ts new file mode 100644 index 00000000..2d88c344 --- /dev/null +++ b/src/wallets/toSmartWallet.test.ts @@ -0,0 +1,172 @@ +import { sendUserOperation } from "../actions/sendUserOperation"; +import { createNetwork } from "../utils/chain"; +import { toSmartWallet } from "./toSmartWallet"; +import type { Address } from "../types/misc"; + +jest.mock("../actions/sendUserOperation", () => ({ + sendUserOperation: jest.fn(), +})); + +describe("toSmartWallet", () => { + const VALID_SIGNER = { + address: "0x1234567890123456789012345678901234567890" as Address, + sign: jest.fn(), + }; + + const SMART_WALLET_ADDRESS = "0x2234567890123456789012345678901234567890" as Address; + + beforeEach(() => { + jest.clearAllMocks(); + }); + + it("should create a smart wallet instance with correct properties", () => { + const wallet = toSmartWallet({ + smartWalletAddress: SMART_WALLET_ADDRESS, + signer: VALID_SIGNER, + }); + + expect(wallet).toEqual({ + address: SMART_WALLET_ADDRESS, + owners: [VALID_SIGNER], + type: "smart", + sendUserOperation: expect.any(Function), + useNetwork: expect.any(Function), + }); + }); + + it("should properly handle sendUserOperation calls", async () => { + const wallet = toSmartWallet({ + smartWalletAddress: SMART_WALLET_ADDRESS, + signer: VALID_SIGNER, + }); + + const operationOptions = { + calls: [ + { + to: "0x3234567890123456789012345678901234567890" as Address, + data: "0x123abc", + value: 0n, + }, + ], + chainId: 8453, + } as const; + + await wallet.sendUserOperation(operationOptions); + + expect(sendUserOperation).toHaveBeenCalledWith(wallet, operationOptions); + }); + + describe("useNetwork", () => { + const networkOptions = { + chainId: 8453, + paymasterUrl: "https://paymaster.example.com", + } as const; + + it("should create a network-scoped wallet with correct properties", () => { + const wallet = toSmartWallet({ + smartWalletAddress: SMART_WALLET_ADDRESS, + signer: VALID_SIGNER, + }); + + const networkWallet = wallet.useNetwork(networkOptions); + const expectedNetwork = createNetwork(networkOptions.chainId); + + expect(networkWallet).toEqual({ + address: SMART_WALLET_ADDRESS, + owners: [VALID_SIGNER], + type: "smart", + network: expectedNetwork, + paymasterUrl: networkOptions.paymasterUrl, + sendUserOperation: expect.any(Function), + useNetwork: expect.any(Function), + }); + }); + + it("should properly handle sendUserOperation calls with network context", async () => { + const wallet = toSmartWallet({ + smartWalletAddress: SMART_WALLET_ADDRESS, + signer: VALID_SIGNER, + }); + + const networkWallet = wallet.useNetwork(networkOptions); + + const operationOptions = { + calls: [ + { + to: "0x3234567890123456789012345678901234567890" as Address, + data: "0x123abc", + value: 0n, + }, + ], + } as const; + + await networkWallet.sendUserOperation(operationOptions); + + expect(sendUserOperation).toHaveBeenCalledWith(wallet, { + ...operationOptions, + chainId: networkOptions.chainId, + }); + }); + it("should preserve network context when sending multiple operations", async () => { + const wallet = toSmartWallet({ + smartWalletAddress: SMART_WALLET_ADDRESS, + signer: VALID_SIGNER, + }); + + const networkWallet = wallet.useNetwork(networkOptions); + + const operationOptions1 = { + calls: [ + { + to: "0x3234567890123456789012345678901234567890" as Address, + data: "0x123abc", + value: 0n, + }, + ], + } as const; + + const operationOptions2 = { + calls: [ + { + to: "0x4234567890123456789012345678901234567890" as Address, + data: "0x456def", + value: 0n, + }, + ], + } as const; + + await networkWallet.sendUserOperation(operationOptions1); + await networkWallet.sendUserOperation(operationOptions2); + + expect(sendUserOperation).toHaveBeenCalledTimes(2); + expect(sendUserOperation).toHaveBeenNthCalledWith(1, wallet, { + ...operationOptions1, + chainId: networkOptions.chainId, + }); + expect(sendUserOperation).toHaveBeenNthCalledWith(2, wallet, { + ...operationOptions2, + chainId: networkOptions.chainId, + }); + }); + + it("should correctly handle different network chains", () => { + const wallet = toSmartWallet({ + smartWalletAddress: SMART_WALLET_ADDRESS, + signer: VALID_SIGNER, + }); + + const baseMainnet = wallet.useNetwork({ + chainId: 8453, + paymasterUrl: "https://paymaster.example.com", + }); + + const baseSepolia = wallet.useNetwork({ + chainId: 84532, + paymasterUrl: "https://paymaster-goerli.example.com", + }); + + expect(baseMainnet.network).toEqual(createNetwork(8453)); + expect(baseSepolia.network).toEqual(createNetwork(84532)); + }); + }); +}); diff --git a/src/wallets/toSmartWallet.ts b/src/wallets/toSmartWallet.ts new file mode 100644 index 00000000..98dcddb4 --- /dev/null +++ b/src/wallets/toSmartWallet.ts @@ -0,0 +1,72 @@ +import { + NetworkScopedSmartWallet, + Signer, + SmartWalletNetworkOptions, + type SmartWallet, +} from "./types"; +import { sendUserOperation } from "../actions/sendUserOperation"; +import type { Address } from "../types/misc"; +import { createNetwork } from "../utils/chain"; + +/** + * Options for converting a smart wallet address and signer to a SmartWallet instance + */ +export type ToSmartWalletOptions = { + /** The address of the smart wallet */ + smartWalletAddress: Address; + /** The signer that will own the smart wallet */ + signer: Signer; +}; + +/** + * Creates a SmartWallet instance from an existing smart wallet address and signer. + * Use this to interact with previously deployed smart wallets, rather than creating new ones. + * + * The signer must be the original owner of the smart wallet. + * + * @example + * ```typescript + * import { toSmartWallet } from "@coinbase/coinbase-sdk"; + * + * // Connect to an existing smart wallet + * const wallet = toSmartWallet({ + * smartWalletAddress: "0x1234567890123456789012345678901234567890", + * signer: localAccount + * }); + * + * // Use on a specific network + * const networkWallet = wallet.useNetwork({ + * chainId: 8453, // Base Mainnet + * paymasterUrl: "https://paymaster.example.com" + * }); + * ``` + * + * @param {ToSmartWalletOptions} options - Configuration options + * @param {string} options.smartWalletAddress - The deployed smart wallet's address + * @param {Signer} options.signer - The owner's signer instance + * @returns {SmartWallet} A configured SmartWallet instance ready for transaction submission + * @throws {Error} If the signer is not an original owner of the wallet + */ +export function toSmartWallet(options: ToSmartWalletOptions): SmartWallet { + const wallet: SmartWallet = { + address: options.smartWalletAddress, + owners: [options.signer], + type: "smart", + sendUserOperation: options => sendUserOperation(wallet, options), + useNetwork: (options: SmartWalletNetworkOptions) => { + const network = createNetwork(options.chainId); + return { + ...wallet, + network, + paymasterUrl: options.paymasterUrl, + sendUserOperation: options => + sendUserOperation(wallet, { + ...options, + chainId: network.chainId, + }), + } as NetworkScopedSmartWallet; + }, + }; + + return wallet; +} diff --git a/src/wallets/types.ts b/src/wallets/types.ts new file mode 100644 index 00000000..88798821 --- /dev/null +++ b/src/wallets/types.ts @@ -0,0 +1,92 @@ +import type { Hash, Hex, Address } from "../types/misc"; +import type { + SendUserOperationOptions, + SendUserOperationReturnType, +} from "../actions/sendUserOperation"; +import type { Network, SupportedChainId } from "../types/chain"; +import type { Prettify } from "../types/utils"; + +/** + * Options for configuring a SmartWallet for a specific network + */ +export type SmartWalletNetworkOptions = { + /** The chain ID of the network to connect to */ + chainId: SupportedChainId; + /** Optional URL for the paymaster service */ + paymasterUrl?: string; +}; + +/** + * Represents a signer that can sign messages + */ +export type Signer = { + /** The address of the signer */ + address: Address; + /** Signs a message hash and returns the signature as a hex string */ + sign: (parameters: { hash: Hash }) => Promise; +}; + +/** + * Represents a SmartWallet with user operation capabilities + */ +export type SmartWallet = { + /** The smart wallet's address */ + address: Address; + /** Array of signers that own the wallet (currently only supports one owner) */ + owners: Signer[]; + /** Identifier for the wallet type */ + type: "smart"; + /** + * Sends a user operation to the network + * + * @param {SmartWallet} wallet - The smart wallet to send the user operation from + * @param - {@link SendUserOperationOptions} options - The options for the user operation + * @returns {Promise} The result of the user operation + * + * @example + * ```ts + * import { sendUserOperation } from "@coinbase/coinbase-sdk"; + * import { parseEther } from "viem"; + * + * const result = await sendUserOperation(wallet, { + * calls: [ + * { + * to: "0x1234567890123456789012345678901234567890", + * abi: erc20Abi, + * functionName: "transfer", + * args: [to, amount], + * }, + * { + * to: "0x1234567890123456789012345678901234567890", + * data: "0x", + * value: parseEther("0.0000005"), + * }, + * ], + * chainId: 1, + * paymasterUrl: "https://api.developer.coinbase.com/rpc/v1/base/someapikey", + * }); + * ``` + * + */ + sendUserOperation: ( + options: SendUserOperationOptions, + ) => Promise; + /** Configures the wallet for a specific network */ + useNetwork: (options: SmartWalletNetworkOptions) => NetworkScopedSmartWallet; +}; + +/** + * A smart wallet that's configured for a specific network + */ +export type NetworkScopedSmartWallet = Prettify< + Omit & { + /** The network configuration */ + network: Network; + /** Optional URL for the paymaster service */ + paymasterUrl?: string; + /** Sends a user operation to the configured network */ + sendUserOperation: ( + options: Prettify, "chainId" | "paymasterUrl">>, + ) => Promise; + } +>; diff --git a/tsconfig.json b/tsconfig.json index cd1abaa1..12c5dcc6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,14 +5,15 @@ "outDir": "./dist", "rootDir": "./src", "strict": true, + "resolveJsonModule": true, "esModuleInterop": true, "moduleResolution": "node", "skipLibCheck": true, "forceConsistentCasingInFileNames": true, "declaration": true, "noImplicitAny": false, - "removeComments": true + "removeComments": false }, "include": ["src/**/*.ts"], - "exclude": ["node_modules", "dist", "**/__tests__/**/**"] + "exclude": ["node_modules", "dist", "src/**/*.test.ts", "**/tests/**"] } diff --git a/yarn.lock b/yarn.lock deleted file mode 100644 index 2089a564..00000000 --- a/yarn.lock +++ /dev/null @@ -1,3496 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@adraffy/ens-normalize@1.10.1": - version "1.10.1" - resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.10.1.tgz#63430d04bd8c5e74f8d7d049338f1cd9d4f02069" - integrity sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw== - -"@ampproject/remapping@^2.2.0": - version "2.3.0" - resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.3.0.tgz#ed441b6fa600072520ce18b43d2c8cc8caecc7f4" - integrity sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw== - dependencies: - "@jridgewell/gen-mapping" "^0.3.5" - "@jridgewell/trace-mapping" "^0.3.24" - -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.23.5", "@babel/code-frame@^7.24.2": - version "7.24.2" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.2.tgz#718b4b19841809a58b29b68cde80bc5e1aa6d9ae" - integrity sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ== - dependencies: - "@babel/highlight" "^7.24.2" - picocolors "^1.0.0" - -"@babel/compat-data@^7.23.5": - version "7.24.4" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.24.4.tgz#6f102372e9094f25d908ca0d34fc74c74606059a" - integrity sha512-vg8Gih2MLK+kOkHJp4gBEIkyaIi00jgWot2D9QOmmfLC8jINSOzmCLta6Bvz/JSBCqnegV0L80jhxkol5GWNfQ== - -"@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.24.5.tgz#15ab5b98e101972d171aeef92ac70d8d6718f06a" - integrity sha512-tVQRucExLQ02Boi4vdPp49svNGcfL2GhdTCT9aldhXgCJVAI21EtRfBettiuLUwce/7r6bFdgs6JFkcdTiFttA== - dependencies: - "@ampproject/remapping" "^2.2.0" - "@babel/code-frame" "^7.24.2" - "@babel/generator" "^7.24.5" - "@babel/helper-compilation-targets" "^7.23.6" - "@babel/helper-module-transforms" "^7.24.5" - "@babel/helpers" "^7.24.5" - "@babel/parser" "^7.24.5" - "@babel/template" "^7.24.0" - "@babel/traverse" "^7.24.5" - "@babel/types" "^7.24.5" - convert-source-map "^2.0.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.2.3" - semver "^6.3.1" - -"@babel/generator@^7.24.5", "@babel/generator@^7.7.2": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.24.5.tgz#e5afc068f932f05616b66713e28d0f04e99daeb3" - integrity sha512-x32i4hEXvr+iI0NEoEfDKzlemF8AmtOP8CcrRaEcpzysWuoEb1KknpcvMsHKPONoKZiDuItklgWhB18xEhr9PA== - dependencies: - "@babel/types" "^7.24.5" - "@jridgewell/gen-mapping" "^0.3.5" - "@jridgewell/trace-mapping" "^0.3.25" - jsesc "^2.5.1" - -"@babel/helper-compilation-targets@^7.23.6": - version "7.23.6" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz#4d79069b16cbcf1461289eccfbbd81501ae39991" - integrity sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ== - dependencies: - "@babel/compat-data" "^7.23.5" - "@babel/helper-validator-option" "^7.23.5" - browserslist "^4.22.2" - lru-cache "^5.1.1" - semver "^6.3.1" - -"@babel/helper-environment-visitor@^7.22.20": - version "7.22.20" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz#96159db61d34a29dba454c959f5ae4a649ba9167" - integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA== - -"@babel/helper-function-name@^7.23.0": - version "7.23.0" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz#1f9a3cdbd5b2698a670c30d2735f9af95ed52759" - integrity sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw== - dependencies: - "@babel/template" "^7.22.15" - "@babel/types" "^7.23.0" - -"@babel/helper-hoist-variables@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz#c01a007dac05c085914e8fb652b339db50d823bb" - integrity sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw== - dependencies: - "@babel/types" "^7.22.5" - -"@babel/helper-module-imports@^7.24.3": - version "7.24.3" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.24.3.tgz#6ac476e6d168c7c23ff3ba3cf4f7841d46ac8128" - integrity sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg== - dependencies: - "@babel/types" "^7.24.0" - -"@babel/helper-module-transforms@^7.24.5": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.24.5.tgz#ea6c5e33f7b262a0ae762fd5986355c45f54a545" - integrity sha512-9GxeY8c2d2mdQUP1Dye0ks3VDyIMS98kt/llQ2nUId8IsWqTF0l1LkSX0/uP7l7MCDrzXS009Hyhe2gzTiGW8A== - dependencies: - "@babel/helper-environment-visitor" "^7.22.20" - "@babel/helper-module-imports" "^7.24.3" - "@babel/helper-simple-access" "^7.24.5" - "@babel/helper-split-export-declaration" "^7.24.5" - "@babel/helper-validator-identifier" "^7.24.5" - -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.24.0", "@babel/helper-plugin-utils@^7.8.0": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.5.tgz#a924607dd254a65695e5bd209b98b902b3b2f11a" - integrity sha512-xjNLDopRzW2o6ba0gKbkZq5YWEBaK3PCyTOY1K2P/O07LGMhMqlMXPxwN4S5/RhWuCobT8z0jrlKGlYmeR1OhQ== - -"@babel/helper-simple-access@^7.24.5": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.24.5.tgz#50da5b72f58c16b07fbd992810be6049478e85ba" - integrity sha512-uH3Hmf5q5n7n8mz7arjUlDOCbttY/DW4DYhE6FUsjKJ/oYC1kQQUvwEQWxRwUpX9qQKRXeqLwWxrqilMrf32sQ== - dependencies: - "@babel/types" "^7.24.5" - -"@babel/helper-split-export-declaration@^7.24.5": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.5.tgz#b9a67f06a46b0b339323617c8c6213b9055a78b6" - integrity sha512-5CHncttXohrHk8GWOFCcCl4oRD9fKosWlIRgWm4ql9VYioKm52Mk2xsmoohvm7f3JoiLSM5ZgJuRaf5QZZYd3Q== - dependencies: - "@babel/types" "^7.24.5" - -"@babel/helper-string-parser@^7.24.1": - version "7.24.1" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz#f99c36d3593db9540705d0739a1f10b5e20c696e" - integrity sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ== - -"@babel/helper-validator-identifier@^7.24.5": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.5.tgz#918b1a7fa23056603506370089bd990d8720db62" - integrity sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA== - -"@babel/helper-validator-option@^7.23.5": - version "7.23.5" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz#907a3fbd4523426285365d1206c423c4c5520307" - integrity sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw== - -"@babel/helpers@^7.24.5": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.24.5.tgz#fedeb87eeafa62b621160402181ad8585a22a40a" - integrity sha512-CiQmBMMpMQHwM5m01YnrM6imUG1ebgYJ+fAIW4FZe6m4qHTPaRHti+R8cggAwkdz4oXhtO4/K9JWlh+8hIfR2Q== - dependencies: - "@babel/template" "^7.24.0" - "@babel/traverse" "^7.24.5" - "@babel/types" "^7.24.5" - -"@babel/highlight@^7.24.2": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.5.tgz#bc0613f98e1dd0720e99b2a9ee3760194a704b6e" - integrity sha512-8lLmua6AVh/8SLJRRVD6V8p73Hir9w5mJrhE+IPpILG31KKlI9iz5zmBYKcWPS59qSfgP9RaSBQSHHE81WKuEw== - dependencies: - "@babel/helper-validator-identifier" "^7.24.5" - chalk "^2.4.2" - js-tokens "^4.0.0" - picocolors "^1.0.0" - -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.24.0", "@babel/parser@^7.24.5": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.5.tgz#4a4d5ab4315579e5398a82dcf636ca80c3392790" - integrity sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg== - -"@babel/plugin-syntax-async-generators@^7.8.4": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" - integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-bigint@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz#4c9a6f669f5d0cdf1b90a1671e9a146be5300cea" - integrity sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-class-properties@^7.8.3": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" - integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== - dependencies: - "@babel/helper-plugin-utils" "^7.12.13" - -"@babel/plugin-syntax-import-meta@^7.8.3": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" - integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-json-strings@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" - integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-jsx@^7.7.2": - version "7.24.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.1.tgz#3f6ca04b8c841811dbc3c5c5f837934e0d626c10" - integrity sha512-2eCtxZXf+kbkMIsXS4poTvT4Yu5rXiRa+9xGVT56raghjmBTKMpFNc9R4IDiB4emao9eO22Ox7CxuJG7BgExqA== - dependencies: - "@babel/helper-plugin-utils" "^7.24.0" - -"@babel/plugin-syntax-logical-assignment-operators@^7.8.3": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" - integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" - integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-numeric-separator@^7.8.3": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" - integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-object-rest-spread@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" - integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-optional-catch-binding@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1" - integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-optional-chaining@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" - integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-top-level-await@^7.8.3": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" - integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-syntax-typescript@^7.7.2": - version "7.24.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.1.tgz#b3bcc51f396d15f3591683f90239de143c076844" - integrity sha512-Yhnmvy5HZEnHUty6i++gcfH1/l68AHnItFHnaCv6hn9dNh0hQvvQJsxpi4BMBFN5DLeHBuucT/0DgzXif/OyRw== - dependencies: - "@babel/helper-plugin-utils" "^7.24.0" - -"@babel/template@^7.22.15", "@babel/template@^7.24.0", "@babel/template@^7.3.3": - version "7.24.0" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.24.0.tgz#c6a524aa93a4a05d66aaf31654258fae69d87d50" - integrity sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA== - dependencies: - "@babel/code-frame" "^7.23.5" - "@babel/parser" "^7.24.0" - "@babel/types" "^7.24.0" - -"@babel/traverse@^7.24.5": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.24.5.tgz#972aa0bc45f16983bf64aa1f877b2dd0eea7e6f8" - integrity sha512-7aaBLeDQ4zYcUFDUD41lJc1fG8+5IU9DaNSJAgal866FGvmD5EbWQgnEC6kO1gGLsX0esNkfnJSndbTXA3r7UA== - dependencies: - "@babel/code-frame" "^7.24.2" - "@babel/generator" "^7.24.5" - "@babel/helper-environment-visitor" "^7.22.20" - "@babel/helper-function-name" "^7.23.0" - "@babel/helper-hoist-variables" "^7.22.5" - "@babel/helper-split-export-declaration" "^7.24.5" - "@babel/parser" "^7.24.5" - "@babel/types" "^7.24.5" - debug "^4.3.1" - globals "^11.1.0" - -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.24.0", "@babel/types@^7.24.5", "@babel/types@^7.3.3": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.5.tgz#7661930afc638a5383eb0c4aee59b74f38db84d7" - integrity sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ== - dependencies: - "@babel/helper-string-parser" "^7.24.1" - "@babel/helper-validator-identifier" "^7.24.5" - to-fast-properties "^2.0.0" - -"@bcoe/v8-coverage@^0.2.3": - version "0.2.3" - resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" - integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== - -"@cspotcode/source-map-support@^0.8.0": - version "0.8.1" - resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" - integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== - dependencies: - "@jridgewell/trace-mapping" "0.3.9" - -"@es-joy/jsdoccomment@~0.43.0": - version "0.43.0" - resolved "https://registry.yarnpkg.com/@es-joy/jsdoccomment/-/jsdoccomment-0.43.0.tgz#35c295cadd0a939d1a3a6cd1548f66ec76d38870" - integrity sha512-Q1CnsQrytI3TlCB1IVWXWeqUIPGVEKGaE7IbVdt13Nq/3i0JESAkQQERrfiQkmlpijl+++qyqPgaS31Bvc1jRQ== - dependencies: - "@types/eslint" "^8.56.5" - "@types/estree" "^1.0.5" - "@typescript-eslint/types" "^7.2.0" - comment-parser "1.4.1" - esquery "^1.5.0" - jsdoc-type-pratt-parser "~4.0.0" - -"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": - version "4.4.0" - resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" - integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== - dependencies: - eslint-visitor-keys "^3.3.0" - -"@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.6.1": - version "4.10.0" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63" - integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== - -"@eslint/eslintrc@^2.1.4": - version "2.1.4" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.4.tgz#388a269f0f25c1b6adc317b5a2c55714894c70ad" - integrity sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ== - dependencies: - ajv "^6.12.4" - debug "^4.3.2" - espree "^9.6.0" - globals "^13.19.0" - ignore "^5.2.0" - import-fresh "^3.2.1" - js-yaml "^4.1.0" - minimatch "^3.1.2" - strip-json-comments "^3.1.1" - -"@eslint/js@8.57.0": - version "8.57.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.0.tgz#a5417ae8427873f1dd08b70b3574b453e67b5f7f" - integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g== - -"@humanwhocodes/config-array@^0.11.14": - version "0.11.14" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.14.tgz#d78e481a039f7566ecc9660b4ea7fe6b1fec442b" - integrity sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg== - dependencies: - "@humanwhocodes/object-schema" "^2.0.2" - debug "^4.3.1" - minimatch "^3.0.5" - -"@humanwhocodes/module-importer@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" - integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== - -"@humanwhocodes/object-schema@^2.0.2": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3" - integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== - -"@istanbuljs/load-nyc-config@^1.0.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" - integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== - dependencies: - camelcase "^5.3.1" - find-up "^4.1.0" - get-package-type "^0.1.0" - js-yaml "^3.13.1" - resolve-from "^5.0.0" - -"@istanbuljs/schema@^0.1.2", "@istanbuljs/schema@^0.1.3": - version "0.1.3" - resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" - integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== - -"@jest/console@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-29.7.0.tgz#cd4822dbdb84529265c5a2bdb529a3c9cc950ffc" - integrity sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg== - dependencies: - "@jest/types" "^29.6.3" - "@types/node" "*" - chalk "^4.0.0" - jest-message-util "^29.7.0" - jest-util "^29.7.0" - slash "^3.0.0" - -"@jest/core@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-29.7.0.tgz#b6cccc239f30ff36609658c5a5e2291757ce448f" - integrity sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg== - dependencies: - "@jest/console" "^29.7.0" - "@jest/reporters" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - ansi-escapes "^4.2.1" - chalk "^4.0.0" - ci-info "^3.2.0" - exit "^0.1.2" - graceful-fs "^4.2.9" - jest-changed-files "^29.7.0" - jest-config "^29.7.0" - jest-haste-map "^29.7.0" - jest-message-util "^29.7.0" - jest-regex-util "^29.6.3" - jest-resolve "^29.7.0" - jest-resolve-dependencies "^29.7.0" - jest-runner "^29.7.0" - jest-runtime "^29.7.0" - jest-snapshot "^29.7.0" - jest-util "^29.7.0" - jest-validate "^29.7.0" - jest-watcher "^29.7.0" - micromatch "^4.0.4" - pretty-format "^29.7.0" - slash "^3.0.0" - strip-ansi "^6.0.0" - -"@jest/environment@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.7.0.tgz#24d61f54ff1f786f3cd4073b4b94416383baf2a7" - integrity sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw== - dependencies: - "@jest/fake-timers" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - jest-mock "^29.7.0" - -"@jest/expect-utils@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.7.0.tgz#023efe5d26a8a70f21677d0a1afc0f0a44e3a1c6" - integrity sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA== - dependencies: - jest-get-type "^29.6.3" - -"@jest/expect@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-29.7.0.tgz#76a3edb0cb753b70dfbfe23283510d3d45432bf2" - integrity sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ== - dependencies: - expect "^29.7.0" - jest-snapshot "^29.7.0" - -"@jest/fake-timers@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.7.0.tgz#fd91bf1fffb16d7d0d24a426ab1a47a49881a565" - integrity sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ== - dependencies: - "@jest/types" "^29.6.3" - "@sinonjs/fake-timers" "^10.0.2" - "@types/node" "*" - jest-message-util "^29.7.0" - jest-mock "^29.7.0" - jest-util "^29.7.0" - -"@jest/globals@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.7.0.tgz#8d9290f9ec47ff772607fa864ca1d5a2efae1d4d" - integrity sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ== - dependencies: - "@jest/environment" "^29.7.0" - "@jest/expect" "^29.7.0" - "@jest/types" "^29.6.3" - jest-mock "^29.7.0" - -"@jest/reporters@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.7.0.tgz#04b262ecb3b8faa83b0b3d321623972393e8f4c7" - integrity sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg== - dependencies: - "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" - "@jridgewell/trace-mapping" "^0.3.18" - "@types/node" "*" - chalk "^4.0.0" - collect-v8-coverage "^1.0.0" - exit "^0.1.2" - glob "^7.1.3" - graceful-fs "^4.2.9" - istanbul-lib-coverage "^3.0.0" - istanbul-lib-instrument "^6.0.0" - istanbul-lib-report "^3.0.0" - istanbul-lib-source-maps "^4.0.0" - istanbul-reports "^3.1.3" - jest-message-util "^29.7.0" - jest-util "^29.7.0" - jest-worker "^29.7.0" - slash "^3.0.0" - string-length "^4.0.1" - strip-ansi "^6.0.0" - v8-to-istanbul "^9.0.1" - -"@jest/schemas@^29.6.3": - version "29.6.3" - resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03" - integrity sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA== - dependencies: - "@sinclair/typebox" "^0.27.8" - -"@jest/source-map@^29.6.3": - version "29.6.3" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-29.6.3.tgz#d90ba772095cf37a34a5eb9413f1b562a08554c4" - integrity sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw== - dependencies: - "@jridgewell/trace-mapping" "^0.3.18" - callsites "^3.0.0" - graceful-fs "^4.2.9" - -"@jest/test-result@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-29.7.0.tgz#8db9a80aa1a097bb2262572686734baed9b1657c" - integrity sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA== - dependencies: - "@jest/console" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/istanbul-lib-coverage" "^2.0.0" - collect-v8-coverage "^1.0.0" - -"@jest/test-sequencer@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz#6cef977ce1d39834a3aea887a1726628a6f072ce" - integrity sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw== - dependencies: - "@jest/test-result" "^29.7.0" - graceful-fs "^4.2.9" - jest-haste-map "^29.7.0" - slash "^3.0.0" - -"@jest/transform@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.7.0.tgz#df2dd9c346c7d7768b8a06639994640c642e284c" - integrity sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw== - dependencies: - "@babel/core" "^7.11.6" - "@jest/types" "^29.6.3" - "@jridgewell/trace-mapping" "^0.3.18" - babel-plugin-istanbul "^6.1.1" - chalk "^4.0.0" - convert-source-map "^2.0.0" - fast-json-stable-stringify "^2.1.0" - graceful-fs "^4.2.9" - jest-haste-map "^29.7.0" - jest-regex-util "^29.6.3" - jest-util "^29.7.0" - micromatch "^4.0.4" - pirates "^4.0.4" - slash "^3.0.0" - write-file-atomic "^4.0.2" - -"@jest/types@^29.6.3": - version "29.6.3" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.6.3.tgz#1131f8cf634e7e84c5e77bab12f052af585fba59" - integrity sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw== - dependencies: - "@jest/schemas" "^29.6.3" - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" - "@types/node" "*" - "@types/yargs" "^17.0.8" - chalk "^4.0.0" - -"@jridgewell/gen-mapping@^0.3.5": - version "0.3.5" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36" - integrity sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg== - dependencies: - "@jridgewell/set-array" "^1.2.1" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping" "^0.3.24" - -"@jridgewell/resolve-uri@^3.0.3", "@jridgewell/resolve-uri@^3.1.0": - version "3.1.2" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" - integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== - -"@jridgewell/set-array@^1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.2.1.tgz#558fb6472ed16a4c850b889530e6b36438c49280" - integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== - -"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": - version "1.4.15" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" - integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== - -"@jridgewell/trace-mapping@0.3.9": - version "0.3.9" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" - integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== - dependencies: - "@jridgewell/resolve-uri" "^3.0.3" - "@jridgewell/sourcemap-codec" "^1.4.10" - -"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": - version "0.3.25" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" - integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== - dependencies: - "@jridgewell/resolve-uri" "^3.1.0" - "@jridgewell/sourcemap-codec" "^1.4.14" - -"@noble/curves@1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.2.0.tgz#92d7e12e4e49b23105a2555c6984d41733d65c35" - integrity sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw== - dependencies: - "@noble/hashes" "1.3.2" - -"@noble/curves@~1.4.0": - version "1.4.0" - resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.4.0.tgz#f05771ef64da724997f69ee1261b2417a49522d6" - integrity sha512-p+4cb332SFCrReJkCYe8Xzm0OWi4Jji5jVdIZRL/PmacmDkFNw6MrrV+gGpiPxLHbV+zKFRywUWbaseT+tZRXg== - dependencies: - "@noble/hashes" "1.4.0" - -"@noble/hashes@1.3.2": - version "1.3.2" - resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.2.tgz#6f26dbc8fbc7205873ce3cee2f690eba0d421b39" - integrity sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ== - -"@noble/hashes@1.4.0", "@noble/hashes@^1.2.0", "@noble/hashes@~1.4.0": - version "1.4.0" - resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.4.0.tgz#45814aa329f30e4fe0ba49426f49dfccdd066426" - integrity sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg== - -"@nodelib/fs.scandir@2.1.5": - version "2.1.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" - integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== - dependencies: - "@nodelib/fs.stat" "2.0.5" - run-parallel "^1.1.9" - -"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" - integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== - -"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": - version "1.2.8" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" - integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== - dependencies: - "@nodelib/fs.scandir" "2.1.5" - fastq "^1.6.0" - -"@pkgr/core@^0.1.0": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.1.1.tgz#1ec17e2edbec25c8306d424ecfbf13c7de1aaa31" - integrity sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA== - -"@scure/base@^1.1.1", "@scure/base@~1.1.6": - version "1.1.6" - resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.6.tgz#8ce5d304b436e4c84f896e0550c83e4d88cb917d" - integrity sha512-ok9AWwhcgYuGG3Zfhyqg+zwl+Wn5uE+dwC0NV/2qQkx4dABbb/bx96vWu8NSj+BNjjSjno+JRYRjle1jV08k3g== - -"@scure/bip32@^1.4.0": - version "1.4.0" - resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.4.0.tgz#4e1f1e196abedcef395b33b9674a042524e20d67" - integrity sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg== - dependencies: - "@noble/curves" "~1.4.0" - "@noble/hashes" "~1.4.0" - "@scure/base" "~1.1.6" - -"@sinclair/typebox@^0.27.8": - version "0.27.8" - resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" - integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== - -"@sinonjs/commons@^3.0.0": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-3.0.1.tgz#1029357e44ca901a615585f6d27738dbc89084cd" - integrity sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ== - dependencies: - type-detect "4.0.8" - -"@sinonjs/fake-timers@^10.0.2": - version "10.3.0" - resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz#55fdff1ecab9f354019129daf4df0dd4d923ea66" - integrity sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA== - dependencies: - "@sinonjs/commons" "^3.0.0" - -"@tsconfig/node10@^1.0.7": - version "1.0.11" - resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.11.tgz#6ee46400685f130e278128c7b38b7e031ff5b2f2" - integrity sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw== - -"@tsconfig/node12@^1.0.7": - version "1.0.11" - resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" - integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== - -"@tsconfig/node14@^1.0.0": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" - integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== - -"@tsconfig/node16@^1.0.2": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" - integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== - -"@types/babel__core@^7.1.14": - version "7.20.5" - resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.5.tgz#3df15f27ba85319caa07ba08d0721889bb39c017" - integrity sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA== - dependencies: - "@babel/parser" "^7.20.7" - "@babel/types" "^7.20.7" - "@types/babel__generator" "*" - "@types/babel__template" "*" - "@types/babel__traverse" "*" - -"@types/babel__generator@*": - version "7.6.8" - resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.8.tgz#f836c61f48b1346e7d2b0d93c6dacc5b9535d3ab" - integrity sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw== - dependencies: - "@babel/types" "^7.0.0" - -"@types/babel__template@*": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.4.tgz#5672513701c1b2199bc6dad636a9d7491586766f" - integrity sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A== - dependencies: - "@babel/parser" "^7.1.0" - "@babel/types" "^7.0.0" - -"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": - version "7.20.5" - resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.20.5.tgz#7b7502be0aa80cc4ef22978846b983edaafcd4dd" - integrity sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ== - dependencies: - "@babel/types" "^7.20.7" - -"@types/eslint@^8.56.5": - version "8.56.10" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.56.10.tgz#eb2370a73bf04a901eeba8f22595c7ee0f7eb58d" - integrity sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ== - dependencies: - "@types/estree" "*" - "@types/json-schema" "*" - -"@types/estree@*", "@types/estree@^1.0.5": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" - integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== - -"@types/graceful-fs@^4.1.3": - version "4.1.9" - resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.9.tgz#2a06bc0f68a20ab37b3e36aa238be6abdf49e8b4" - integrity sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ== - dependencies: - "@types/node" "*" - -"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": - version "2.0.6" - resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz#7739c232a1fee9b4d3ce8985f314c0c6d33549d7" - integrity sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w== - -"@types/istanbul-lib-report@*": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz#53047614ae72e19fc0401d872de3ae2b4ce350bf" - integrity sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA== - dependencies: - "@types/istanbul-lib-coverage" "*" - -"@types/istanbul-reports@^3.0.0": - version "3.0.4" - resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz#0f03e3d2f670fbdac586e34b433783070cc16f54" - integrity sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ== - dependencies: - "@types/istanbul-lib-report" "*" - -"@types/jest@^29.5.12": - version "29.5.12" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.12.tgz#7f7dc6eb4cf246d2474ed78744b05d06ce025544" - integrity sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw== - dependencies: - expect "^29.0.0" - pretty-format "^29.0.0" - -"@types/json-schema@*": - version "7.0.15" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" - integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== - -"@types/node-jose@^1.1.13": - version "1.1.13" - resolved "https://registry.yarnpkg.com/@types/node-jose/-/node-jose-1.1.13.tgz#aeb9f5894afa8ae6c13182ca99d92f4bcc22f70f" - integrity sha512-QjMd4yhwy1EvSToQn0YI3cD29YhyfxFwj7NecuymjLys2/P0FwxWnkgBlFxCai6Y3aBCe7rbwmqwJJawxlgcXw== - dependencies: - "@types/node" "*" - -"@types/node@*", "@types/node@^20.12.11": - version "20.12.12" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.12.tgz#7cbecdf902085cec634fdb362172dfe12b8f2050" - integrity sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw== - dependencies: - undici-types "~5.26.4" - -"@types/node@18.15.13": - version "18.15.13" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.13.tgz#f64277c341150c979e42b00e4ac289290c9df469" - integrity sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q== - -"@types/secp256k1@^4.0.6": - version "4.0.6" - resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-4.0.6.tgz#d60ba2349a51c2cbc5e816dcd831a42029d376bf" - integrity sha512-hHxJU6PAEUn0TP4S/ZOzuTUvJWuZ6eIKeNKb5RBpODvSl6hp1Wrw4s7ATY50rklRCScUDpHzVA/DQdSjJ3UoYQ== - dependencies: - "@types/node" "*" - -"@types/stack-utils@^2.0.0": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.3.tgz#6209321eb2c1712a7e7466422b8cb1fc0d9dd5d8" - integrity sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw== - -"@types/yargs-parser@*": - version "21.0.3" - resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.3.tgz#815e30b786d2e8f0dcd85fd5bcf5e1a04d008f15" - integrity sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ== - -"@types/yargs@^17.0.8": - version "17.0.32" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.32.tgz#030774723a2f7faafebf645f4e5a48371dca6229" - integrity sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog== - dependencies: - "@types/yargs-parser" "*" - -"@typescript-eslint/eslint-plugin@^7.8.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.9.0.tgz#093b96fc4e342226e65d5f18f9c87081e0b04a31" - integrity sha512-6e+X0X3sFe/G/54aC3jt0txuMTURqLyekmEHViqyA2VnxhLMpvA6nqmcjIy+Cr9tLDHPssA74BP5Mx9HQIxBEA== - dependencies: - "@eslint-community/regexpp" "^4.10.0" - "@typescript-eslint/scope-manager" "7.9.0" - "@typescript-eslint/type-utils" "7.9.0" - "@typescript-eslint/utils" "7.9.0" - "@typescript-eslint/visitor-keys" "7.9.0" - graphemer "^1.4.0" - ignore "^5.3.1" - natural-compare "^1.4.0" - ts-api-utils "^1.3.0" - -"@typescript-eslint/parser@^7.8.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.9.0.tgz#fb3ba01b75e0e65cb78037a360961b00301f6c70" - integrity sha512-qHMJfkL5qvgQB2aLvhUSXxbK7OLnDkwPzFalg458pxQgfxKDfT1ZDbHQM/I6mDIf/svlMkj21kzKuQ2ixJlatQ== - dependencies: - "@typescript-eslint/scope-manager" "7.9.0" - "@typescript-eslint/types" "7.9.0" - "@typescript-eslint/typescript-estree" "7.9.0" - "@typescript-eslint/visitor-keys" "7.9.0" - debug "^4.3.4" - -"@typescript-eslint/scope-manager@7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.9.0.tgz#1dd3e63a4411db356a9d040e75864851b5f2619b" - integrity sha512-ZwPK4DeCDxr3GJltRz5iZejPFAAr4Wk3+2WIBaj1L5PYK5RgxExu/Y68FFVclN0y6GGwH8q+KgKRCvaTmFBbgQ== - dependencies: - "@typescript-eslint/types" "7.9.0" - "@typescript-eslint/visitor-keys" "7.9.0" - -"@typescript-eslint/type-utils@7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.9.0.tgz#f523262e1b66ca65540b7a65a1222db52e0a90c9" - integrity sha512-6Qy8dfut0PFrFRAZsGzuLoM4hre4gjzWJB6sUvdunCYZsYemTkzZNwF1rnGea326PHPT3zn5Lmg32M/xfJfByA== - dependencies: - "@typescript-eslint/typescript-estree" "7.9.0" - "@typescript-eslint/utils" "7.9.0" - debug "^4.3.4" - ts-api-utils "^1.3.0" - -"@typescript-eslint/types@7.9.0", "@typescript-eslint/types@^7.2.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.9.0.tgz#b58e485e4bfba055659c7e683ad4f5f0821ae2ec" - integrity sha512-oZQD9HEWQanl9UfsbGVcZ2cGaR0YT5476xfWE0oE5kQa2sNK2frxOlkeacLOTh9po4AlUT5rtkGyYM5kew0z5w== - -"@typescript-eslint/typescript-estree@7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.9.0.tgz#3395e27656060dc313a6b406c3a298b729685e07" - integrity sha512-zBCMCkrb2YjpKV3LA0ZJubtKCDxLttxfdGmwZvTqqWevUPN0FZvSI26FalGFFUZU/9YQK/A4xcQF9o/VVaCKAg== - dependencies: - "@typescript-eslint/types" "7.9.0" - "@typescript-eslint/visitor-keys" "7.9.0" - debug "^4.3.4" - globby "^11.1.0" - is-glob "^4.0.3" - minimatch "^9.0.4" - semver "^7.6.0" - ts-api-utils "^1.3.0" - -"@typescript-eslint/utils@7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.9.0.tgz#1b96a34eefdca1c820cb1bbc2751d848b4540899" - integrity sha512-5KVRQCzZajmT4Ep+NEgjXCvjuypVvYHUW7RHlXzNPuak2oWpVoD1jf5xCP0dPAuNIchjC7uQyvbdaSTFaLqSdA== - dependencies: - "@eslint-community/eslint-utils" "^4.4.0" - "@typescript-eslint/scope-manager" "7.9.0" - "@typescript-eslint/types" "7.9.0" - "@typescript-eslint/typescript-estree" "7.9.0" - -"@typescript-eslint/visitor-keys@7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.9.0.tgz#82162656e339c3def02895f5c8546f6888d9b9ea" - integrity sha512-iESPx2TNLDNGQLyjKhUvIKprlP49XNEK+MvIf9nIO7ZZaZdbnfWKHnXAgufpxqfA0YryH8XToi4+CjBgVnFTSQ== - dependencies: - "@typescript-eslint/types" "7.9.0" - eslint-visitor-keys "^3.4.3" - -"@ungap/structured-clone@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" - integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== - -acorn-jsx@^5.3.2: - version "5.3.2" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" - integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== - -acorn-walk@^8.1.1: - version "8.3.2" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.2.tgz#7703af9415f1b6db9315d6895503862e231d34aa" - integrity sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A== - -acorn@^8.4.1, acorn@^8.9.0: - version "8.11.3" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" - integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== - -aes-js@4.0.0-beta.5: - version "4.0.0-beta.5" - resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-4.0.0-beta.5.tgz#8d2452c52adedebc3a3e28465d858c11ca315873" - integrity sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q== - -ajv@^6.12.4: - version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ansi-escapes@^4.2.1: - version "4.3.2" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" - integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== - dependencies: - type-fest "^0.21.3" - -ansi-regex@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" - integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== - -ansi-sequence-parser@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz#e0aa1cdcbc8f8bb0b5bca625aac41f5f056973cf" - integrity sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg== - -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -ansi-styles@^4.0.0, ansi-styles@^4.1.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -ansi-styles@^5.0.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" - integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== - -anymatch@^3.0.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" - integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -are-docs-informative@^0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/are-docs-informative/-/are-docs-informative-0.0.2.tgz#387f0e93f5d45280373d387a59d34c96db321963" - integrity sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig== - -arg@^4.1.0: - version "4.1.3" - resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" - integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== - -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" - -argparse@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" - integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== - -array-union@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" - integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== - -axios-mock-adapter@^1.22.0: - version "1.22.0" - resolved "https://registry.yarnpkg.com/axios-mock-adapter/-/axios-mock-adapter-1.22.0.tgz#0f3e6be0fc9b55baab06f2d49c0b71157e7c053d" - integrity sha512-dmI0KbkyAhntUR05YY96qg2H6gg0XMl2+qTW0xmYg6Up+BFBAJYRLROMXRdDEL06/Wqwa0TJThAYvFtSFdRCZw== - dependencies: - fast-deep-equal "^3.1.3" - is-buffer "^2.0.5" - -axios@^1.6.8: - version "1.6.8" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.8.tgz#66d294951f5d988a00e87a0ffb955316a619ea66" - integrity sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ== - dependencies: - follow-redirects "^1.15.6" - form-data "^4.0.0" - proxy-from-env "^1.1.0" - -babel-jest@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.7.0.tgz#f4369919225b684c56085998ac63dbd05be020d5" - integrity sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg== - dependencies: - "@jest/transform" "^29.7.0" - "@types/babel__core" "^7.1.14" - babel-plugin-istanbul "^6.1.1" - babel-preset-jest "^29.6.3" - chalk "^4.0.0" - graceful-fs "^4.2.9" - slash "^3.0.0" - -babel-plugin-istanbul@^6.1.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73" - integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@istanbuljs/load-nyc-config" "^1.0.0" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-instrument "^5.0.4" - test-exclude "^6.0.0" - -babel-plugin-jest-hoist@^29.6.3: - version "29.6.3" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz#aadbe943464182a8922c3c927c3067ff40d24626" - integrity sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg== - dependencies: - "@babel/template" "^7.3.3" - "@babel/types" "^7.3.3" - "@types/babel__core" "^7.1.14" - "@types/babel__traverse" "^7.0.6" - -babel-preset-current-node-syntax@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz#b4399239b89b2a011f9ddbe3e4f401fc40cff73b" - integrity sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ== - dependencies: - "@babel/plugin-syntax-async-generators" "^7.8.4" - "@babel/plugin-syntax-bigint" "^7.8.3" - "@babel/plugin-syntax-class-properties" "^7.8.3" - "@babel/plugin-syntax-import-meta" "^7.8.3" - "@babel/plugin-syntax-json-strings" "^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators" "^7.8.3" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - "@babel/plugin-syntax-numeric-separator" "^7.8.3" - "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" - "@babel/plugin-syntax-optional-chaining" "^7.8.3" - "@babel/plugin-syntax-top-level-await" "^7.8.3" - -babel-preset-jest@^29.6.3: - version "29.6.3" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz#fa05fa510e7d493896d7b0dd2033601c840f171c" - integrity sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA== - dependencies: - babel-plugin-jest-hoist "^29.6.3" - babel-preset-current-node-syntax "^1.0.0" - -balanced-match@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" - integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== - -base-x@^3.0.2: - version "3.0.9" - resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.9.tgz#6349aaabb58526332de9f60995e548a53fe21320" - integrity sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ== - dependencies: - safe-buffer "^5.0.1" - -base64-js@^1.3.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" - integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== - -base64url@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/base64url/-/base64url-3.0.1.tgz#6399d572e2bc3f90a9a8b22d5dbb0a32d33f788d" - integrity sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A== - -bip32@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/bip32/-/bip32-4.0.0.tgz#7fac3c05072188d2d355a4d6596b37188f06aa2f" - integrity sha512-aOGy88DDlVUhspIXJN+dVEtclhIsfAUppD43V0j40cPTld3pv/0X/MlrZSZ6jowIaQQzFwP8M6rFU2z2mVYjDQ== - dependencies: - "@noble/hashes" "^1.2.0" - "@scure/base" "^1.1.1" - typeforce "^1.11.5" - wif "^2.0.6" - -bip39@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/bip39/-/bip39-3.1.0.tgz#c55a418deaf48826a6ceb34ac55b3ee1577e18a3" - integrity sha512-c9kiwdk45Do5GL0vJMe7tS95VjCii65mYAH7DfWl3uW8AVzXKQVUm64i3hzVybBDMp9r7j9iNxR85+ul8MdN/A== - dependencies: - "@noble/hashes" "^1.2.0" - -bn.js@^4.11.9: - version "4.12.0" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" - integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -brace-expansion@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" - integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== - dependencies: - balanced-match "^1.0.0" - -braces@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" - integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== - dependencies: - fill-range "^7.1.1" - -brorand@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" - integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== - -browserslist@^4.22.2: - version "4.23.0" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.0.tgz#8f3acc2bbe73af7213399430890f86c63a5674ab" - integrity sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ== - dependencies: - caniuse-lite "^1.0.30001587" - electron-to-chromium "^1.4.668" - node-releases "^2.0.14" - update-browserslist-db "^1.0.13" - -bs-logger@0.x: - version "0.2.6" - resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" - integrity sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog== - dependencies: - fast-json-stable-stringify "2.x" - -bs58@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" - integrity sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw== - dependencies: - base-x "^3.0.2" - -bs58check@<3.0.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc" - integrity sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA== - dependencies: - bs58 "^4.0.0" - create-hash "^1.1.0" - safe-buffer "^5.1.2" - -bser@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" - integrity sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ== - dependencies: - node-int64 "^0.4.0" - -buffer-from@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" - integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== - -buffer@^6.0.3: - version "6.0.3" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" - integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.2.1" - -builtin-modules@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.3.0.tgz#cae62812b89801e9656336e46223e030386be7b6" - integrity sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw== - -callsites@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" - integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== - -camelcase@^5.3.1: - version "5.3.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" - integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== - -camelcase@^6.2.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" - integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== - -caniuse-lite@^1.0.30001587: - version "1.0.30001620" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001620.tgz#78bb6f35b8fe315b96b8590597094145d0b146b4" - integrity sha512-WJvYsOjd1/BYUY6SNGUosK9DUidBPDTnOARHp3fSmFO1ekdxaY6nKRttEVrfMmYi80ctS0kz1wiWmm14fVc3ew== - -chalk@^2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@^4.0.0: - version "4.1.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -char-regex@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" - integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== - -ci-info@^3.2.0: - version "3.9.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" - integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== - -cipher-base@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" - integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -cjs-module-lexer@^1.0.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.3.1.tgz#c485341ae8fd999ca4ee5af2d7a1c9ae01e0099c" - integrity sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q== - -cliui@^8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" - integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.1" - wrap-ansi "^7.0.0" - -co@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== - -collect-v8-coverage@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz#c0b29bcd33bcd0779a1344c2136051e6afd3d9e9" - integrity sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q== - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== - -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -combined-stream@^1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - -comment-parser@1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/comment-parser/-/comment-parser-1.4.1.tgz#bdafead37961ac079be11eb7ec65c4d021eaf9cc" - integrity sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg== - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== - -convert-source-map@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" - integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== - -create-hash@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" - integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== - dependencies: - cipher-base "^1.0.1" - inherits "^2.0.1" - md5.js "^1.3.4" - ripemd160 "^2.0.1" - sha.js "^2.4.0" - -create-jest@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/create-jest/-/create-jest-29.7.0.tgz#a355c5b3cb1e1af02ba177fe7afd7feee49a5320" - integrity sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q== - dependencies: - "@jest/types" "^29.6.3" - chalk "^4.0.0" - exit "^0.1.2" - graceful-fs "^4.2.9" - jest-config "^29.7.0" - jest-util "^29.7.0" - prompts "^2.0.1" - -create-require@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" - integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== - -cross-spawn@^7.0.2, cross-spawn@^7.0.3: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - -debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - -decimal.js@^10.4.3: - version "10.4.3" - resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.4.3.tgz#1044092884d245d1b7f65725fa4ad4c6f781cc23" - integrity sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA== - -dedent@^1.0.0: - version "1.5.3" - resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.5.3.tgz#99aee19eb9bae55a67327717b6e848d0bf777e5a" - integrity sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ== - -deep-is@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" - integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== - -deepmerge@^4.2.2: - version "4.3.1" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" - integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== - -detect-newline@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" - integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== - -diff-sequences@^29.6.3: - version "29.6.3" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" - integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== - -diff@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" - integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== - -dir-glob@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" - integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== - dependencies: - path-type "^4.0.0" - -doctrine@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" - integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== - dependencies: - esutils "^2.0.2" - -dotenv@^16.4.5: - version "16.4.5" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f" - integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg== - -electron-to-chromium@^1.4.668: - version "1.4.773" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.773.tgz#49741af9bb4e712ad899e35d8344d8d59cdb7e12" - integrity sha512-87eHF+h3PlCRwbxVEAw9KtK3v7lWfc/sUDr0W76955AdYTG4bV/k0zrl585Qnj/skRMH2qOSiE+kqMeOQ+LOpw== - -elliptic@^6.5.4: - version "6.5.5" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.5.tgz#c715e09f78b6923977610d4c2346d6ce22e6dded" - integrity sha512-7EjbcmUm17NQFu4Pmgmq2olYMj8nwMnpcddByChSUjArp8F5DQWcIcpriwO4ZToLNAJig0yiyjswfyGNje/ixw== - dependencies: - bn.js "^4.11.9" - brorand "^1.1.0" - hash.js "^1.0.0" - hmac-drbg "^1.0.1" - inherits "^2.0.4" - minimalistic-assert "^1.0.1" - minimalistic-crypto-utils "^1.0.1" - -emittery@^0.13.1: - version "0.13.1" - resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.13.1.tgz#c04b8c3457490e0847ae51fced3af52d338e3dad" - integrity sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ== - -emoji-regex@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" - integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - -error-ex@^1.3.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - dependencies: - is-arrayish "^0.2.1" - -es6-promise@^4.2.8: - version "4.2.8" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" - integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== - -escalade@^3.1.1, escalade@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" - integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== - -escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== - -escape-string-regexp@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" - integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== - -escape-string-regexp@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" - integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== - -eslint-config-prettier@^9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz#31af3d94578645966c082fcb71a5846d3c94867f" - integrity sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw== - -eslint-plugin-jsdoc@^48.2.5: - version "48.2.5" - resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-48.2.5.tgz#66ec712632852faa15065a094342786858f13c49" - integrity sha512-ZeTfKV474W1N9niWfawpwsXGu+ZoMXu4417eBROX31d7ZuOk8zyG66SO77DpJ2+A9Wa2scw/jRqBPnnQo7VbcQ== - dependencies: - "@es-joy/jsdoccomment" "~0.43.0" - are-docs-informative "^0.0.2" - comment-parser "1.4.1" - debug "^4.3.4" - escape-string-regexp "^4.0.0" - esquery "^1.5.0" - is-builtin-module "^3.2.1" - semver "^7.6.1" - spdx-expression-parse "^4.0.0" - -eslint-plugin-prettier@^5.1.3: - version "5.1.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.3.tgz#17cfade9e732cef32b5f5be53bd4e07afd8e67e1" - integrity sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw== - dependencies: - prettier-linter-helpers "^1.0.0" - synckit "^0.8.6" - -eslint-scope@^7.2.2: - version "7.2.2" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f" - integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== - dependencies: - esrecurse "^4.3.0" - estraverse "^5.2.0" - -eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: - version "3.4.3" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" - integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== - -eslint@^8.57.0: - version "8.57.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.0.tgz#c786a6fd0e0b68941aaf624596fb987089195668" - integrity sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ== - dependencies: - "@eslint-community/eslint-utils" "^4.2.0" - "@eslint-community/regexpp" "^4.6.1" - "@eslint/eslintrc" "^2.1.4" - "@eslint/js" "8.57.0" - "@humanwhocodes/config-array" "^0.11.14" - "@humanwhocodes/module-importer" "^1.0.1" - "@nodelib/fs.walk" "^1.2.8" - "@ungap/structured-clone" "^1.2.0" - ajv "^6.12.4" - chalk "^4.0.0" - cross-spawn "^7.0.2" - debug "^4.3.2" - doctrine "^3.0.0" - escape-string-regexp "^4.0.0" - eslint-scope "^7.2.2" - eslint-visitor-keys "^3.4.3" - espree "^9.6.1" - esquery "^1.4.2" - esutils "^2.0.2" - fast-deep-equal "^3.1.3" - file-entry-cache "^6.0.1" - find-up "^5.0.0" - glob-parent "^6.0.2" - globals "^13.19.0" - graphemer "^1.4.0" - ignore "^5.2.0" - imurmurhash "^0.1.4" - is-glob "^4.0.0" - is-path-inside "^3.0.3" - js-yaml "^4.1.0" - json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.4.1" - lodash.merge "^4.6.2" - minimatch "^3.1.2" - natural-compare "^1.4.0" - optionator "^0.9.3" - strip-ansi "^6.0.1" - text-table "^0.2.0" - -espree@^9.6.0, espree@^9.6.1: - version "9.6.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" - integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== - dependencies: - acorn "^8.9.0" - acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.4.1" - -esprima@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -esquery@^1.4.2, esquery@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" - integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== - dependencies: - estraverse "^5.1.0" - -esrecurse@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" - integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== - dependencies: - estraverse "^5.2.0" - -estraverse@^5.1.0, estraverse@^5.2.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" - integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== - -esutils@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" - integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== - -ethers@^6.12.1: - version "6.13.1" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-6.13.1.tgz#2b9f9c7455cde9d38b30fe6589972eb083652961" - integrity sha512-hdJ2HOxg/xx97Lm9HdCWk949BfYqYWpyw4//78SiwOLgASyfrNszfMUNB2joKjvGUdwhHfaiMMFFwacVVoLR9A== - dependencies: - "@adraffy/ens-normalize" "1.10.1" - "@noble/curves" "1.2.0" - "@noble/hashes" "1.3.2" - "@types/node" "18.15.13" - aes-js "4.0.0-beta.5" - tslib "2.4.0" - ws "8.17.1" - -execa@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" - integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== - dependencies: - cross-spawn "^7.0.3" - get-stream "^6.0.0" - human-signals "^2.1.0" - is-stream "^2.0.0" - merge-stream "^2.0.0" - npm-run-path "^4.0.1" - onetime "^5.1.2" - signal-exit "^3.0.3" - strip-final-newline "^2.0.0" - -exit@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" - integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== - -expect@^29.0.0, expect@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/expect/-/expect-29.7.0.tgz#578874590dcb3214514084c08115d8aee61e11bc" - integrity sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw== - dependencies: - "@jest/expect-utils" "^29.7.0" - jest-get-type "^29.6.3" - jest-matcher-utils "^29.7.0" - jest-message-util "^29.7.0" - jest-util "^29.7.0" - -fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - -fast-diff@^1.1.2: - version "1.3.0" - resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0" - integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw== - -fast-glob@^3.2.9: - version "3.3.2" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" - integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== - dependencies: - "@nodelib/fs.stat" "^2.0.2" - "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.2" - merge2 "^1.3.0" - micromatch "^4.0.4" - -fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fast-levenshtein@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== - -fastq@^1.6.0: - version "1.17.1" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.17.1.tgz#2a523f07a4e7b1e81a42b91b8bf2254107753b47" - integrity sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w== - dependencies: - reusify "^1.0.4" - -fb-watchman@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.2.tgz#e9524ee6b5c77e9e5001af0f85f3adbb8623255c" - integrity sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA== - dependencies: - bser "2.1.1" - -file-entry-cache@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" - integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== - dependencies: - flat-cache "^3.0.4" - -fill-range@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" - integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== - dependencies: - to-regex-range "^5.0.1" - -find-up@^4.0.0, find-up@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" - -find-up@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" - integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - dependencies: - locate-path "^6.0.0" - path-exists "^4.0.0" - -flat-cache@^3.0.4: - version "3.2.0" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.2.0.tgz#2c0c2d5040c99b1632771a9d105725c0115363ee" - integrity sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw== - dependencies: - flatted "^3.2.9" - keyv "^4.5.3" - rimraf "^3.0.2" - -flatted@^3.2.9: - version "3.3.1" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.1.tgz#21db470729a6734d4997002f439cb308987f567a" - integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== - -follow-redirects@^1.15.6: - version "1.15.6" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" - integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== - -form-data@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" - integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== - -fsevents@^2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" - integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== - -function-bind@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" - integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== - -gensync@^1.0.0-beta.2: - version "1.0.0-beta.2" - resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" - integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== - -get-caller-file@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" - integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== - -get-package-type@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" - integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== - -get-stream@^6.0.0: - version "6.0.1" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" - integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== - -glob-parent@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -glob-parent@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" - integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== - dependencies: - is-glob "^4.0.3" - -glob@^7.1.3, glob@^7.1.4: - version "7.2.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" - integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.1.1" - once "^1.3.0" - path-is-absolute "^1.0.0" - -globals@^11.1.0: - version "11.12.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" - integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== - -globals@^13.19.0: - version "13.24.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.24.0.tgz#8432a19d78ce0c1e833949c36adb345400bb1171" - integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ== - dependencies: - type-fest "^0.20.2" - -globby@^11.1.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" - integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== - dependencies: - array-union "^2.1.0" - dir-glob "^3.0.1" - fast-glob "^3.2.9" - ignore "^5.2.0" - merge2 "^1.4.1" - slash "^3.0.0" - -graceful-fs@^4.2.9: - version "4.2.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" - integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== - -graphemer@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" - integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -hash-base@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" - integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== - dependencies: - inherits "^2.0.4" - readable-stream "^3.6.0" - safe-buffer "^5.2.0" - -hash.js@^1.0.0, hash.js@^1.0.3: - version "1.1.7" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" - integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.1" - -hasown@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" - integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== - dependencies: - function-bind "^1.1.2" - -hmac-drbg@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" - integrity sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg== - dependencies: - hash.js "^1.0.3" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.1" - -html-escaper@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" - integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== - -human-signals@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" - integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== - -ieee754@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" - integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== - -ignore@^5.2.0, ignore@^5.3.1: - version "5.3.1" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" - integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== - -import-fresh@^3.2.1: - version "3.3.0" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" - integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== - dependencies: - parent-module "^1.0.0" - resolve-from "^4.0.0" - -import-local@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4" - integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== - dependencies: - pkg-dir "^4.2.0" - resolve-cwd "^3.0.0" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== - -is-buffer@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" - integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== - -is-builtin-module@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-3.2.1.tgz#f03271717d8654cfcaf07ab0463faa3571581169" - integrity sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A== - dependencies: - builtin-modules "^3.3.0" - -is-core-module@^2.13.0: - version "2.13.1" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" - integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== - dependencies: - hasown "^2.0.0" - -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== - -is-fullwidth-code-point@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" - integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - -is-generator-fn@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" - integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== - -is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" - integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== - dependencies: - is-extglob "^2.1.1" - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -is-path-inside@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" - integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== - -is-stream@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" - integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== - -istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz#2d166c4b0644d43a39f04bf6c2edd1e585f31756" - integrity sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg== - -istanbul-lib-instrument@^5.0.4: - version "5.2.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d" - integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== - dependencies: - "@babel/core" "^7.12.3" - "@babel/parser" "^7.14.7" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-coverage "^3.2.0" - semver "^6.3.0" - -istanbul-lib-instrument@^6.0.0: - version "6.0.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.2.tgz#91655936cf7380e4e473383081e38478b69993b1" - integrity sha512-1WUsZ9R1lA0HtBSohTkm39WTPlNKSJ5iFk7UwqXkBLoHQT+hfqPsfsTDVuZdKGaBwn7din9bS7SsnoAr943hvw== - dependencies: - "@babel/core" "^7.23.9" - "@babel/parser" "^7.23.9" - "@istanbuljs/schema" "^0.1.3" - istanbul-lib-coverage "^3.2.0" - semver "^7.5.4" - -istanbul-lib-report@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz#908305bac9a5bd175ac6a74489eafd0fc2445a7d" - integrity sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw== - dependencies: - istanbul-lib-coverage "^3.0.0" - make-dir "^4.0.0" - supports-color "^7.1.0" - -istanbul-lib-source-maps@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz#895f3a709fcfba34c6de5a42939022f3e4358551" - integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw== - dependencies: - debug "^4.1.1" - istanbul-lib-coverage "^3.0.0" - source-map "^0.6.1" - -istanbul-reports@^3.1.3: - version "3.1.7" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.7.tgz#daed12b9e1dca518e15c056e1e537e741280fa0b" - integrity sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g== - dependencies: - html-escaper "^2.0.0" - istanbul-lib-report "^3.0.0" - -jest-changed-files@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.7.0.tgz#1c06d07e77c78e1585d020424dedc10d6e17ac3a" - integrity sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w== - dependencies: - execa "^5.0.0" - jest-util "^29.7.0" - p-limit "^3.1.0" - -jest-circus@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-29.7.0.tgz#b6817a45fcc835d8b16d5962d0c026473ee3668a" - integrity sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw== - dependencies: - "@jest/environment" "^29.7.0" - "@jest/expect" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - chalk "^4.0.0" - co "^4.6.0" - dedent "^1.0.0" - is-generator-fn "^2.0.0" - jest-each "^29.7.0" - jest-matcher-utils "^29.7.0" - jest-message-util "^29.7.0" - jest-runtime "^29.7.0" - jest-snapshot "^29.7.0" - jest-util "^29.7.0" - p-limit "^3.1.0" - pretty-format "^29.7.0" - pure-rand "^6.0.0" - slash "^3.0.0" - stack-utils "^2.0.3" - -jest-cli@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-29.7.0.tgz#5592c940798e0cae677eec169264f2d839a37995" - integrity sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg== - dependencies: - "@jest/core" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/types" "^29.6.3" - chalk "^4.0.0" - create-jest "^29.7.0" - exit "^0.1.2" - import-local "^3.0.2" - jest-config "^29.7.0" - jest-util "^29.7.0" - jest-validate "^29.7.0" - yargs "^17.3.1" - -jest-config@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-29.7.0.tgz#bcbda8806dbcc01b1e316a46bb74085a84b0245f" - integrity sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ== - dependencies: - "@babel/core" "^7.11.6" - "@jest/test-sequencer" "^29.7.0" - "@jest/types" "^29.6.3" - babel-jest "^29.7.0" - chalk "^4.0.0" - ci-info "^3.2.0" - deepmerge "^4.2.2" - glob "^7.1.3" - graceful-fs "^4.2.9" - jest-circus "^29.7.0" - jest-environment-node "^29.7.0" - jest-get-type "^29.6.3" - jest-regex-util "^29.6.3" - jest-resolve "^29.7.0" - jest-runner "^29.7.0" - jest-util "^29.7.0" - jest-validate "^29.7.0" - micromatch "^4.0.4" - parse-json "^5.2.0" - pretty-format "^29.7.0" - slash "^3.0.0" - strip-json-comments "^3.1.1" - -jest-diff@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.7.0.tgz#017934a66ebb7ecf6f205e84699be10afd70458a" - integrity sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw== - dependencies: - chalk "^4.0.0" - diff-sequences "^29.6.3" - jest-get-type "^29.6.3" - pretty-format "^29.7.0" - -jest-docblock@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-29.7.0.tgz#8fddb6adc3cdc955c93e2a87f61cfd350d5d119a" - integrity sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g== - dependencies: - detect-newline "^3.0.0" - -jest-each@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-29.7.0.tgz#162a9b3f2328bdd991beaabffbb74745e56577d1" - integrity sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ== - dependencies: - "@jest/types" "^29.6.3" - chalk "^4.0.0" - jest-get-type "^29.6.3" - jest-util "^29.7.0" - pretty-format "^29.7.0" - -jest-environment-node@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.7.0.tgz#0b93e111dda8ec120bc8300e6d1fb9576e164376" - integrity sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw== - dependencies: - "@jest/environment" "^29.7.0" - "@jest/fake-timers" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - jest-mock "^29.7.0" - jest-util "^29.7.0" - -jest-get-type@^29.6.3: - version "29.6.3" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.6.3.tgz#36f499fdcea197c1045a127319c0481723908fd1" - integrity sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw== - -jest-haste-map@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.7.0.tgz#3c2396524482f5a0506376e6c858c3bbcc17b104" - integrity sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA== - dependencies: - "@jest/types" "^29.6.3" - "@types/graceful-fs" "^4.1.3" - "@types/node" "*" - anymatch "^3.0.3" - fb-watchman "^2.0.0" - graceful-fs "^4.2.9" - jest-regex-util "^29.6.3" - jest-util "^29.7.0" - jest-worker "^29.7.0" - micromatch "^4.0.4" - walker "^1.0.8" - optionalDependencies: - fsevents "^2.3.2" - -jest-leak-detector@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz#5b7ec0dadfdfec0ca383dc9aa016d36b5ea4c728" - integrity sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw== - dependencies: - jest-get-type "^29.6.3" - pretty-format "^29.7.0" - -jest-matcher-utils@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz#ae8fec79ff249fd592ce80e3ee474e83a6c44f12" - integrity sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g== - dependencies: - chalk "^4.0.0" - jest-diff "^29.7.0" - jest-get-type "^29.6.3" - pretty-format "^29.7.0" - -jest-message-util@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.7.0.tgz#8bc392e204e95dfe7564abbe72a404e28e51f7f3" - integrity sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w== - dependencies: - "@babel/code-frame" "^7.12.13" - "@jest/types" "^29.6.3" - "@types/stack-utils" "^2.0.0" - chalk "^4.0.0" - graceful-fs "^4.2.9" - micromatch "^4.0.4" - pretty-format "^29.7.0" - slash "^3.0.0" - stack-utils "^2.0.3" - -jest-mock@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.7.0.tgz#4e836cf60e99c6fcfabe9f99d017f3fdd50a6347" - integrity sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw== - dependencies: - "@jest/types" "^29.6.3" - "@types/node" "*" - jest-util "^29.7.0" - -jest-pnp-resolver@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz#930b1546164d4ad5937d5540e711d4d38d4cad2e" - integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w== - -jest-regex-util@^29.6.3: - version "29.6.3" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.6.3.tgz#4a556d9c776af68e1c5f48194f4d0327d24e8a52" - integrity sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg== - -jest-resolve-dependencies@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz#1b04f2c095f37fc776ff40803dc92921b1e88428" - integrity sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA== - dependencies: - jest-regex-util "^29.6.3" - jest-snapshot "^29.7.0" - -jest-resolve@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-29.7.0.tgz#64d6a8992dd26f635ab0c01e5eef4399c6bcbc30" - integrity sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA== - dependencies: - chalk "^4.0.0" - graceful-fs "^4.2.9" - jest-haste-map "^29.7.0" - jest-pnp-resolver "^1.2.2" - jest-util "^29.7.0" - jest-validate "^29.7.0" - resolve "^1.20.0" - resolve.exports "^2.0.0" - slash "^3.0.0" - -jest-runner@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-29.7.0.tgz#809af072d408a53dcfd2e849a4c976d3132f718e" - integrity sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ== - dependencies: - "@jest/console" "^29.7.0" - "@jest/environment" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - chalk "^4.0.0" - emittery "^0.13.1" - graceful-fs "^4.2.9" - jest-docblock "^29.7.0" - jest-environment-node "^29.7.0" - jest-haste-map "^29.7.0" - jest-leak-detector "^29.7.0" - jest-message-util "^29.7.0" - jest-resolve "^29.7.0" - jest-runtime "^29.7.0" - jest-util "^29.7.0" - jest-watcher "^29.7.0" - jest-worker "^29.7.0" - p-limit "^3.1.0" - source-map-support "0.5.13" - -jest-runtime@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-29.7.0.tgz#efecb3141cf7d3767a3a0cc8f7c9990587d3d817" - integrity sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ== - dependencies: - "@jest/environment" "^29.7.0" - "@jest/fake-timers" "^29.7.0" - "@jest/globals" "^29.7.0" - "@jest/source-map" "^29.6.3" - "@jest/test-result" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - chalk "^4.0.0" - cjs-module-lexer "^1.0.0" - collect-v8-coverage "^1.0.0" - glob "^7.1.3" - graceful-fs "^4.2.9" - jest-haste-map "^29.7.0" - jest-message-util "^29.7.0" - jest-mock "^29.7.0" - jest-regex-util "^29.6.3" - jest-resolve "^29.7.0" - jest-snapshot "^29.7.0" - jest-util "^29.7.0" - slash "^3.0.0" - strip-bom "^4.0.0" - -jest-snapshot@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.7.0.tgz#c2c574c3f51865da1bb329036778a69bf88a6be5" - integrity sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw== - dependencies: - "@babel/core" "^7.11.6" - "@babel/generator" "^7.7.2" - "@babel/plugin-syntax-jsx" "^7.7.2" - "@babel/plugin-syntax-typescript" "^7.7.2" - "@babel/types" "^7.3.3" - "@jest/expect-utils" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" - babel-preset-current-node-syntax "^1.0.0" - chalk "^4.0.0" - expect "^29.7.0" - graceful-fs "^4.2.9" - jest-diff "^29.7.0" - jest-get-type "^29.6.3" - jest-matcher-utils "^29.7.0" - jest-message-util "^29.7.0" - jest-util "^29.7.0" - natural-compare "^1.4.0" - pretty-format "^29.7.0" - semver "^7.5.3" - -jest-util@^29.0.0, jest-util@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.7.0.tgz#23c2b62bfb22be82b44de98055802ff3710fc0bc" - integrity sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA== - dependencies: - "@jest/types" "^29.6.3" - "@types/node" "*" - chalk "^4.0.0" - ci-info "^3.2.0" - graceful-fs "^4.2.9" - picomatch "^2.2.3" - -jest-validate@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.7.0.tgz#7bf705511c64da591d46b15fce41400d52147d9c" - integrity sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw== - dependencies: - "@jest/types" "^29.6.3" - camelcase "^6.2.0" - chalk "^4.0.0" - jest-get-type "^29.6.3" - leven "^3.1.0" - pretty-format "^29.7.0" - -jest-watcher@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-29.7.0.tgz#7810d30d619c3a62093223ce6bb359ca1b28a2f2" - integrity sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g== - dependencies: - "@jest/test-result" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - ansi-escapes "^4.2.1" - chalk "^4.0.0" - emittery "^0.13.1" - jest-util "^29.7.0" - string-length "^4.0.1" - -jest-worker@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.7.0.tgz#acad073acbbaeb7262bd5389e1bcf43e10058d4a" - integrity sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw== - dependencies: - "@types/node" "*" - jest-util "^29.7.0" - merge-stream "^2.0.0" - supports-color "^8.0.0" - -jest@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest/-/jest-29.7.0.tgz#994676fc24177f088f1c5e3737f5697204ff2613" - integrity sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw== - dependencies: - "@jest/core" "^29.7.0" - "@jest/types" "^29.6.3" - import-local "^3.0.2" - jest-cli "^29.7.0" - -js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -js-yaml@^3.13.1: - version "3.14.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" - integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -js-yaml@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" - -jsdoc-type-pratt-parser@~4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.0.0.tgz#136f0571a99c184d84ec84662c45c29ceff71114" - integrity sha512-YtOli5Cmzy3q4dP26GraSOeAhqecewG04hoO8DY56CH4KJ9Fvv5qKWUCCo3HZob7esJQHCv6/+bnTy72xZZaVQ== - -jsesc@^2.5.1: - version "2.5.2" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" - integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== - -json-buffer@3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" - integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== - -json-parse-even-better-errors@^2.3.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" - integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-stable-stringify-without-jsonify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" - integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== - -json5@^2.2.3: - version "2.2.3" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" - integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== - -jsonc-parser@^3.2.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.1.tgz#031904571ccf929d7670ee8c547545081cb37f1a" - integrity sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA== - -keyv@^4.5.3: - version "4.5.4" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" - integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== - dependencies: - json-buffer "3.0.1" - -kleur@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" - integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== - -leven@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" - integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== - -levn@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" - integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== - dependencies: - prelude-ls "^1.2.1" - type-check "~0.4.0" - -lines-and-columns@^1.1.6: - version "1.2.4" - resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" - integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== - -locate-path@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" - integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== - dependencies: - p-locate "^4.1.0" - -locate-path@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" - integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== - dependencies: - p-locate "^5.0.0" - -lodash.memoize@4.x: - version "4.1.2" - resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" - integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== - -lodash.merge@^4.6.2: - version "4.6.2" - resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" - integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== - -lodash@^4.17.21: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - -long@^5.2.0: - version "5.2.3" - resolved "https://registry.yarnpkg.com/long/-/long-5.2.3.tgz#a3ba97f3877cf1d778eccbcb048525ebb77499e1" - integrity sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q== - -lru-cache@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" - integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== - dependencies: - yallist "^3.0.2" - -lunr@^2.3.9: - version "2.3.9" - resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.9.tgz#18b123142832337dd6e964df1a5a7707b25d35e1" - integrity sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow== - -make-dir@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e" - integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw== - dependencies: - semver "^7.5.3" - -make-error@1.x, make-error@^1.1.1: - version "1.3.6" - resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" - integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== - -makeerror@1.0.12: - version "1.0.12" - resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.12.tgz#3e5dd2079a82e812e983cc6610c4a2cb0eaa801a" - integrity sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg== - dependencies: - tmpl "1.0.5" - -marked@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3" - integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A== - -md5.js@^1.3.4: - version "1.3.5" - resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" - integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -merge-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" - integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== - -merge2@^1.3.0, merge2@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" - integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== - -micromatch@^4.0.4: - version "4.0.5" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" - integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== - dependencies: - braces "^3.0.2" - picomatch "^2.3.1" - -mime-db@1.52.0: - version "1.52.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" - integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== - -mime-types@^2.1.12: - version "2.1.35" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== - dependencies: - mime-db "1.52.0" - -mimic-fn@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" - integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== - -minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" - integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== - -minimalistic-crypto-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" - integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== - -minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -minimatch@^9.0.3, minimatch@^9.0.4: - version "9.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.4.tgz#8e49c731d1749cbec05050ee5145147b32496a51" - integrity sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw== - dependencies: - brace-expansion "^2.0.1" - -mock-fs@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-5.2.0.tgz#3502a9499c84c0a1218ee4bf92ae5bf2ea9b2b5e" - integrity sha512-2dF2R6YMSZbpip1V1WHKGLNjr/k48uQClqMVb5H3MOvwc9qhYis3/IWbj02qIg/Y8MDXKFF4c5v0rxx2o6xTZw== - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== - -node-addon-api@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-5.1.0.tgz#49da1ca055e109a23d537e9de43c09cca21eb762" - integrity sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA== - -node-forge@^1.2.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3" - integrity sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA== - -node-gyp-build@^4.2.0: - version "4.8.1" - resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.8.1.tgz#976d3ad905e71b76086f4f0b0d3637fe79b6cda5" - integrity sha512-OSs33Z9yWr148JZcbZd5WiAXhh/n9z8TxQcdMhIOlpN9AhWpLfvVFO73+m77bBABQMaY9XSvIa+qk0jlI7Gcaw== - -node-int64@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" - integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== - -node-jose@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/node-jose/-/node-jose-2.2.0.tgz#b64f3225ad6bec328509a420800de597ba2bf3ed" - integrity sha512-XPCvJRr94SjLrSIm4pbYHKLEaOsDvJCpyFw/6V/KK/IXmyZ6SFBzAUDO9HQf4DB/nTEFcRGH87mNciOP23kFjw== - dependencies: - base64url "^3.0.1" - buffer "^6.0.3" - es6-promise "^4.2.8" - lodash "^4.17.21" - long "^5.2.0" - node-forge "^1.2.1" - pako "^2.0.4" - process "^0.11.10" - uuid "^9.0.0" - -node-releases@^2.0.14: - version "2.0.14" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" - integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== - -normalize-path@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -npm-run-path@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" - integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== - dependencies: - path-key "^3.0.0" - -once@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== - dependencies: - wrappy "1" - -onetime@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" - integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== - dependencies: - mimic-fn "^2.1.0" - -optionator@^0.9.3: - version "0.9.4" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.4.tgz#7ea1c1a5d91d764fb282139c88fe11e182a3a734" - integrity sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g== - dependencies: - deep-is "^0.1.3" - fast-levenshtein "^2.0.6" - levn "^0.4.1" - prelude-ls "^1.2.1" - type-check "^0.4.0" - word-wrap "^1.2.5" - -p-limit@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" - -p-limit@^3.0.2, p-limit@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" - integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== - dependencies: - yocto-queue "^0.1.0" - -p-locate@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" - integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== - dependencies: - p-limit "^2.2.0" - -p-locate@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" - integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== - dependencies: - p-limit "^3.0.2" - -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - -pako@^2.0.4: - version "2.1.0" - resolved "https://registry.yarnpkg.com/pako/-/pako-2.1.0.tgz#266cc37f98c7d883545d11335c00fbd4062c9a86" - integrity sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug== - -parent-module@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" - integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== - dependencies: - callsites "^3.0.0" - -parse-json@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" - integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== - dependencies: - "@babel/code-frame" "^7.0.0" - error-ex "^1.3.1" - json-parse-even-better-errors "^2.3.0" - lines-and-columns "^1.1.6" - -path-exists@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== - -path-key@^3.0.0, path-key@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" - integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - -path-parse@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" - integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== - -path-type@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" - integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== - -picocolors@^1.0.0, picocolors@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.1.tgz#a8ad579b571952f0e5d25892de5445bcfe25aaa1" - integrity sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew== - -picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" - integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== - -pirates@^4.0.4: - version "4.0.6" - resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" - integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== - -pkg-dir@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" - integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== - dependencies: - find-up "^4.0.0" - -prelude-ls@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" - integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== - -prettier-linter-helpers@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" - integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== - dependencies: - fast-diff "^1.1.2" - -prettier@^3.2.5: - version "3.2.5" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.2.5.tgz#e52bc3090586e824964a8813b09aba6233b28368" - integrity sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A== - -pretty-format@^29.0.0, pretty-format@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.7.0.tgz#ca42c758310f365bfa71a0bda0a807160b776812" - integrity sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ== - dependencies: - "@jest/schemas" "^29.6.3" - ansi-styles "^5.0.0" - react-is "^18.0.0" - -process@^0.11.10: - version "0.11.10" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" - integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== - -prompts@^2.0.1: - version "2.4.2" - resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" - integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== - dependencies: - kleur "^3.0.3" - sisteransi "^1.0.5" - -proxy-from-env@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" - integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== - -punycode@^2.1.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" - integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== - -pure-rand@^6.0.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-6.1.0.tgz#d173cf23258231976ccbdb05247c9787957604f2" - integrity sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA== - -queue-microtask@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" - integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== - -react-is@^18.0.0: - version "18.3.1" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.3.1.tgz#e83557dc12eae63a99e003a46388b1dcbb44db7e" - integrity sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg== - -readable-stream@^3.6.0: - version "3.6.2" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" - integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== - -resolve-cwd@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" - integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== - dependencies: - resolve-from "^5.0.0" - -resolve-from@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" - integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== - -resolve-from@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" - integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== - -resolve.exports@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.2.tgz#f8c934b8e6a13f539e38b7098e2e36134f01e800" - integrity sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg== - -resolve@^1.20.0: - version "1.22.8" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" - integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== - dependencies: - is-core-module "^2.13.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -reusify@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" - integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== - -rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - -ripemd160@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" - integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - -run-parallel@^1.1.9: - version "1.2.0" - resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" - integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== - dependencies: - queue-microtask "^1.2.2" - -safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -secp256k1@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-5.0.0.tgz#be6f0c8c7722e2481e9773336d351de8cddd12f7" - integrity sha512-TKWX8xvoGHrxVdqbYeZM9w+izTF4b9z3NhSaDkdn81btvuh+ivbIMGT/zQvDtTFWhRlThpoz6LEYTr7n8A5GcA== - dependencies: - elliptic "^6.5.4" - node-addon-api "^5.0.0" - node-gyp-build "^4.2.0" - -semver@^6.3.0, semver@^6.3.1: - version "6.3.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" - integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== - -semver@^7.5.3, semver@^7.5.4, semver@^7.6.0, semver@^7.6.1: - version "7.6.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" - integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== - -sha.js@^2.4.0: - version "2.4.11" - resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" - integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -shebang-command@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" - integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== - dependencies: - shebang-regex "^3.0.0" - -shebang-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" - integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - -shiki@^0.14.7: - version "0.14.7" - resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.14.7.tgz#c3c9e1853e9737845f1d2ef81b31bcfb07056d4e" - integrity sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg== - dependencies: - ansi-sequence-parser "^1.1.0" - jsonc-parser "^3.2.0" - vscode-oniguruma "^1.7.0" - vscode-textmate "^8.0.0" - -signal-exit@^3.0.3, signal-exit@^3.0.7: - version "3.0.7" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" - integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== - -sisteransi@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" - integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== - -slash@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" - integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== - -source-map-support@0.5.13: - version "0.5.13" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" - integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map@^0.6.0, source-map@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -spdx-exceptions@^2.1.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz#5d607d27fc806f66d7b64a766650fa890f04ed66" - integrity sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w== - -spdx-expression-parse@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-4.0.0.tgz#a23af9f3132115465dac215c099303e4ceac5794" - integrity sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ== - dependencies: - spdx-exceptions "^2.1.0" - spdx-license-ids "^3.0.0" - -spdx-license-ids@^3.0.0: - version "3.0.17" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.17.tgz#887da8aa73218e51a1d917502d79863161a93f9c" - integrity sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg== - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== - -stack-utils@^2.0.3: - version "2.0.6" - resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.6.tgz#aaf0748169c02fc33c8232abccf933f54a1cc34f" - integrity sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ== - dependencies: - escape-string-regexp "^2.0.0" - -string-length@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" - integrity sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ== - dependencies: - char-regex "^1.0.2" - strip-ansi "^6.0.0" - -string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -string_decoder@^1.1.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - dependencies: - safe-buffer "~5.2.0" - -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-bom@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" - integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== - -strip-final-newline@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" - integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== - -strip-json-comments@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" - integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -supports-color@^8.0.0: - version "8.1.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.0.0" - -supports-preserve-symlinks-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" - integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== - -synckit@^0.8.6: - version "0.8.8" - resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.8.8.tgz#fe7fe446518e3d3d49f5e429f443cf08b6edfcd7" - integrity sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ== - dependencies: - "@pkgr/core" "^0.1.0" - tslib "^2.6.2" - -test-exclude@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" - integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== - dependencies: - "@istanbuljs/schema" "^0.1.2" - glob "^7.1.4" - minimatch "^3.0.4" - -text-table@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" - integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== - -tmpl@1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" - integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw== - -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" - integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -ts-api-utils@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.3.0.tgz#4b490e27129f1e8e686b45cc4ab63714dc60eea1" - integrity sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ== - -ts-jest@^29.1.2: - version "29.1.2" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.1.2.tgz#7613d8c81c43c8cb312c6904027257e814c40e09" - integrity sha512-br6GJoH/WUX4pu7FbZXuWGKGNDuU7b8Uj77g/Sp7puZV6EXzuByl6JrECvm0MzVzSTkSHWTihsXt+5XYER5b+g== - dependencies: - bs-logger "0.x" - fast-json-stable-stringify "2.x" - jest-util "^29.0.0" - json5 "^2.2.3" - lodash.memoize "4.x" - make-error "1.x" - semver "^7.5.3" - yargs-parser "^21.0.1" - -ts-node@^10.9.2: - version "10.9.2" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f" - integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ== - dependencies: - "@cspotcode/source-map-support" "^0.8.0" - "@tsconfig/node10" "^1.0.7" - "@tsconfig/node12" "^1.0.7" - "@tsconfig/node14" "^1.0.0" - "@tsconfig/node16" "^1.0.2" - acorn "^8.4.1" - acorn-walk "^8.1.1" - arg "^4.1.0" - create-require "^1.1.0" - diff "^4.0.1" - make-error "^1.1.1" - v8-compile-cache-lib "^3.0.1" - yn "3.1.1" - -tslib@2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" - integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== - -tslib@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" - integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== - -type-check@^0.4.0, type-check@~0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" - integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== - dependencies: - prelude-ls "^1.2.1" - -type-detect@4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" - integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== - -type-fest@^0.20.2: - version "0.20.2" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" - integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== - -type-fest@^0.21.3: - version "0.21.3" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" - integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== - -typedoc@^0.25.13: - version "0.25.13" - resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.25.13.tgz#9a98819e3b2d155a6d78589b46fa4c03768f0922" - integrity sha512-pQqiwiJ+Z4pigfOnnysObszLiU3mVLWAExSPf+Mu06G/qsc3wzbuM56SZQvONhHLncLUhYzOVkjFFpFfL5AzhQ== - dependencies: - lunr "^2.3.9" - marked "^4.3.0" - minimatch "^9.0.3" - shiki "^0.14.7" - -typeforce@^1.11.5: - version "1.18.0" - resolved "https://registry.yarnpkg.com/typeforce/-/typeforce-1.18.0.tgz#d7416a2c5845e085034d70fcc5b6cc4a90edbfdc" - integrity sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g== - -typescript@^5.4.5: - version "5.4.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611" - integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ== - -undici-types@~5.26.4: - version "5.26.5" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" - integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== - -update-browserslist-db@^1.0.13: - version "1.0.16" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz#f6d489ed90fb2f07d67784eb3f53d7891f736356" - integrity sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ== - dependencies: - escalade "^3.1.2" - picocolors "^1.0.1" - -uri-js@^4.2.2: - version "4.4.1" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" - integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - dependencies: - punycode "^2.1.0" - -util-deprecate@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== - -uuid@^9.0.0: - version "9.0.1" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" - integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== - -v8-compile-cache-lib@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" - integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== - -v8-to-istanbul@^9.0.1: - version "9.2.0" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz#2ed7644a245cddd83d4e087b9b33b3e62dfd10ad" - integrity sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA== - dependencies: - "@jridgewell/trace-mapping" "^0.3.12" - "@types/istanbul-lib-coverage" "^2.0.1" - convert-source-map "^2.0.0" - -vscode-oniguruma@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz#439bfad8fe71abd7798338d1cd3dc53a8beea94b" - integrity sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA== - -vscode-textmate@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-8.0.0.tgz#2c7a3b1163ef0441097e0b5d6389cd5504b59e5d" - integrity sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg== - -walker@^1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" - integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ== - dependencies: - makeerror "1.0.12" - -which@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - -wif@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/wif/-/wif-2.0.6.tgz#08d3f52056c66679299726fade0d432ae74b4704" - integrity sha512-HIanZn1zmduSF+BQhkE+YXIbEiH0xPr1012QbFEGB0xsKqJii0/SqJjyn8dFv6y36kOznMgMB+LGcbZTJ1xACQ== - dependencies: - bs58check "<3.0.0" - -word-wrap@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" - integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== - -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== - -write-file-atomic@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.2.tgz#a9df01ae5b77858a027fd2e80768ee433555fcfd" - integrity sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg== - dependencies: - imurmurhash "^0.1.4" - signal-exit "^3.0.7" - -ws@8.17.1: - version "8.17.1" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b" - integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ== - -y18n@^5.0.5: - version "5.0.8" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" - integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== - -yallist@^3.0.2: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" - integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== - -yargs-parser@^21.0.1, yargs-parser@^21.1.1: - version "21.1.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" - integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== - -yargs@^17.3.1: - version "17.7.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" - integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== - dependencies: - cliui "^8.0.1" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.3" - y18n "^5.0.5" - yargs-parser "^21.1.1" - -yn@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" - integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== - -yocto-queue@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==