From c08683a685dde0d431abeceb5c1fce498291807f Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Mon, 1 Dec 2025 18:49:17 +0000 Subject: [PATCH 1/2] ## Typescript SDK Changes: * `avalanche.data.evm.address.transactions.list()`: `response.transactions.[].nativeTransaction` **Changed** * `avalanche.data.evm.address.transactions.listNative()`: `response.transactions.[]` **Changed** * `avalanche.data.evm.address.transactions.listErc20()`: `response.transactions.[].blockTimestampMilliseconds` **Added** * `avalanche.data.evm.address.transactions.listErc721()`: `response.transactions.[].blockTimestampMilliseconds` **Added** * `avalanche.data.evm.address.transactions.listErc1155()`: `response.transactions.[].blockTimestampMilliseconds` **Added** * `avalanche.data.evm.address.transactions.listInternal()`: `response.transactions.[].blockTimestampMilliseconds` **Added** * `avalanche.data.evm.transactions.listLatestAllChains()`: `response.transactions.[]` **Changed** * `avalanche.data.evm.transactions.get()`: `response.nativetransaction` **Changed** * `avalanche.data.evm.transactions.listLatest()`: `response.transactions.[]` **Changed** * `avalanche.data.evm.blocks.listLatestAllChains()`: `response.blocks.[]` **Changed** * `avalanche.data.evm.blocks.listLatest()`: `response.blocks.[]` **Changed** * `avalanche.data.evm.blocks.get()`: `response` **Changed** * `avalanche.data.evm.blocks.listTransactions()`: `response.transactions.[]` **Changed** * `avalanche.data.evm.contracts.getDeploymentTransaction()`: `response.nativetransaction` **Changed** * `avalanche.data.evm.contracts.listTransfers()`: `response.transfers.[]` **Changed** * `avalanche.data.evm.chains.listAllLatestTransactions()`: `response.transactions.[]` **Changed** * `avalanche.data.evm.chains.listAllLatestBlocks()`: `response.blocks.[]` **Changed** --- .speakeasy/workflow.lock | 14 +- chainkit/.speakeasy/gen.lock | 75 ++++---- chainkit/.speakeasy/gen.yaml | 11 +- chainkit/RELEASES.md | 12 +- .../components/activedelegatordetails.md | 24 +-- .../activedelegatordetailsdelegationstatus.md | 15 -- .../components/activevalidatordetails.md | 40 ++--- .../activevalidatordetailsvalidationstatus.md | 15 -- .../components/completeddelegatordetails.md | 2 +- ...mpleteddelegatordetailsdelegationstatus.md | 15 -- .../components/completedvalidatordetails.md | 28 +-- ...mpletedvalidatordetailsvalidationstatus.md | 15 -- .../createevmtransactionexportrequest.md | 2 +- .../models/components/deliveredicmmessage.md | 2 +- .../components/deliveredicmmessagestatus.md | 15 -- .../deliveredsourcenotindexedicmmessage.md | 36 ++-- ...liveredsourcenotindexedicmmessagestatus.md | 16 -- ...iveredsourcenotindexedteleportermessage.md | 36 ++-- ...sourcenotindexedteleportermessagestatus.md | 16 -- .../components/deliveredteleportermessage.md | 2 +- .../deliveredteleportermessagestatus.md | 15 -- .../docs/models/components/erc1155contract.md | 2 +- .../components/erc1155contracterctype.md | 15 -- .../docs/models/components/erc1155transfer.md | 24 +-- .../docs/models/components/erc20contract.md | 2 +- .../models/components/erc20contracterctype.md | 15 -- .../docs/models/components/erc20transfer.md | 24 +-- .../docs/models/components/erc721contract.md | 2 +- .../components/erc721contracterctype.md | 15 -- .../docs/models/components/erc721transfer.md | 22 +-- .../docs/models/components/eventtypeenum.md | 17 ++ .../components/evmaddressactivityrequest.md | 2 +- .../evmaddressactivityrequesteventtype.md | 15 -- chainkit/docs/models/components/evmblock.md | 32 ++-- .../models/components/evmoperationtype.md | 15 -- .../fullnativetransactiondetails.md | 48 ++--- .../models/components/getevmblockresponse.md | 32 ++-- .../components/gettransactionresponse.md | 2 + .../models/components/internaltransaction.md | 28 +-- .../docs/models/components/listnfttokens.md | 1 - .../listtransactiondetailsresponse.md | 2 + .../models/components/nativetransaction.md | 40 +++-- .../models/components/pchaintransaction.md | 2 +- .../components/pendingdelegatordetails.md | 2 +- ...pendingdelegatordetailsdelegationstatus.md | 15 -- .../models/components/pendingicmmessage.md | 36 ++-- .../components/pendingicmmessagestatus.md | 15 -- .../components/pendingteleportermessage.md | 36 ++-- .../pendingteleportermessagestatus.md | 15 -- .../components/pendingvalidatordetails.md | 22 +-- ...pendingvalidatordetailsvalidationstatus.md | 15 -- .../primarynetworkaddressactivityeventtype.md | 16 -- .../primarynetworkaddressactivityrequest.md | 18 +- ...ynetworkaddressactivityrequesteventtype.md | 16 -- .../primarynetworkaddressactivityresponse.md | 22 +-- .../components/removedvalidatordetails.md | 26 +-- ...removedvalidatordetailsvalidationstatus.md | 15 -- .../models/components/transactiondetails.md | 2 + chainkit/docs/models/components/transfer.md | 3 + .../docs/models/components/unknowncontract.md | 2 +- .../components/unknowncontracterctype.md | 15 -- .../components/validatoractivityeventtype.md | 15 -- .../components/validatoractivityrequest.md | 16 +- .../validatoractivityrequesteventtype.md | 15 -- .../components/validatoractivityresponse.md | 22 +-- .../webhookaddressactivityresponse.md | 12 +- ...webhookaddressactivityresponseeventtype.md | 17 -- .../operations/getlatestblocksresponse.md | 2 + .../operations/listalllatestblocksresponse.md | 2 + .../listlatestblocksallchainsresponse.md | 2 + .../posttransactionexportjobrequest.md | 30 ++++ chainkit/docs/sdks/addresschains/README.md | 2 +- chainkit/docs/sdks/evmblocks/README.md | 2 +- chainkit/docs/sdks/evmtransactions/README.md | 2 +- chainkit/examples/package-lock.json | 2 +- chainkit/package-lock.json | 4 +- chainkit/package.json | 2 +- .../src/funcs/dataEvmAddressChainsList.ts | 2 +- .../funcs/dataEvmBlocksListLatestAllChains.ts | 2 +- .../dataEvmTransactionsListLatestAllChains.ts | 2 +- chainkit/src/funcs/validateWebhook.ts | 65 +++++++ chainkit/src/hooks/hooks.ts | 33 +++- chainkit/src/hooks/types.ts | 18 +- chainkit/src/hooks/webhook-security.ts | 170 ++++++++++++++++++ chainkit/src/lib/config.ts | 6 +- chainkit/src/lib/encodings.ts | 20 ++- chainkit/src/lib/sdks.ts | 7 + chainkit/src/mcp-server/mcp-server.ts | 2 +- chainkit/src/mcp-server/server.ts | 2 +- .../tools/dataEvmAddressChainsList.ts | 2 +- .../tools/dataEvmBlocksListLatestAllChains.ts | 2 +- .../dataEvmTransactionsListLatestAllChains.ts | 2 +- .../components/activedelegatordetails.ts | 26 +-- .../components/activevalidatordetails.ts | 26 +-- .../components/completeddelegatordetails.ts | 25 +-- .../components/completedvalidatordetails.ts | 25 +-- .../createevmtransactionexportrequest.ts | 13 +- .../models/components/deliveredicmmessage.ts | 25 +-- .../deliveredsourcenotindexedicmmessage.ts | 25 +-- ...iveredsourcenotindexedteleportermessage.ts | 25 +-- .../components/deliveredteleportermessage.ts | 25 +-- .../src/models/components/erc1155contract.ts | 23 +-- .../src/models/components/erc1155transfer.ts | 9 +- .../src/models/components/erc20contract.ts | 23 +-- .../src/models/components/erc20transfer.ts | 9 +- .../src/models/components/erc721contract.ts | 23 +-- .../src/models/components/erc721transfer.ts | 9 +- .../components/evmaddressactivityrequest.ts | 25 +-- chainkit/src/models/components/evmblock.ts | 16 +- .../src/models/components/evmoperationtype.ts | 20 --- .../fullnativetransactiondetails.ts | 16 +- .../models/components/getevmblockresponse.ts | 16 +- chainkit/src/models/components/index.ts | 3 - .../models/components/internaltransaction.ts | 9 +- .../listcchainatomictransactionsresponse.ts | 48 +++-- .../listcollectiblebalancesresponse.ts | 48 +++-- .../components/listcontractsresponse.ts | 125 +++---------- .../listdelegatordetailsresponse.ts | 94 +++------- .../components/listicmmessagesresponse.ts | 102 +++-------- .../src/models/components/listnfttokens.ts | 48 ++++- .../listteleportermessagesresponse.ts | 102 +++-------- .../listvalidatordetailsresponse.ts | 128 ++++--------- .../models/components/listwebhooksresponse.ts | 24 ++- .../models/components/nativetransaction.ts | 16 +- .../models/components/pchaintransaction.ts | 2 +- .../components/pendingdelegatordetails.ts | 25 +-- .../models/components/pendingicmmessage.ts | 25 +-- .../components/pendingteleportermessage.ts | 25 +-- .../components/pendingvalidatordetails.ts | 25 +-- .../primarynetworkaddressactivityeventtype.ts | 23 --- .../primarynetworkaddressactivityrequest.ts | 25 +-- .../primarynetworkaddressactivityresponse.ts | 13 +- .../components/removedvalidatordetails.ts | 25 +-- .../src/models/components/unknowncontract.ts | 23 +-- .../components/validatoractivityeventtype.ts | 22 --- .../components/validatoractivityrequest.ts | 25 +-- .../components/validatoractivityresponse.ts | 13 +- .../webhookaddressactivityresponse.ts | 24 ++- .../src/models/operations/createwebhook.ts | 22 ++- .../models/operations/deactivatewebhook.ts | 14 +- .../models/operations/getcontractmetadata.ts | 64 ++----- .../src/models/operations/geticmmessage.ts | 52 ++---- .../models/operations/getteleportermessage.ts | 52 ++---- .../src/models/operations/gettokendetails.ts | 16 +- chainkit/src/models/operations/getwebhook.ts | 14 +- .../operations/posttransactionexportjob.ts | 40 ++++- .../src/models/operations/updatewebhook.ts | 14 +- chainkit/src/sdk/addresschains.ts | 2 +- chainkit/src/sdk/evmblocks.ts | 2 +- chainkit/src/sdk/evmtransactions.ts | 2 +- chainkit/src/sdk/sdk.ts | 21 +++ chainkit/src/types/enums.ts | 22 +-- chainkit/src/types/index.ts | 4 +- chainkit/src/types/unrecognized.ts | 35 ++++ chainkit/src/types/webhooks.ts | 4 + chainkit/tsconfig.json | 1 - 156 files changed, 1426 insertions(+), 1937 deletions(-) delete mode 100644 chainkit/docs/models/components/activedelegatordetailsdelegationstatus.md delete mode 100644 chainkit/docs/models/components/activevalidatordetailsvalidationstatus.md delete mode 100644 chainkit/docs/models/components/completeddelegatordetailsdelegationstatus.md delete mode 100644 chainkit/docs/models/components/completedvalidatordetailsvalidationstatus.md delete mode 100644 chainkit/docs/models/components/deliveredicmmessagestatus.md delete mode 100644 chainkit/docs/models/components/deliveredsourcenotindexedicmmessagestatus.md delete mode 100644 chainkit/docs/models/components/deliveredsourcenotindexedteleportermessagestatus.md delete mode 100644 chainkit/docs/models/components/deliveredteleportermessagestatus.md delete mode 100644 chainkit/docs/models/components/erc1155contracterctype.md delete mode 100644 chainkit/docs/models/components/erc20contracterctype.md delete mode 100644 chainkit/docs/models/components/erc721contracterctype.md create mode 100644 chainkit/docs/models/components/eventtypeenum.md delete mode 100644 chainkit/docs/models/components/evmaddressactivityrequesteventtype.md delete mode 100644 chainkit/docs/models/components/evmoperationtype.md delete mode 100644 chainkit/docs/models/components/pendingdelegatordetailsdelegationstatus.md delete mode 100644 chainkit/docs/models/components/pendingicmmessagestatus.md delete mode 100644 chainkit/docs/models/components/pendingteleportermessagestatus.md delete mode 100644 chainkit/docs/models/components/pendingvalidatordetailsvalidationstatus.md delete mode 100644 chainkit/docs/models/components/primarynetworkaddressactivityeventtype.md delete mode 100644 chainkit/docs/models/components/primarynetworkaddressactivityrequesteventtype.md delete mode 100644 chainkit/docs/models/components/removedvalidatordetailsvalidationstatus.md delete mode 100644 chainkit/docs/models/components/unknowncontracterctype.md delete mode 100644 chainkit/docs/models/components/validatoractivityeventtype.md delete mode 100644 chainkit/docs/models/components/validatoractivityrequesteventtype.md delete mode 100644 chainkit/docs/models/components/webhookaddressactivityresponseeventtype.md create mode 100644 chainkit/src/funcs/validateWebhook.ts create mode 100644 chainkit/src/hooks/webhook-security.ts delete mode 100644 chainkit/src/models/components/evmoperationtype.ts delete mode 100644 chainkit/src/models/components/primarynetworkaddressactivityeventtype.ts delete mode 100644 chainkit/src/models/components/validatoractivityeventtype.ts create mode 100644 chainkit/src/types/unrecognized.ts diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 196144d5..58e928f6 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,21 +1,21 @@ -speakeasyVersion: 1.659.0 +speakeasyVersion: 1.666.0 sources: chainkit-source: sourceNamespace: avalanche-sdk-chainkit-typescript - sourceRevisionDigest: sha256:a2725e93698de1ec0e06309de395a7be6b7d18f64148e05150a262aa7f76a608 - sourceBlobDigest: sha256:179e4d223f82564b1c25d36dbf57c7a232d861a96bd54c3ad44089d4262716d7 + sourceRevisionDigest: sha256:9738e2c33657edcef7958e6c67f1461f529e0bb3c9acb5cf1979e4b29637a072 + sourceBlobDigest: sha256:84a3cea5412ef02a2a2ac6f0c6add909d4435ca4ea1da72499bb6b5a2af64a14 tags: - latest - - speakeasy-sdk-regen-1763577819 + - speakeasy-sdk-regen-1764096270 - 1.0.0 targets: chainkit-sdk: source: chainkit-source sourceNamespace: avalanche-sdk-chainkit-typescript - sourceRevisionDigest: sha256:a2725e93698de1ec0e06309de395a7be6b7d18f64148e05150a262aa7f76a608 - sourceBlobDigest: sha256:179e4d223f82564b1c25d36dbf57c7a232d861a96bd54c3ad44089d4262716d7 + sourceRevisionDigest: sha256:9738e2c33657edcef7958e6c67f1461f529e0bb3c9acb5cf1979e4b29637a072 + sourceBlobDigest: sha256:84a3cea5412ef02a2a2ac6f0c6add909d4435ca4ea1da72499bb6b5a2af64a14 codeSamplesNamespace: avalanche-sdk-chainkit-typescript-code-samples - codeSamplesRevisionDigest: sha256:0f57006ca4e06cd1c43089c12b5c185b31e98856e28bda13e441caafc9f9a6a1 + codeSamplesRevisionDigest: sha256:2a14ef3784e1194266d0b8cd1aeb3be38bf1dc04ffc9691c2a8e7b9db5b61612 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/chainkit/.speakeasy/gen.lock b/chainkit/.speakeasy/gen.lock index c93616c2..ba7c8eb1 100644 --- a/chainkit/.speakeasy/gen.lock +++ b/chainkit/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 125b8491-d8a2-4e4f-ad7e-83badf249c68 management: - docChecksum: 15cecdbe980748d5e71fd0a1cef97ddf + docChecksum: 2c9309501f1671ba734a2af85f2477e0 docVersion: 1.0.0 - speakeasyVersion: 1.659.0 - generationVersion: 2.755.9 - releaseVersion: 0.3.0-alpha.11 - configChecksum: 7c73dbc14327a4c23c9f491eda8c79b2 + speakeasyVersion: 1.666.0 + generationVersion: 2.768.0 + releaseVersion: 0.3.0-alpha.12 + configChecksum: 713be477c7fbad03cfb29ee49b85502f repoURL: https://github.com/ava-labs/avalanche-sdk-typescript.git repoSubDirectory: chainkit installationURL: https://gitpkg.now.sh/ava-labs/avalanche-sdk-typescript/chainkit @@ -15,7 +15,7 @@ features: typescript: additionalDependencies: 0.1.0 constsAndDefaults: 0.1.12 - core: 3.26.7 + core: 3.26.13 defaultEnabledRetries: 0.1.0 deprecations: 2.81.1 enumUnions: 0.1.0 @@ -35,9 +35,9 @@ features: pagination: 2.83.0 responseFormat: 0.2.3 retries: 2.83.0 - sdkHooks: 0.3.0 - unions: 2.86.0 - webhooks: 1.5.0 + sdkHooks: 0.4.0 + unions: 2.86.3 + webhooks: 1.5.1 generatedFiles: - .gitattributes - .npmignore @@ -47,9 +47,7 @@ generatedFiles: - docs/lib/utils/retryconfig.md - docs/models/components/accesslistdata.md - docs/models/components/activedelegatordetails.md - - docs/models/components/activedelegatordetailsdelegationstatus.md - docs/models/components/activevalidatordetails.md - - docs/models/components/activevalidatordetailsvalidationstatus.md - docs/models/components/addressactivityeventtype.md - docs/models/components/addressactivitymetadata.md - docs/models/components/addressdetails.md @@ -85,9 +83,7 @@ generatedFiles: - docs/models/components/collectiblebalance.md - docs/models/components/commonbalancetype.md - docs/models/components/completeddelegatordetails.md - - docs/models/components/completeddelegatordetailsdelegationstatus.md - docs/models/components/completedvalidatordetails.md - - docs/models/components/completedvalidatordetailsvalidationstatus.md - docs/models/components/contract.md - docs/models/components/contractdeploymentdetails.md - docs/models/components/createevmtransactionexportrequest.md @@ -98,15 +94,10 @@ generatedFiles: - docs/models/components/delegator.md - docs/models/components/delegatorsdetails.md - docs/models/components/deliveredicmmessage.md - - docs/models/components/deliveredicmmessagestatus.md - docs/models/components/deliveredsourcenotindexedicmmessage.md - - docs/models/components/deliveredsourcenotindexedicmmessagestatus.md - docs/models/components/deliveredsourcenotindexedteleportermessage.md - - docs/models/components/deliveredsourcenotindexedteleportermessagestatus.md - docs/models/components/deliveredteleportermessage.md - - docs/models/components/deliveredteleportermessagestatus.md - docs/models/components/erc1155contract.md - - docs/models/components/erc1155contracterctype.md - docs/models/components/erc1155token.md - docs/models/components/erc1155tokenbalance.md - docs/models/components/erc1155tokenbalanceerctype.md @@ -115,7 +106,6 @@ generatedFiles: - docs/models/components/erc1155transfer.md - docs/models/components/erc1155transferdetails.md - docs/models/components/erc20contract.md - - docs/models/components/erc20contracterctype.md - docs/models/components/erc20token.md - docs/models/components/erc20tokenbalance.md - docs/models/components/erc20tokenbalanceerctype.md @@ -123,7 +113,6 @@ generatedFiles: - docs/models/components/erc20transfer.md - docs/models/components/erc20transferdetails.md - docs/models/components/erc721contract.md - - docs/models/components/erc721contracterctype.md - docs/models/components/erc721token.md - docs/models/components/erc721tokenbalance.md - docs/models/components/erc721tokenbalanceerctype.md @@ -133,8 +122,8 @@ generatedFiles: - docs/models/components/erc721transferdetails.md - docs/models/components/erctoken.md - docs/models/components/erctransfer.md + - docs/models/components/eventtypeenum.md - docs/models/components/evmaddressactivityrequest.md - - docs/models/components/evmaddressactivityrequesteventtype.md - docs/models/components/evmaddressactivityrequestmetadata.md - docs/models/components/evmaddressactivityresponse.md - docs/models/components/evmblock.md @@ -146,7 +135,6 @@ generatedFiles: - docs/models/components/evmgenesiswarpconfigdto.md - docs/models/components/evminput.md - docs/models/components/evmnetworkoptions.md - - docs/models/components/evmoperationtype.md - docs/models/components/evmoutput.md - docs/models/components/fullnativetransactiondetails.md - docs/models/components/geolocation.md @@ -257,20 +245,14 @@ generatedFiles: - docs/models/components/pchaintransactiontype.md - docs/models/components/pchainutxo.md - docs/models/components/pendingdelegatordetails.md - - docs/models/components/pendingdelegatordetailsdelegationstatus.md - docs/models/components/pendingicmmessage.md - - docs/models/components/pendingicmmessagestatus.md - docs/models/components/pendingreward.md - docs/models/components/pendingteleportermessage.md - - docs/models/components/pendingteleportermessagestatus.md - docs/models/components/pendingvalidatordetails.md - - docs/models/components/pendingvalidatordetailsvalidationstatus.md - docs/models/components/platformaddressactivitykeytype.md - docs/models/components/pricingproviders.md - - docs/models/components/primarynetworkaddressactivityeventtype.md - docs/models/components/primarynetworkaddressactivitymetadata.md - docs/models/components/primarynetworkaddressactivityrequest.md - - docs/models/components/primarynetworkaddressactivityrequesteventtype.md - docs/models/components/primarynetworkaddressactivityrequestmetadata.md - docs/models/components/primarynetworkaddressactivityresponse.md - docs/models/components/primarynetworkaddressactivitysubevents.md @@ -288,7 +270,6 @@ generatedFiles: - docs/models/components/primarynetworktype.md - docs/models/components/proposerdetails.md - docs/models/components/removedvalidatordetails.md - - docs/models/components/removedvalidatordetailsvalidationstatus.md - docs/models/components/requesttype.md - docs/models/components/resourcelink.md - docs/models/components/resourcelinktype.md @@ -332,7 +313,6 @@ generatedFiles: - docs/models/components/transactionvertexdetail.md - docs/models/components/transfer.md - docs/models/components/unknowncontract.md - - docs/models/components/unknowncontracterctype.md - docs/models/components/updatewebhookrequest.md - docs/models/components/usagemetricsgroupbyenum.md - docs/models/components/usagemetricsresponsedto.md @@ -346,11 +326,9 @@ generatedFiles: - docs/models/components/utxotype.md - docs/models/components/validationstatustype.md - docs/models/components/validator.md - - docs/models/components/validatoractivityeventtype.md - docs/models/components/validatoractivitykeytype.md - docs/models/components/validatoractivitymetadata.md - docs/models/components/validatoractivityrequest.md - - docs/models/components/validatoractivityrequesteventtype.md - docs/models/components/validatoractivityrequestmetadata.md - docs/models/components/validatoractivityresponse.md - docs/models/components/validatoractivitysubevent.md @@ -360,7 +338,6 @@ generatedFiles: - docs/models/components/vmname.md - docs/models/components/webhook.md - docs/models/components/webhookaddressactivityresponse.md - - docs/models/components/webhookaddressactivityresponseeventtype.md - docs/models/components/webhookinternaltransaction.md - docs/models/components/webhookstatus.md - docs/models/components/webhookstatustype.md @@ -741,6 +718,7 @@ generatedFiles: - src/funcs/metricsLiveCheck.ts - src/funcs/metricsNetworksGetStakingMetrics.ts - src/funcs/metricsSubnetsGetValidators.ts + - src/funcs/validateWebhook.ts - src/funcs/webhooksAddressesAdd.ts - src/funcs/webhooksAddressesList.ts - src/funcs/webhooksAddressesRemove.ts @@ -754,6 +732,7 @@ generatedFiles: - src/hooks/hooks.ts - src/hooks/index.ts - src/hooks/types.ts + - src/hooks/webhook-security.ts - src/index.ts - src/lib/base64.ts - src/lib/config.ts @@ -958,7 +937,6 @@ generatedFiles: - src/models/components/evmgenesiswarpconfigdto.ts - src/models/components/evminput.ts - src/models/components/evmnetworkoptions.ts - - src/models/components/evmoperationtype.ts - src/models/components/evmoutput.ts - src/models/components/fullnativetransactiondetails.ts - src/models/components/getchainresponse.ts @@ -1063,7 +1041,6 @@ generatedFiles: - src/models/components/pendingvalidatordetails.ts - src/models/components/platformaddressactivitykeytype.ts - src/models/components/pricingproviders.ts - - src/models/components/primarynetworkaddressactivityeventtype.ts - src/models/components/primarynetworkaddressactivitymetadata.ts - src/models/components/primarynetworkaddressactivityrequest.ts - src/models/components/primarynetworkaddressactivityresponse.ts @@ -1129,7 +1106,6 @@ generatedFiles: - src/models/components/utxossortbyoption.ts - src/models/components/utxotype.ts - src/models/components/validationstatustype.ts - - src/models/components/validatoractivityeventtype.ts - src/models/components/validatoractivitykeytype.ts - src/models/components/validatoractivitymetadata.ts - src/models/components/validatoractivityrequest.ts @@ -1309,6 +1285,7 @@ generatedFiles: - src/types/operations.ts - src/types/rfcdate.ts - src/types/streams.ts + - src/types/unrecognized.ts - src/types/webhooks.ts - tsconfig.json examples: @@ -2694,7 +2671,7 @@ examples: txHash: "0x8bf584d7b14b92a32a339872a66b134a70ba3ba7c305823f348db6f860253f45" responses: "200": - application/json: {"erc20Transfers": [{"from": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "to": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "logIndex": 6482.03, "value": "10000000000000000000", "erc20Token": {"address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", "name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "ercType": "ERC-20", "price": {"currencyCode": "usd", "value": 42.42}}}], "erc721Transfers": [{"from": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "to": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "logIndex": 9364.08, "erc721Token": {"address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", "name": "Wrapped AVAX", "symbol": "WAVAX", "ercType": "ERC-721", "tokenId": "", "tokenUri": "https://hurtful-cricket.com", "metadata": {"indexStatus": "INVALID_TOKEN_URI_SCHEME"}, "ownerAddress": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}}], "erc1155Transfers": [{"from": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "to": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "logIndex": 8559.93, "value": "10000000000000000000", "erc1155Token": {"address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", "ercType": "ERC-1155", "tokenId": "", "tokenUri": "https://frozen-cake.biz", "metadata": {"indexStatus": "INVALID_TOKEN_URI_SCHEME"}}}], "internalTransactions": [{"from": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "to": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "internalTxType": "STATICCALL", "value": "10000000000000000000", "isReverted": true, "gasUsed": "", "gasLimit": ""}], "networkTokenDetails": {"networkToken": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg"}, "currentPrice": {"currencyCode": "usd", "value": 42.42}, "historicalPrice": {"currencyCode": "usd", "value": 42.42}}, "nativeTransaction": {"blockNumber": "339", "blockTimestamp": 1648672486, "blockHash": "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", "chainId": "43114", "blockIndex": 0, "txHash": "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4", "txStatus": "1", "txType": 1, "gasLimit": "51373", "gasUsed": "51373", "gasPrice": "470000000000", "nonce": "1", "from": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "to": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "method": {"callType": "CONTRACT_CREATION", "methodHash": "0xa9059cbb", "methodName": "transfer(address,uint256)"}, "value": "10000000000000000000", "input": "", "baseFeePerGas": ""}} + application/json: {"erc20Transfers": [{"from": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "to": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "logIndex": 6482.03, "value": "10000000000000000000", "erc20Token": {"address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", "name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "ercType": "ERC-20", "price": {"currencyCode": "usd", "value": 42.42}}}], "erc721Transfers": [{"from": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "to": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "logIndex": 9364.08, "erc721Token": {"address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", "name": "Wrapped AVAX", "symbol": "WAVAX", "ercType": "ERC-721", "tokenId": "", "tokenUri": "https://hurtful-cricket.com", "metadata": {"indexStatus": "INVALID_TOKEN_URI_SCHEME"}, "ownerAddress": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}}], "erc1155Transfers": [{"from": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "to": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "logIndex": 8559.93, "value": "10000000000000000000", "erc1155Token": {"address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", "ercType": "ERC-1155", "tokenId": "", "tokenUri": "https://frozen-cake.biz", "metadata": {"indexStatus": "INVALID_TOKEN_URI_SCHEME"}}}], "internalTransactions": [{"from": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "to": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "internalTxType": "STATICCALL", "value": "10000000000000000000", "isReverted": true, "gasUsed": "", "gasLimit": ""}], "networkTokenDetails": {"networkToken": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg"}, "currentPrice": {"currencyCode": "usd", "value": 42.42}, "historicalPrice": {"currencyCode": "usd", "value": 42.42}}, "nativeTransaction": {"blockNumber": "339", "blockTimestamp": 1648672486, "blockTimestampMilliseconds": 1648672486000, "blockMinDelayExcess": 7477290, "blockHash": "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", "chainId": "43114", "blockIndex": 0, "txHash": "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4", "txStatus": "1", "txType": 1, "gasLimit": "51373", "gasUsed": "51373", "gasPrice": "470000000000", "nonce": "1", "from": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "to": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "method": {"callType": "CONTRACT_CREATION", "methodHash": "0xa9059cbb", "methodName": "transfer(address,uint256)"}, "value": "10000000000000000000", "input": "", "baseFeePerGas": ""}} "400": application/json: {"message": "", "statusCode": 400, "error": "Bad Request"} "401": @@ -2894,7 +2871,7 @@ examples: blockId: "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c" responses: "200": - application/json: {"chainId": "43114", "blockNumber": "339", "blockTimestamp": 1648672486, "blockHash": "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", "txCount": 9350.29, "baseFee": "", "gasUsed": "", "gasLimit": "", "gasCost": "", "parentHash": "", "feesSpent": "", "cumulativeTransactions": ""} + application/json: {"chainId": "43114", "blockNumber": "339", "blockTimestamp": 1648672486, "blockTimestampMilliseconds": 1648672486000, "blockMinDelayExcess": 7477290, "blockHash": "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", "txCount": 9350.29, "baseFee": "", "gasUsed": "", "gasLimit": "", "gasCost": "", "parentHash": "", "feesSpent": "", "cumulativeTransactions": ""} "400": application/json: {"message": [""], "statusCode": 400, "error": "Bad Request"} "401": @@ -3000,7 +2977,7 @@ examples: currency: "usd" responses: "200": - application/json: {"erc20Transfers": [{"from": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "to": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "logIndex": 6491.9, "value": "10000000000000000000", "erc20Token": {"address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", "name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "ercType": "ERC-20", "price": {"currencyCode": "usd", "value": 42.42}}}], "erc721Transfers": [{"from": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "to": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "logIndex": 1478.52, "erc721Token": {"address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", "name": "Wrapped AVAX", "symbol": "WAVAX", "ercType": "ERC-721", "tokenId": "", "tokenUri": "https://soggy-digestive.org", "metadata": {"indexStatus": "UNREACHABLE_TOKEN_URI"}, "ownerAddress": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}}], "erc1155Transfers": [{"from": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "to": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "logIndex": 9500.08, "value": "10000000000000000000", "erc1155Token": {"address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", "ercType": "ERC-1155", "tokenId": "", "tokenUri": "https://polished-legging.info", "metadata": {"indexStatus": "THROTTLED_TOKEN_URI"}}}], "internalTransactions": [{"from": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "to": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "internalTxType": "CREATE2", "value": "10000000000000000000", "isReverted": true, "gasUsed": "", "gasLimit": ""}], "networkTokenDetails": {"networkToken": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg"}, "currentPrice": {"currencyCode": "usd", "value": 42.42}, "historicalPrice": {"currencyCode": "usd", "value": 42.42}}, "nativeTransaction": {"blockNumber": "339", "blockTimestamp": 1648672486, "blockHash": "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", "chainId": "43114", "blockIndex": 0, "txHash": "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4", "txStatus": "1", "txType": 1, "gasLimit": "51373", "gasUsed": "51373", "gasPrice": "470000000000", "nonce": "1", "from": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "to": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "method": {"callType": "CONTRACT_CALL", "methodHash": "0xa9059cbb", "methodName": "transfer(address,uint256)"}, "value": "10000000000000000000", "input": "", "baseFeePerGas": ""}} + application/json: {"erc20Transfers": [{"from": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "to": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "logIndex": 6491.9, "value": "10000000000000000000", "erc20Token": {"address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", "name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "ercType": "ERC-20", "price": {"currencyCode": "usd", "value": 42.42}}}], "erc721Transfers": [{"from": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "to": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "logIndex": 1478.52, "erc721Token": {"address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", "name": "Wrapped AVAX", "symbol": "WAVAX", "ercType": "ERC-721", "tokenId": "", "tokenUri": "https://soggy-digestive.org", "metadata": {"indexStatus": "UNREACHABLE_TOKEN_URI"}, "ownerAddress": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}}], "erc1155Transfers": [{"from": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "to": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "logIndex": 9500.08, "value": "10000000000000000000", "erc1155Token": {"address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", "ercType": "ERC-1155", "tokenId": "", "tokenUri": "https://polished-legging.info", "metadata": {"indexStatus": "THROTTLED_TOKEN_URI"}}}], "internalTransactions": [{"from": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "to": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "internalTxType": "CREATE2", "value": "10000000000000000000", "isReverted": true, "gasUsed": "", "gasLimit": ""}], "networkTokenDetails": {"networkToken": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg"}, "currentPrice": {"currencyCode": "usd", "value": 42.42}, "historicalPrice": {"currencyCode": "usd", "value": 42.42}}, "nativeTransaction": {"blockNumber": "339", "blockTimestamp": 1648672486, "blockTimestampMilliseconds": 1648672486000, "blockMinDelayExcess": 7477290, "blockHash": "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", "chainId": "43114", "blockIndex": 0, "txHash": "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4", "txStatus": "1", "txType": 1, "gasLimit": "51373", "gasUsed": "51373", "gasPrice": "470000000000", "nonce": "1", "from": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "to": {"name": "Wrapped AVAX", "symbol": "WAVAX", "decimals": 18, "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"}, "method": {"callType": "CONTRACT_CALL", "methodHash": "0xa9059cbb", "methodName": "transfer(address,uint256)"}, "value": "10000000000000000000", "input": "", "baseFeePerGas": ""}} "400": application/json: {"message": "", "statusCode": 400, "error": "Bad Request"} "401": @@ -6337,5 +6314,21 @@ examples: examplesVersion: 1.0.2 generatedTests: {} releaseNotes: | - ## Typescript SDK Changes Detected: - * `avalanche.data.primaryNetwork.utxos.listByAddressesV2()`: `response.status[201]` **Added** **Breaking** :warning: + ## Typescript SDK Changes: + * `avalanche.data.evm.address.transactions.list()`: `response.transactions.[].nativeTransaction` **Changed** + * `avalanche.data.evm.address.transactions.listNative()`: `response.transactions.[]` **Changed** + * `avalanche.data.evm.address.transactions.listErc20()`: `response.transactions.[].blockTimestampMilliseconds` **Added** + * `avalanche.data.evm.address.transactions.listErc721()`: `response.transactions.[].blockTimestampMilliseconds` **Added** + * `avalanche.data.evm.address.transactions.listErc1155()`: `response.transactions.[].blockTimestampMilliseconds` **Added** + * `avalanche.data.evm.address.transactions.listInternal()`: `response.transactions.[].blockTimestampMilliseconds` **Added** + * `avalanche.data.evm.transactions.listLatestAllChains()`: `response.transactions.[]` **Changed** + * `avalanche.data.evm.transactions.get()`: `response.nativetransaction` **Changed** + * `avalanche.data.evm.transactions.listLatest()`: `response.transactions.[]` **Changed** + * `avalanche.data.evm.blocks.listLatestAllChains()`: `response.blocks.[]` **Changed** + * `avalanche.data.evm.blocks.listLatest()`: `response.blocks.[]` **Changed** + * `avalanche.data.evm.blocks.get()`: `response` **Changed** + * `avalanche.data.evm.blocks.listTransactions()`: `response.transactions.[]` **Changed** + * `avalanche.data.evm.contracts.getDeploymentTransaction()`: `response.nativetransaction` **Changed** + * `avalanche.data.evm.contracts.listTransfers()`: `response.transfers.[]` **Changed** + * `avalanche.data.evm.chains.listAllLatestTransactions()`: `response.transactions.[]` **Changed** + * `avalanche.data.evm.chains.listAllLatestBlocks()`: `response.blocks.[]` **Changed** diff --git a/chainkit/.speakeasy/gen.yaml b/chainkit/.speakeasy/gen.yaml index f6b48f5f..4f7d8818 100644 --- a/chainkit/.speakeasy/gen.yaml +++ b/chainkit/.speakeasy/gen.yaml @@ -25,7 +25,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false typescript: - version: 0.3.0-alpha.11 + version: 0.3.0-alpha.12 acceptHeaderEnum: true additionalDependencies: dependencies: @@ -43,7 +43,7 @@ typescript: author: Speakeasy baseErrorName: AvalancheError clientServerStatusCodesAsErrors: true - constFieldsAlwaysOptional: true + constFieldsAlwaysOptional: false defaultErrorName: AvalancheAPIError enableCustomCodeRegions: false enableMCPServer: true @@ -52,6 +52,9 @@ typescript: exportZodModelNamespace: false flattenGlobalSecurity: true flatteningOrder: parameters-first + formStringArrayEncodeMode: encoded-string + forwardCompatibleEnumsByDefault: false + forwardCompatibleUnionsByDefault: "false" generateExamples: true imports: option: openapi @@ -61,14 +64,18 @@ typescript: operations: models/operations shared: models/components webhooks: models/webhooks + inferUnionDiscriminators: true inputModelSuffix: input jsonpath: rfc9535 + laxMode: strict maxMethodParams: 0 methodArguments: require-security-and-request modelPropertyCasing: camel moduleFormat: dual + multipartArrayFormat: legacy outputModelSuffix: output packageName: '@avalanche-sdk/chainkit' + preApplyUnionDiscriminators: true responseFormat: flat sseFlatResponse: false templateVersion: v2 diff --git a/chainkit/RELEASES.md b/chainkit/RELEASES.md index 2f6c5534..dd5dca27 100644 --- a/chainkit/RELEASES.md +++ b/chainkit/RELEASES.md @@ -130,4 +130,14 @@ Based on: ### Generated - [typescript v0.3.0-alpha.11] chainkit ### Releases -- [NPM v0.3.0-alpha.11] https://www.npmjs.com/package/@avalanche-sdk/chainkit/v/0.3.0-alpha.11 - chainkit \ No newline at end of file +- [NPM v0.3.0-alpha.11] https://www.npmjs.com/package/@avalanche-sdk/chainkit/v/0.3.0-alpha.11 - chainkit + +## 2025-12-01 18:47:11 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.666.0 (2.768.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.3.0-alpha.12] chainkit +### Releases +- [NPM v0.3.0-alpha.12] https://www.npmjs.com/package/@avalanche-sdk/chainkit/v/0.3.0-alpha.12 - chainkit \ No newline at end of file diff --git a/chainkit/docs/models/components/activedelegatordetails.md b/chainkit/docs/models/components/activedelegatordetails.md index 1e5c27e5..18bb3cf8 100644 --- a/chainkit/docs/models/components/activedelegatordetails.md +++ b/chainkit/docs/models/components/activedelegatordetails.md @@ -23,15 +23,15 @@ let value: ActiveDelegatorDetails = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| `txHash` | *string* | :heavy_check_mark: | N/A | -| `nodeId` | *string* | :heavy_check_mark: | N/A | -| `rewardAddresses` | *string*[] | :heavy_check_mark: | N/A | -| `amountDelegated` | *string* | :heavy_check_mark: | N/A | -| `delegationFee` | *string* | :heavy_check_mark: | N/A | -| `startTimestamp` | *number* | :heavy_check_mark: | N/A | -| `endTimestamp` | *number* | :heavy_check_mark: | N/A | -| `estimatedGrossReward` | *string* | :heavy_check_mark: | N/A | -| `estimatedNetReward` | *string* | :heavy_check_mark: | N/A | -| `delegationStatus` | [components.ActiveDelegatorDetailsDelegationStatus](../../models/components/activedelegatordetailsdelegationstatus.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `txHash` | *string* | :heavy_check_mark: | N/A | +| `nodeId` | *string* | :heavy_check_mark: | N/A | +| `rewardAddresses` | *string*[] | :heavy_check_mark: | N/A | +| `amountDelegated` | *string* | :heavy_check_mark: | N/A | +| `delegationFee` | *string* | :heavy_check_mark: | N/A | +| `startTimestamp` | *number* | :heavy_check_mark: | N/A | +| `endTimestamp` | *number* | :heavy_check_mark: | N/A | +| `estimatedGrossReward` | *string* | :heavy_check_mark: | N/A | +| `estimatedNetReward` | *string* | :heavy_check_mark: | N/A | +| `delegationStatus` | *"active"* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/chainkit/docs/models/components/activedelegatordetailsdelegationstatus.md b/chainkit/docs/models/components/activedelegatordetailsdelegationstatus.md deleted file mode 100644 index 54795d70..00000000 --- a/chainkit/docs/models/components/activedelegatordetailsdelegationstatus.md +++ /dev/null @@ -1,15 +0,0 @@ -# ActiveDelegatorDetailsDelegationStatus - -## Example Usage - -```typescript -import { ActiveDelegatorDetailsDelegationStatus } from "@avalanche-sdk/chainkit/models/components"; - -let value: ActiveDelegatorDetailsDelegationStatus = "active"; -``` - -## Values - -```typescript -"active" -``` \ No newline at end of file diff --git a/chainkit/docs/models/components/activevalidatordetails.md b/chainkit/docs/models/components/activevalidatordetails.md index 4d7952fd..fe9ed3d9 100644 --- a/chainkit/docs/models/components/activevalidatordetails.md +++ b/chainkit/docs/models/components/activevalidatordetails.md @@ -32,23 +32,23 @@ let value: ActiveValidatorDetails = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| `txHash` | *string* | :heavy_check_mark: | N/A | -| `nodeId` | *string* | :heavy_check_mark: | N/A | -| `subnetId` | *string* | :heavy_check_mark: | N/A | -| `amountStaked` | *string* | :heavy_check_mark: | N/A | -| `delegationFee` | *string* | :heavy_minus_sign: | The percentage of total estimated delegator rewards allocated to validator nodes for supporting delegations. | -| `startTimestamp` | *number* | :heavy_check_mark: | N/A | -| `endTimestamp` | *number* | :heavy_check_mark: | N/A | -| `blsCredentials` | [components.BlsCredentials](../../models/components/blscredentials.md) | :heavy_minus_sign: | Present for AddPermissionlessValidatorTx | -| `stakePercentage` | *number* | :heavy_check_mark: | The percentage of this validator's stake amount to the total active stake. | -| `delegatorCount` | *number* | :heavy_check_mark: | The number of delegators linked to the validator. | -| `amountDelegated` | *string* | :heavy_minus_sign: | The total amount in nAVAX delegated to the validator. | -| `uptimePerformance` | *number* | :heavy_check_mark: | The validator's uptime percentage, as observed by our internal node and measured over time. | -| `avalancheGoVersion` | *string* | :heavy_minus_sign: | N/A | -| `delegationCapacity` | *string* | :heavy_minus_sign: | The amount of stake in nAVAX that can be delegated to this validator. | -| `potentialRewards` | [components.Rewards](../../models/components/rewards.md) | :heavy_check_mark: | Estimated rewards for the validator if the validation is successful. | -| `validationStatus` | [components.ActiveValidatorDetailsValidationStatus](../../models/components/activevalidatordetailsvalidationstatus.md) | :heavy_check_mark: | N/A | -| `validatorHealth` | [components.ValidatorHealthDetails](../../models/components/validatorhealthdetails.md) | :heavy_check_mark: | N/A | -| `geolocation` | [components.Geolocation](../../models/components/geolocation.md) | :heavy_check_mark: | The geographical location of the validator node, if available. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `txHash` | *string* | :heavy_check_mark: | N/A | +| `nodeId` | *string* | :heavy_check_mark: | N/A | +| `subnetId` | *string* | :heavy_check_mark: | N/A | +| `amountStaked` | *string* | :heavy_check_mark: | N/A | +| `delegationFee` | *string* | :heavy_minus_sign: | The percentage of total estimated delegator rewards allocated to validator nodes for supporting delegations. | +| `startTimestamp` | *number* | :heavy_check_mark: | N/A | +| `endTimestamp` | *number* | :heavy_check_mark: | N/A | +| `blsCredentials` | [components.BlsCredentials](../../models/components/blscredentials.md) | :heavy_minus_sign: | Present for AddPermissionlessValidatorTx | +| `stakePercentage` | *number* | :heavy_check_mark: | The percentage of this validator's stake amount to the total active stake. | +| `delegatorCount` | *number* | :heavy_check_mark: | The number of delegators linked to the validator. | +| `amountDelegated` | *string* | :heavy_minus_sign: | The total amount in nAVAX delegated to the validator. | +| `uptimePerformance` | *number* | :heavy_check_mark: | The validator's uptime percentage, as observed by our internal node and measured over time. | +| `avalancheGoVersion` | *string* | :heavy_minus_sign: | N/A | +| `delegationCapacity` | *string* | :heavy_minus_sign: | The amount of stake in nAVAX that can be delegated to this validator. | +| `potentialRewards` | [components.Rewards](../../models/components/rewards.md) | :heavy_check_mark: | Estimated rewards for the validator if the validation is successful. | +| `validationStatus` | *"active"* | :heavy_check_mark: | N/A | +| `validatorHealth` | [components.ValidatorHealthDetails](../../models/components/validatorhealthdetails.md) | :heavy_check_mark: | N/A | +| `geolocation` | [components.Geolocation](../../models/components/geolocation.md) | :heavy_check_mark: | The geographical location of the validator node, if available. | \ No newline at end of file diff --git a/chainkit/docs/models/components/activevalidatordetailsvalidationstatus.md b/chainkit/docs/models/components/activevalidatordetailsvalidationstatus.md deleted file mode 100644 index b5e7931f..00000000 --- a/chainkit/docs/models/components/activevalidatordetailsvalidationstatus.md +++ /dev/null @@ -1,15 +0,0 @@ -# ActiveValidatorDetailsValidationStatus - -## Example Usage - -```typescript -import { ActiveValidatorDetailsValidationStatus } from "@avalanche-sdk/chainkit/models/components"; - -let value: ActiveValidatorDetailsValidationStatus = "active"; -``` - -## Values - -```typescript -"active" -``` \ No newline at end of file diff --git a/chainkit/docs/models/components/completeddelegatordetails.md b/chainkit/docs/models/components/completeddelegatordetails.md index 84388a0a..c4f7c8a4 100644 --- a/chainkit/docs/models/components/completeddelegatordetails.md +++ b/chainkit/docs/models/components/completeddelegatordetails.md @@ -35,4 +35,4 @@ let value: CompletedDelegatorDetails = { | `endTimestamp` | *number* | :heavy_check_mark: | N/A | | `grossReward` | *string* | :heavy_check_mark: | Total rewards distributed for the successful delegation. | | `netReward` | *string* | :heavy_check_mark: | Net rewards distributed to the delegator after deducting delegation fee from the gross reward for the successful delegation. | -| `delegationStatus` | [components.CompletedDelegatorDetailsDelegationStatus](../../models/components/completeddelegatordetailsdelegationstatus.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `delegationStatus` | *"completed"* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/chainkit/docs/models/components/completeddelegatordetailsdelegationstatus.md b/chainkit/docs/models/components/completeddelegatordetailsdelegationstatus.md deleted file mode 100644 index b7ed5065..00000000 --- a/chainkit/docs/models/components/completeddelegatordetailsdelegationstatus.md +++ /dev/null @@ -1,15 +0,0 @@ -# CompletedDelegatorDetailsDelegationStatus - -## Example Usage - -```typescript -import { CompletedDelegatorDetailsDelegationStatus } from "@avalanche-sdk/chainkit/models/components"; - -let value: CompletedDelegatorDetailsDelegationStatus = "completed"; -``` - -## Values - -```typescript -"completed" -``` \ No newline at end of file diff --git a/chainkit/docs/models/components/completedvalidatordetails.md b/chainkit/docs/models/components/completedvalidatordetails.md index d47fccac..6deec870 100644 --- a/chainkit/docs/models/components/completedvalidatordetails.md +++ b/chainkit/docs/models/components/completedvalidatordetails.md @@ -23,17 +23,17 @@ let value: CompletedValidatorDetails = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | -| `txHash` | *string* | :heavy_check_mark: | N/A | -| `nodeId` | *string* | :heavy_check_mark: | N/A | -| `subnetId` | *string* | :heavy_check_mark: | N/A | -| `amountStaked` | *string* | :heavy_check_mark: | N/A | -| `delegationFee` | *string* | :heavy_minus_sign: | The percentage of total estimated delegator rewards allocated to validator nodes for supporting delegations. | -| `startTimestamp` | *number* | :heavy_check_mark: | N/A | -| `endTimestamp` | *number* | :heavy_check_mark: | N/A | -| `blsCredentials` | [components.BlsCredentials](../../models/components/blscredentials.md) | :heavy_minus_sign: | Present for AddPermissionlessValidatorTx | -| `delegatorCount` | *number* | :heavy_check_mark: | N/A | -| `amountDelegated` | *string* | :heavy_minus_sign: | N/A | -| `rewards` | [components.Rewards](../../models/components/rewards.md) | :heavy_check_mark: | N/A | -| `validationStatus` | [components.CompletedValidatorDetailsValidationStatus](../../models/components/completedvalidatordetailsvalidationstatus.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `txHash` | *string* | :heavy_check_mark: | N/A | +| `nodeId` | *string* | :heavy_check_mark: | N/A | +| `subnetId` | *string* | :heavy_check_mark: | N/A | +| `amountStaked` | *string* | :heavy_check_mark: | N/A | +| `delegationFee` | *string* | :heavy_minus_sign: | The percentage of total estimated delegator rewards allocated to validator nodes for supporting delegations. | +| `startTimestamp` | *number* | :heavy_check_mark: | N/A | +| `endTimestamp` | *number* | :heavy_check_mark: | N/A | +| `blsCredentials` | [components.BlsCredentials](../../models/components/blscredentials.md) | :heavy_minus_sign: | Present for AddPermissionlessValidatorTx | +| `delegatorCount` | *number* | :heavy_check_mark: | N/A | +| `amountDelegated` | *string* | :heavy_minus_sign: | N/A | +| `rewards` | [components.Rewards](../../models/components/rewards.md) | :heavy_check_mark: | N/A | +| `validationStatus` | *"completed"* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/chainkit/docs/models/components/completedvalidatordetailsvalidationstatus.md b/chainkit/docs/models/components/completedvalidatordetailsvalidationstatus.md deleted file mode 100644 index d1af586e..00000000 --- a/chainkit/docs/models/components/completedvalidatordetailsvalidationstatus.md +++ /dev/null @@ -1,15 +0,0 @@ -# CompletedValidatorDetailsValidationStatus - -## Example Usage - -```typescript -import { CompletedValidatorDetailsValidationStatus } from "@avalanche-sdk/chainkit/models/components"; - -let value: CompletedValidatorDetailsValidationStatus = "completed"; -``` - -## Values - -```typescript -"completed" -``` \ No newline at end of file diff --git a/chainkit/docs/models/components/createevmtransactionexportrequest.md b/chainkit/docs/models/components/createevmtransactionexportrequest.md index 9a36416c..8aec1d71 100644 --- a/chainkit/docs/models/components/createevmtransactionexportrequest.md +++ b/chainkit/docs/models/components/createevmtransactionexportrequest.md @@ -26,7 +26,7 @@ let value: CreateEvmTransactionExportRequest = { | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `type` | [components.EVMOperationType](../../models/components/evmoperationtype.md) | :heavy_check_mark: | N/A | | +| `type` | *"TRANSACTION_EXPORT_EVM"* | :heavy_check_mark: | N/A | | | `firstDate` | *string* | :heavy_minus_sign: | N/A | 2023-05-01 | | `lastDate` | *string* | :heavy_minus_sign: | N/A | 2023-05-02 | | ~~`startDate`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | 2023-05-01 | diff --git a/chainkit/docs/models/components/deliveredicmmessage.md b/chainkit/docs/models/components/deliveredicmmessage.md index 85edbf16..61cd73dd 100644 --- a/chainkit/docs/models/components/deliveredicmmessage.md +++ b/chainkit/docs/models/components/deliveredicmmessage.md @@ -68,4 +68,4 @@ let value: DeliveredIcmMessage = { | `rewardDetails` | [components.IcmRewardDetails](../../models/components/icmrewarddetails.md) | :heavy_check_mark: | N/A | | `sourceTransaction` | [components.IcmSourceTransaction](../../models/components/icmsourcetransaction.md) | :heavy_check_mark: | N/A | | `destinationTransaction` | [components.IcmDestinationTransaction](../../models/components/icmdestinationtransaction.md) | :heavy_check_mark: | N/A | -| `status` | [components.DeliveredIcmMessageStatus](../../models/components/deliveredicmmessagestatus.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `status` | *"delivered"* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/chainkit/docs/models/components/deliveredicmmessagestatus.md b/chainkit/docs/models/components/deliveredicmmessagestatus.md deleted file mode 100644 index ce24f986..00000000 --- a/chainkit/docs/models/components/deliveredicmmessagestatus.md +++ /dev/null @@ -1,15 +0,0 @@ -# DeliveredIcmMessageStatus - -## Example Usage - -```typescript -import { DeliveredIcmMessageStatus } from "@avalanche-sdk/chainkit/models/components"; - -let value: DeliveredIcmMessageStatus = "delivered"; -``` - -## Values - -```typescript -"delivered" -``` \ No newline at end of file diff --git a/chainkit/docs/models/components/deliveredsourcenotindexedicmmessage.md b/chainkit/docs/models/components/deliveredsourcenotindexedicmmessage.md index 52d4e8da..0efffeda 100644 --- a/chainkit/docs/models/components/deliveredsourcenotindexedicmmessage.md +++ b/chainkit/docs/models/components/deliveredsourcenotindexedicmmessage.md @@ -45,21 +45,21 @@ let value: DeliveredSourceNotIndexedIcmMessage = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | -| `messageId` | *string* | :heavy_check_mark: | N/A | -| `icmContractAddress` | *string* | :heavy_check_mark: | N/A | -| `sourceBlockchainId` | *string* | :heavy_check_mark: | N/A | -| `destinationBlockchainId` | *string* | :heavy_check_mark: | N/A | -| `sourceEvmChainId` | *string* | :heavy_check_mark: | N/A | -| `destinationEvmChainId` | *string* | :heavy_check_mark: | N/A | -| `messageNonce` | *string* | :heavy_check_mark: | N/A | -| `from` | *string* | :heavy_check_mark: | N/A | -| `to` | *string* | :heavy_check_mark: | N/A | -| `data` | *string* | :heavy_minus_sign: | N/A | -| `messageExecuted` | *boolean* | :heavy_check_mark: | N/A | -| `receipts` | [components.IcmReceipt](../../models/components/icmreceipt.md)[] | :heavy_check_mark: | N/A | -| `receiptDelivered` | *boolean* | :heavy_check_mark: | N/A | -| `rewardDetails` | [components.IcmRewardDetails](../../models/components/icmrewarddetails.md) | :heavy_check_mark: | N/A | -| `destinationTransaction` | [components.IcmDestinationTransaction](../../models/components/icmdestinationtransaction.md) | :heavy_check_mark: | N/A | -| `status` | [components.DeliveredSourceNotIndexedIcmMessageStatus](../../models/components/deliveredsourcenotindexedicmmessagestatus.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `messageId` | *string* | :heavy_check_mark: | N/A | +| `icmContractAddress` | *string* | :heavy_check_mark: | N/A | +| `sourceBlockchainId` | *string* | :heavy_check_mark: | N/A | +| `destinationBlockchainId` | *string* | :heavy_check_mark: | N/A | +| `sourceEvmChainId` | *string* | :heavy_check_mark: | N/A | +| `destinationEvmChainId` | *string* | :heavy_check_mark: | N/A | +| `messageNonce` | *string* | :heavy_check_mark: | N/A | +| `from` | *string* | :heavy_check_mark: | N/A | +| `to` | *string* | :heavy_check_mark: | N/A | +| `data` | *string* | :heavy_minus_sign: | N/A | +| `messageExecuted` | *boolean* | :heavy_check_mark: | N/A | +| `receipts` | [components.IcmReceipt](../../models/components/icmreceipt.md)[] | :heavy_check_mark: | N/A | +| `receiptDelivered` | *boolean* | :heavy_check_mark: | N/A | +| `rewardDetails` | [components.IcmRewardDetails](../../models/components/icmrewarddetails.md) | :heavy_check_mark: | N/A | +| `destinationTransaction` | [components.IcmDestinationTransaction](../../models/components/icmdestinationtransaction.md) | :heavy_check_mark: | N/A | +| `status` | *"delivered_source_not_indexed"* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/chainkit/docs/models/components/deliveredsourcenotindexedicmmessagestatus.md b/chainkit/docs/models/components/deliveredsourcenotindexedicmmessagestatus.md deleted file mode 100644 index 11bc07f6..00000000 --- a/chainkit/docs/models/components/deliveredsourcenotindexedicmmessagestatus.md +++ /dev/null @@ -1,16 +0,0 @@ -# DeliveredSourceNotIndexedIcmMessageStatus - -## Example Usage - -```typescript -import { DeliveredSourceNotIndexedIcmMessageStatus } from "@avalanche-sdk/chainkit/models/components"; - -let value: DeliveredSourceNotIndexedIcmMessageStatus = - "delivered_source_not_indexed"; -``` - -## Values - -```typescript -"delivered_source_not_indexed" -``` \ No newline at end of file diff --git a/chainkit/docs/models/components/deliveredsourcenotindexedteleportermessage.md b/chainkit/docs/models/components/deliveredsourcenotindexedteleportermessage.md index 87eba0dc..4cdf5a51 100644 --- a/chainkit/docs/models/components/deliveredsourcenotindexedteleportermessage.md +++ b/chainkit/docs/models/components/deliveredsourcenotindexedteleportermessage.md @@ -50,21 +50,21 @@ let value: DeliveredSourceNotIndexedTeleporterMessage = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | -| `messageId` | *string* | :heavy_check_mark: | N/A | -| `teleporterContractAddress` | *string* | :heavy_check_mark: | N/A | -| `sourceBlockchainId` | *string* | :heavy_check_mark: | N/A | -| `destinationBlockchainId` | *string* | :heavy_check_mark: | N/A | -| `sourceEvmChainId` | *string* | :heavy_check_mark: | N/A | -| `destinationEvmChainId` | *string* | :heavy_check_mark: | N/A | -| `messageNonce` | *string* | :heavy_check_mark: | N/A | -| `from` | *string* | :heavy_check_mark: | N/A | -| `to` | *string* | :heavy_check_mark: | N/A | -| `data` | *string* | :heavy_minus_sign: | N/A | -| `messageExecuted` | *boolean* | :heavy_check_mark: | N/A | -| `receipts` | [components.TeleporterReceipt](../../models/components/teleporterreceipt.md)[] | :heavy_check_mark: | N/A | -| `receiptDelivered` | *boolean* | :heavy_check_mark: | N/A | -| `rewardDetails` | [components.TeleporterRewardDetails](../../models/components/teleporterrewarddetails.md) | :heavy_check_mark: | N/A | -| `destinationTransaction` | [components.TeleporterDestinationTransaction](../../models/components/teleporterdestinationtransaction.md) | :heavy_check_mark: | N/A | -| `status` | [components.DeliveredSourceNotIndexedTeleporterMessageStatus](../../models/components/deliveredsourcenotindexedteleportermessagestatus.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `messageId` | *string* | :heavy_check_mark: | N/A | +| `teleporterContractAddress` | *string* | :heavy_check_mark: | N/A | +| `sourceBlockchainId` | *string* | :heavy_check_mark: | N/A | +| `destinationBlockchainId` | *string* | :heavy_check_mark: | N/A | +| `sourceEvmChainId` | *string* | :heavy_check_mark: | N/A | +| `destinationEvmChainId` | *string* | :heavy_check_mark: | N/A | +| `messageNonce` | *string* | :heavy_check_mark: | N/A | +| `from` | *string* | :heavy_check_mark: | N/A | +| `to` | *string* | :heavy_check_mark: | N/A | +| `data` | *string* | :heavy_minus_sign: | N/A | +| `messageExecuted` | *boolean* | :heavy_check_mark: | N/A | +| `receipts` | [components.TeleporterReceipt](../../models/components/teleporterreceipt.md)[] | :heavy_check_mark: | N/A | +| `receiptDelivered` | *boolean* | :heavy_check_mark: | N/A | +| `rewardDetails` | [components.TeleporterRewardDetails](../../models/components/teleporterrewarddetails.md) | :heavy_check_mark: | N/A | +| `destinationTransaction` | [components.TeleporterDestinationTransaction](../../models/components/teleporterdestinationtransaction.md) | :heavy_check_mark: | N/A | +| `status` | *"delivered_source_not_indexed"* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/chainkit/docs/models/components/deliveredsourcenotindexedteleportermessagestatus.md b/chainkit/docs/models/components/deliveredsourcenotindexedteleportermessagestatus.md deleted file mode 100644 index a817a03f..00000000 --- a/chainkit/docs/models/components/deliveredsourcenotindexedteleportermessagestatus.md +++ /dev/null @@ -1,16 +0,0 @@ -# DeliveredSourceNotIndexedTeleporterMessageStatus - -## Example Usage - -```typescript -import { DeliveredSourceNotIndexedTeleporterMessageStatus } from "@avalanche-sdk/chainkit/models/components"; - -let value: DeliveredSourceNotIndexedTeleporterMessageStatus = - "delivered_source_not_indexed"; -``` - -## Values - -```typescript -"delivered_source_not_indexed" -``` \ No newline at end of file diff --git a/chainkit/docs/models/components/deliveredteleportermessage.md b/chainkit/docs/models/components/deliveredteleportermessage.md index 05c86d6d..1566890d 100644 --- a/chainkit/docs/models/components/deliveredteleportermessage.md +++ b/chainkit/docs/models/components/deliveredteleportermessage.md @@ -68,4 +68,4 @@ let value: DeliveredTeleporterMessage = { | `rewardDetails` | [components.TeleporterRewardDetails](../../models/components/teleporterrewarddetails.md) | :heavy_check_mark: | N/A | | `sourceTransaction` | [components.TeleporterSourceTransaction](../../models/components/teleportersourcetransaction.md) | :heavy_check_mark: | N/A | | `destinationTransaction` | [components.TeleporterDestinationTransaction](../../models/components/teleporterdestinationtransaction.md) | :heavy_check_mark: | N/A | -| `status` | [components.DeliveredTeleporterMessageStatus](../../models/components/deliveredteleportermessagestatus.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `status` | *"delivered"* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/chainkit/docs/models/components/deliveredteleportermessagestatus.md b/chainkit/docs/models/components/deliveredteleportermessagestatus.md deleted file mode 100644 index ac53648d..00000000 --- a/chainkit/docs/models/components/deliveredteleportermessagestatus.md +++ /dev/null @@ -1,15 +0,0 @@ -# DeliveredTeleporterMessageStatus - -## Example Usage - -```typescript -import { DeliveredTeleporterMessageStatus } from "@avalanche-sdk/chainkit/models/components"; - -let value: DeliveredTeleporterMessageStatus = "delivered"; -``` - -## Values - -```typescript -"delivered" -``` \ No newline at end of file diff --git a/chainkit/docs/models/components/erc1155contract.md b/chainkit/docs/models/components/erc1155contract.md index f6221054..05ed0ed7 100644 --- a/chainkit/docs/models/components/erc1155contract.md +++ b/chainkit/docs/models/components/erc1155contract.md @@ -28,6 +28,6 @@ let value: Erc1155Contract = { | `tags` | *string*[] | :heavy_minus_sign: | N/A | | | `address` | *string* | :heavy_check_mark: | A wallet or contract address in mixed-case checksum encoding. | 0x71C7656EC7ab88b098defB751B7401B5f6d8976F | | `deploymentDetails` | [components.ContractDeploymentDetails](../../models/components/contractdeploymentdetails.md) | :heavy_minus_sign: | N/A | | -| `ercType` | [components.Erc1155ContractErcType](../../models/components/erc1155contracterctype.md) | :heavy_check_mark: | N/A | | +| `ercType` | *"ERC-1155"* | :heavy_check_mark: | N/A | | | `symbol` | *string* | :heavy_minus_sign: | The contract symbol. | WAVAX | | `pricingProviders` | [components.PricingProviders](../../models/components/pricingproviders.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/chainkit/docs/models/components/erc1155contracterctype.md b/chainkit/docs/models/components/erc1155contracterctype.md deleted file mode 100644 index c6219880..00000000 --- a/chainkit/docs/models/components/erc1155contracterctype.md +++ /dev/null @@ -1,15 +0,0 @@ -# Erc1155ContractErcType - -## Example Usage - -```typescript -import { Erc1155ContractErcType } from "@avalanche-sdk/chainkit/models/components"; - -let value: Erc1155ContractErcType = "ERC-1155"; -``` - -## Values - -```typescript -"ERC-1155" -``` \ No newline at end of file diff --git a/chainkit/docs/models/components/erc1155transfer.md b/chainkit/docs/models/components/erc1155transfer.md index 33aa9e25..66b55498 100644 --- a/chainkit/docs/models/components/erc1155transfer.md +++ b/chainkit/docs/models/components/erc1155transfer.md @@ -8,6 +8,7 @@ import { Erc1155Transfer } from "@avalanche-sdk/chainkit/models/components"; let value: Erc1155Transfer = { blockNumber: "339", blockTimestamp: 1648672486, + blockTimestampMilliseconds: 1648672486000, blockHash: "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", txHash: "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4", @@ -43,14 +44,15 @@ let value: Erc1155Transfer = { ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `blockNumber` | *string* | :heavy_check_mark: | The block number on the chain. | 339 | -| `blockTimestamp` | *number* | :heavy_check_mark: | The block finality timestamp. | 1648672486 | -| `blockHash` | *string* | :heavy_check_mark: | The block hash identifier. | 0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c | -| `txHash` | *string* | :heavy_check_mark: | The transaction hash identifier. | 0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4 | -| `from` | [components.RichAddress](../../models/components/richaddress.md) | :heavy_check_mark: | N/A | | -| `to` | [components.RichAddress](../../models/components/richaddress.md) | :heavy_check_mark: | N/A | | -| `logIndex` | *number* | :heavy_check_mark: | N/A | | -| `value` | *string* | :heavy_check_mark: | N/A | 10000000000000000000 | -| `erc1155Token` | [components.Erc1155Token](../../models/components/erc1155token.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `blockNumber` | *string* | :heavy_check_mark: | The block number on the chain. | 339 | +| `blockTimestamp` | *number* | :heavy_check_mark: | The block creation (proposal) timestamp in seconds | 1648672486 | +| `blockTimestampMilliseconds` | *number* | :heavy_minus_sign: | The block creation (proposal) timestamp in milliseconds. Available only after Granite upgrade. | 1648672486000 | +| `blockHash` | *string* | :heavy_check_mark: | The block hash identifier. | 0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c | +| `txHash` | *string* | :heavy_check_mark: | The transaction hash identifier. | 0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4 | +| `from` | [components.RichAddress](../../models/components/richaddress.md) | :heavy_check_mark: | N/A | | +| `to` | [components.RichAddress](../../models/components/richaddress.md) | :heavy_check_mark: | N/A | | +| `logIndex` | *number* | :heavy_check_mark: | N/A | | +| `value` | *string* | :heavy_check_mark: | N/A | 10000000000000000000 | +| `erc1155Token` | [components.Erc1155Token](../../models/components/erc1155token.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/chainkit/docs/models/components/erc20contract.md b/chainkit/docs/models/components/erc20contract.md index 650ddf4f..9876ab27 100644 --- a/chainkit/docs/models/components/erc20contract.md +++ b/chainkit/docs/models/components/erc20contract.md @@ -29,7 +29,7 @@ let value: Erc20Contract = { | `tags` | *string*[] | :heavy_minus_sign: | N/A | | | `address` | *string* | :heavy_check_mark: | A wallet or contract address in mixed-case checksum encoding. | 0x71C7656EC7ab88b098defB751B7401B5f6d8976F | | `deploymentDetails` | [components.ContractDeploymentDetails](../../models/components/contractdeploymentdetails.md) | :heavy_minus_sign: | N/A | | -| `ercType` | [components.Erc20ContractErcType](../../models/components/erc20contracterctype.md) | :heavy_check_mark: | N/A | | +| `ercType` | *"ERC-20"* | :heavy_check_mark: | N/A | | | `symbol` | *string* | :heavy_minus_sign: | The contract symbol. | WAVAX | | `decimals` | *number* | :heavy_check_mark: | The number of decimals the token uses. For example `6`, means to divide the token amount by `1000000` to get its user representation. | 18 | | `pricingProviders` | [components.PricingProviders](../../models/components/pricingproviders.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/chainkit/docs/models/components/erc20contracterctype.md b/chainkit/docs/models/components/erc20contracterctype.md deleted file mode 100644 index e7eec21c..00000000 --- a/chainkit/docs/models/components/erc20contracterctype.md +++ /dev/null @@ -1,15 +0,0 @@ -# Erc20ContractErcType - -## Example Usage - -```typescript -import { Erc20ContractErcType } from "@avalanche-sdk/chainkit/models/components"; - -let value: Erc20ContractErcType = "ERC-20"; -``` - -## Values - -```typescript -"ERC-20" -``` \ No newline at end of file diff --git a/chainkit/docs/models/components/erc20transfer.md b/chainkit/docs/models/components/erc20transfer.md index 24ad5019..95ce228c 100644 --- a/chainkit/docs/models/components/erc20transfer.md +++ b/chainkit/docs/models/components/erc20transfer.md @@ -8,6 +8,7 @@ import { Erc20Transfer } from "@avalanche-sdk/chainkit/models/components"; let value: Erc20Transfer = { blockNumber: "339", blockTimestamp: 1648672486, + blockTimestampMilliseconds: 1648672486000, blockHash: "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", txHash: "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4", @@ -47,14 +48,15 @@ let value: Erc20Transfer = { ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `blockNumber` | *string* | :heavy_check_mark: | The block number on the chain. | 339 | -| `blockTimestamp` | *number* | :heavy_check_mark: | The block finality timestamp. | 1648672486 | -| `blockHash` | *string* | :heavy_check_mark: | The block hash identifier. | 0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c | -| `txHash` | *string* | :heavy_check_mark: | The transaction hash identifier. | 0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4 | -| `from` | [components.RichAddress](../../models/components/richaddress.md) | :heavy_check_mark: | N/A | | -| `to` | [components.RichAddress](../../models/components/richaddress.md) | :heavy_check_mark: | N/A | | -| `logIndex` | *number* | :heavy_check_mark: | N/A | | -| `value` | *string* | :heavy_check_mark: | N/A | 10000000000000000000 | -| `erc20Token` | [components.Erc20Token](../../models/components/erc20token.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `blockNumber` | *string* | :heavy_check_mark: | The block number on the chain. | 339 | +| `blockTimestamp` | *number* | :heavy_check_mark: | The block creation (proposal) timestamp in seconds | 1648672486 | +| `blockTimestampMilliseconds` | *number* | :heavy_minus_sign: | The block creation (proposal) timestamp in milliseconds. Available only after Granite upgrade. | 1648672486000 | +| `blockHash` | *string* | :heavy_check_mark: | The block hash identifier. | 0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c | +| `txHash` | *string* | :heavy_check_mark: | The transaction hash identifier. | 0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4 | +| `from` | [components.RichAddress](../../models/components/richaddress.md) | :heavy_check_mark: | N/A | | +| `to` | [components.RichAddress](../../models/components/richaddress.md) | :heavy_check_mark: | N/A | | +| `logIndex` | *number* | :heavy_check_mark: | N/A | | +| `value` | *string* | :heavy_check_mark: | N/A | 10000000000000000000 | +| `erc20Token` | [components.Erc20Token](../../models/components/erc20token.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/chainkit/docs/models/components/erc721contract.md b/chainkit/docs/models/components/erc721contract.md index 409dca36..4f0e3327 100644 --- a/chainkit/docs/models/components/erc721contract.md +++ b/chainkit/docs/models/components/erc721contract.md @@ -28,5 +28,5 @@ let value: Erc721Contract = { | `tags` | *string*[] | :heavy_minus_sign: | N/A | | | `address` | *string* | :heavy_check_mark: | A wallet or contract address in mixed-case checksum encoding. | 0x71C7656EC7ab88b098defB751B7401B5f6d8976F | | `deploymentDetails` | [components.ContractDeploymentDetails](../../models/components/contractdeploymentdetails.md) | :heavy_minus_sign: | N/A | | -| `ercType` | [components.Erc721ContractErcType](../../models/components/erc721contracterctype.md) | :heavy_check_mark: | N/A | | +| `ercType` | *"ERC-721"* | :heavy_check_mark: | N/A | | | `symbol` | *string* | :heavy_minus_sign: | The contract symbol. | WAVAX | \ No newline at end of file diff --git a/chainkit/docs/models/components/erc721contracterctype.md b/chainkit/docs/models/components/erc721contracterctype.md deleted file mode 100644 index 73a4e9a1..00000000 --- a/chainkit/docs/models/components/erc721contracterctype.md +++ /dev/null @@ -1,15 +0,0 @@ -# Erc721ContractErcType - -## Example Usage - -```typescript -import { Erc721ContractErcType } from "@avalanche-sdk/chainkit/models/components"; - -let value: Erc721ContractErcType = "ERC-721"; -``` - -## Values - -```typescript -"ERC-721" -``` \ No newline at end of file diff --git a/chainkit/docs/models/components/erc721transfer.md b/chainkit/docs/models/components/erc721transfer.md index 7a19411a..e68b77c9 100644 --- a/chainkit/docs/models/components/erc721transfer.md +++ b/chainkit/docs/models/components/erc721transfer.md @@ -8,6 +8,7 @@ import { Erc721Transfer } from "@avalanche-sdk/chainkit/models/components"; let value: Erc721Transfer = { blockNumber: "339", blockTimestamp: 1648672486, + blockTimestampMilliseconds: 1648672486000, blockHash: "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", txHash: "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4", @@ -45,13 +46,14 @@ let value: Erc721Transfer = { ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `blockNumber` | *string* | :heavy_check_mark: | The block number on the chain. | 339 | -| `blockTimestamp` | *number* | :heavy_check_mark: | The block finality timestamp. | 1648672486 | -| `blockHash` | *string* | :heavy_check_mark: | The block hash identifier. | 0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c | -| `txHash` | *string* | :heavy_check_mark: | The transaction hash identifier. | 0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4 | -| `from` | [components.RichAddress](../../models/components/richaddress.md) | :heavy_check_mark: | N/A | | -| `to` | [components.RichAddress](../../models/components/richaddress.md) | :heavy_check_mark: | N/A | | -| `logIndex` | *number* | :heavy_check_mark: | N/A | | -| `erc721Token` | [components.Erc721Token](../../models/components/erc721token.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `blockNumber` | *string* | :heavy_check_mark: | The block number on the chain. | 339 | +| `blockTimestamp` | *number* | :heavy_check_mark: | The block creation (proposal) timestamp in seconds | 1648672486 | +| `blockTimestampMilliseconds` | *number* | :heavy_minus_sign: | The block creation (proposal) timestamp in milliseconds. Available only after Granite upgrade. | 1648672486000 | +| `blockHash` | *string* | :heavy_check_mark: | The block hash identifier. | 0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c | +| `txHash` | *string* | :heavy_check_mark: | The transaction hash identifier. | 0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4 | +| `from` | [components.RichAddress](../../models/components/richaddress.md) | :heavy_check_mark: | N/A | | +| `to` | [components.RichAddress](../../models/components/richaddress.md) | :heavy_check_mark: | N/A | | +| `logIndex` | *number* | :heavy_check_mark: | N/A | | +| `erc721Token` | [components.Erc721Token](../../models/components/erc721token.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/chainkit/docs/models/components/eventtypeenum.md b/chainkit/docs/models/components/eventtypeenum.md new file mode 100644 index 00000000..74401fbe --- /dev/null +++ b/chainkit/docs/models/components/eventtypeenum.md @@ -0,0 +1,17 @@ +# EventTypeEnum + +Event type + +## Example Usage + +```typescript +import { EventTypeEnum } from "@avalanche-sdk/chainkit/models/components"; + +let value: EventTypeEnum = "address_activity"; +``` + +## Values + +```typescript +"address_activity" +``` \ No newline at end of file diff --git a/chainkit/docs/models/components/evmaddressactivityrequest.md b/chainkit/docs/models/components/evmaddressactivityrequest.md index 2f3615a5..2caf3483 100644 --- a/chainkit/docs/models/components/evmaddressactivityrequest.md +++ b/chainkit/docs/models/components/evmaddressactivityrequest.md @@ -24,7 +24,7 @@ let value: EVMAddressActivityRequest = { | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| `eventType` | [components.EVMAddressActivityRequestEventType](../../models/components/evmaddressactivityrequesteventtype.md) | :heavy_check_mark: | N/A | +| `eventType` | *"address_activity"* | :heavy_check_mark: | N/A | | `url` | *string* | :heavy_check_mark: | N/A | | `name` | *string* | :heavy_minus_sign: | N/A | | `description` | *string* | :heavy_minus_sign: | N/A | diff --git a/chainkit/docs/models/components/evmaddressactivityrequesteventtype.md b/chainkit/docs/models/components/evmaddressactivityrequesteventtype.md deleted file mode 100644 index 12e813c1..00000000 --- a/chainkit/docs/models/components/evmaddressactivityrequesteventtype.md +++ /dev/null @@ -1,15 +0,0 @@ -# EVMAddressActivityRequestEventType - -## Example Usage - -```typescript -import { EVMAddressActivityRequestEventType } from "@avalanche-sdk/chainkit/models/components"; - -let value: EVMAddressActivityRequestEventType = "address_activity"; -``` - -## Values - -```typescript -"address_activity" -``` \ No newline at end of file diff --git a/chainkit/docs/models/components/evmblock.md b/chainkit/docs/models/components/evmblock.md index dac9797d..243d58f9 100644 --- a/chainkit/docs/models/components/evmblock.md +++ b/chainkit/docs/models/components/evmblock.md @@ -9,6 +9,8 @@ let value: EvmBlock = { chainId: "43114", blockNumber: "339", blockTimestamp: 1648672486, + blockTimestampMilliseconds: 1648672486000, + blockMinDelayExcess: 7477290, blockHash: "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", txCount: 4089.02, @@ -24,17 +26,19 @@ let value: EvmBlock = { ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `chainId` | *string* | :heavy_check_mark: | The EVM chain ID on which the block was created. | 43114 | -| `blockNumber` | *string* | :heavy_check_mark: | The block number on the chain. | 339 | -| `blockTimestamp` | *number* | :heavy_check_mark: | The block finality timestamp. | 1648672486 | -| `blockHash` | *string* | :heavy_check_mark: | The block hash identifier. | 0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c | -| `txCount` | *number* | :heavy_check_mark: | The number of evm transactions in the block. | | -| `baseFee` | *string* | :heavy_check_mark: | The base gas fee for a transaction to be included in the block. | | -| `gasUsed` | *string* | :heavy_check_mark: | The gas used for transactions in the block. | | -| `gasLimit` | *string* | :heavy_check_mark: | The total gas limit set for transactions in the block. | | -| `gasCost` | *string* | :heavy_check_mark: | N/A | | -| `parentHash` | *string* | :heavy_check_mark: | The hash of the parent block. | | -| `feesSpent` | *string* | :heavy_check_mark: | The amount of fees spent/burned for transactions in the block. | | -| `cumulativeTransactions` | *string* | :heavy_check_mark: | The cumulative number of transactions for the chain including this block. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `chainId` | *string* | :heavy_check_mark: | The EVM chain ID on which the block was created. | 43114 | +| `blockNumber` | *string* | :heavy_check_mark: | The block number on the chain. | 339 | +| `blockTimestamp` | *number* | :heavy_check_mark: | The block creation (proposal) timestamp in seconds | 1648672486 | +| `blockTimestampMilliseconds` | *number* | :heavy_minus_sign: | The block creation (proposal) timestamp in milliseconds. Available only after Granite upgrade. | 1648672486000 | +| `blockMinDelayExcess` | *number* | :heavy_minus_sign: | Minimum block delay in milliseconds. Available only after Granite upgrade. | 7477290 | +| `blockHash` | *string* | :heavy_check_mark: | The block hash identifier. | 0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c | +| `txCount` | *number* | :heavy_check_mark: | The number of evm transactions in the block. | | +| `baseFee` | *string* | :heavy_check_mark: | The base gas fee for a transaction to be included in the block. | | +| `gasUsed` | *string* | :heavy_check_mark: | The gas used for transactions in the block. | | +| `gasLimit` | *string* | :heavy_check_mark: | The total gas limit set for transactions in the block. | | +| `gasCost` | *string* | :heavy_check_mark: | N/A | | +| `parentHash` | *string* | :heavy_check_mark: | The hash of the parent block. | | +| `feesSpent` | *string* | :heavy_check_mark: | The amount of fees spent/burned for transactions in the block. | | +| `cumulativeTransactions` | *string* | :heavy_check_mark: | The cumulative number of transactions for the chain including this block. | | \ No newline at end of file diff --git a/chainkit/docs/models/components/evmoperationtype.md b/chainkit/docs/models/components/evmoperationtype.md deleted file mode 100644 index 92a34b70..00000000 --- a/chainkit/docs/models/components/evmoperationtype.md +++ /dev/null @@ -1,15 +0,0 @@ -# EVMOperationType - -## Example Usage - -```typescript -import { EVMOperationType } from "@avalanche-sdk/chainkit/models/components"; - -let value: EVMOperationType = "TRANSACTION_EXPORT_EVM"; -``` - -## Values - -```typescript -"TRANSACTION_EXPORT_EVM" -``` \ No newline at end of file diff --git a/chainkit/docs/models/components/fullnativetransactiondetails.md b/chainkit/docs/models/components/fullnativetransactiondetails.md index d9b0de7f..a7f1b2de 100644 --- a/chainkit/docs/models/components/fullnativetransactiondetails.md +++ b/chainkit/docs/models/components/fullnativetransactiondetails.md @@ -8,6 +8,8 @@ import { FullNativeTransactionDetails } from "@avalanche-sdk/chainkit/models/com let value: FullNativeTransactionDetails = { blockNumber: "339", blockTimestamp: 1648672486, + blockTimestampMilliseconds: 1648672486000, + blockMinDelayExcess: 7477290, blockHash: "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", chainId: "43114", @@ -48,25 +50,27 @@ let value: FullNativeTransactionDetails = { ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | -| `blockNumber` | *string* | :heavy_check_mark: | The block number on the chain. | 339 | -| `blockTimestamp` | *number* | :heavy_check_mark: | The block finality timestamp. | 1648672486 | -| `blockHash` | *string* | :heavy_check_mark: | The block hash identifier. | 0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c | -| `chainId` | *string* | :heavy_check_mark: | The EVM chain ID on which the transaction occured. | 43114 | -| `blockIndex` | *number* | :heavy_check_mark: | The index at which the transaction occured in the block (0-indexed). | 0 | -| `txHash` | *string* | :heavy_check_mark: | The transaction hash identifier. | 0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4 | -| `txStatus` | *string* | :heavy_check_mark: | The transaction status, which is either 0 (failed) or 1 (successful). | 1 | -| `txType` | *number* | :heavy_check_mark: | The transaction type. | 1 | -| `gasLimit` | *string* | :heavy_check_mark: | The gas limit set for the transaction. | 51373 | -| `gasUsed` | *string* | :heavy_check_mark: | The amount of gas used. | 51373 | -| `gasPrice` | *string* | :heavy_check_mark: | The gas price denominated by the number of decimals of the native token. | 470000000000 | -| `nonce` | *string* | :heavy_check_mark: | The nonce used by the sender of the transaction. | 1 | -| `from` | [components.RichAddress](../../models/components/richaddress.md) | :heavy_check_mark: | N/A | | -| `to` | [components.RichAddress](../../models/components/richaddress.md) | :heavy_check_mark: | N/A | | -| `method` | [components.Method](../../models/components/method.md) | :heavy_minus_sign: | N/A | | -| `value` | *string* | :heavy_check_mark: | N/A | 10000000000000000000 | -| `input` | *string* | :heavy_check_mark: | The data sent for the transaction. | | -| `baseFeePerGas` | *string* | :heavy_check_mark: | N/A | | -| `maxFeePerGas` | *string* | :heavy_minus_sign: | N/A | | -| `maxPriorityFeePerGas` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `blockNumber` | *string* | :heavy_check_mark: | The block number on the chain. | 339 | +| `blockTimestamp` | *number* | :heavy_check_mark: | The block creation (proposal) timestamp in seconds | 1648672486 | +| `blockTimestampMilliseconds` | *number* | :heavy_minus_sign: | The block creation (proposal) timestamp in milliseconds. Available only after Granite upgrade. | 1648672486000 | +| `blockMinDelayExcess` | *number* | :heavy_minus_sign: | Minimum block delay in milliseconds. Available only after Granite upgrade. | 7477290 | +| `blockHash` | *string* | :heavy_check_mark: | The block hash identifier. | 0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c | +| `chainId` | *string* | :heavy_check_mark: | The EVM chain ID on which the transaction occured. | 43114 | +| `blockIndex` | *number* | :heavy_check_mark: | The index at which the transaction occured in the block (0-indexed). | 0 | +| `txHash` | *string* | :heavy_check_mark: | The transaction hash identifier. | 0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4 | +| `txStatus` | *string* | :heavy_check_mark: | The transaction status, which is either 0 (failed) or 1 (successful). | 1 | +| `txType` | *number* | :heavy_check_mark: | The transaction type. | 1 | +| `gasLimit` | *string* | :heavy_check_mark: | The gas limit set for the transaction. | 51373 | +| `gasUsed` | *string* | :heavy_check_mark: | The amount of gas used. | 51373 | +| `gasPrice` | *string* | :heavy_check_mark: | The gas price denominated by the number of decimals of the native token. | 470000000000 | +| `nonce` | *string* | :heavy_check_mark: | The nonce used by the sender of the transaction. | 1 | +| `from` | [components.RichAddress](../../models/components/richaddress.md) | :heavy_check_mark: | N/A | | +| `to` | [components.RichAddress](../../models/components/richaddress.md) | :heavy_check_mark: | N/A | | +| `method` | [components.Method](../../models/components/method.md) | :heavy_minus_sign: | N/A | | +| `value` | *string* | :heavy_check_mark: | N/A | 10000000000000000000 | +| `input` | *string* | :heavy_check_mark: | The data sent for the transaction. | | +| `baseFeePerGas` | *string* | :heavy_check_mark: | N/A | | +| `maxFeePerGas` | *string* | :heavy_minus_sign: | N/A | | +| `maxPriorityFeePerGas` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/chainkit/docs/models/components/getevmblockresponse.md b/chainkit/docs/models/components/getevmblockresponse.md index 40d1428b..b135ed69 100644 --- a/chainkit/docs/models/components/getevmblockresponse.md +++ b/chainkit/docs/models/components/getevmblockresponse.md @@ -9,6 +9,8 @@ let value: GetEvmBlockResponse = { chainId: "43114", blockNumber: "339", blockTimestamp: 1648672486, + blockTimestampMilliseconds: 1648672486000, + blockMinDelayExcess: 7477290, blockHash: "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", txCount: 951.35, @@ -24,17 +26,19 @@ let value: GetEvmBlockResponse = { ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `chainId` | *string* | :heavy_check_mark: | The EVM chain ID on which the block was created. | 43114 | -| `blockNumber` | *string* | :heavy_check_mark: | The block number on the chain. | 339 | -| `blockTimestamp` | *number* | :heavy_check_mark: | The block finality timestamp. | 1648672486 | -| `blockHash` | *string* | :heavy_check_mark: | The block hash identifier. | 0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c | -| `txCount` | *number* | :heavy_check_mark: | The number of evm transactions in the block. | | -| `baseFee` | *string* | :heavy_check_mark: | The base gas fee for a transaction to be included in the block. | | -| `gasUsed` | *string* | :heavy_check_mark: | The gas used for transactions in the block. | | -| `gasLimit` | *string* | :heavy_check_mark: | The total gas limit set for transactions in the block. | | -| `gasCost` | *string* | :heavy_check_mark: | N/A | | -| `parentHash` | *string* | :heavy_check_mark: | The hash of the parent block. | | -| `feesSpent` | *string* | :heavy_check_mark: | The amount of fees spent/burned for transactions in the block. | | -| `cumulativeTransactions` | *string* | :heavy_check_mark: | The cumulative number of transactions for the chain including this block. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `chainId` | *string* | :heavy_check_mark: | The EVM chain ID on which the block was created. | 43114 | +| `blockNumber` | *string* | :heavy_check_mark: | The block number on the chain. | 339 | +| `blockTimestamp` | *number* | :heavy_check_mark: | The block creation (proposal) timestamp in seconds | 1648672486 | +| `blockTimestampMilliseconds` | *number* | :heavy_minus_sign: | The block creation (proposal) timestamp in milliseconds. Available only after Granite upgrade. | 1648672486000 | +| `blockMinDelayExcess` | *number* | :heavy_minus_sign: | Minimum block delay in milliseconds. Available only after Granite upgrade. | 7477290 | +| `blockHash` | *string* | :heavy_check_mark: | The block hash identifier. | 0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c | +| `txCount` | *number* | :heavy_check_mark: | The number of evm transactions in the block. | | +| `baseFee` | *string* | :heavy_check_mark: | The base gas fee for a transaction to be included in the block. | | +| `gasUsed` | *string* | :heavy_check_mark: | The gas used for transactions in the block. | | +| `gasLimit` | *string* | :heavy_check_mark: | The total gas limit set for transactions in the block. | | +| `gasCost` | *string* | :heavy_check_mark: | N/A | | +| `parentHash` | *string* | :heavy_check_mark: | The hash of the parent block. | | +| `feesSpent` | *string* | :heavy_check_mark: | The amount of fees spent/burned for transactions in the block. | | +| `cumulativeTransactions` | *string* | :heavy_check_mark: | The cumulative number of transactions for the chain including this block. | | \ No newline at end of file diff --git a/chainkit/docs/models/components/gettransactionresponse.md b/chainkit/docs/models/components/gettransactionresponse.md index d5756036..78a806b1 100644 --- a/chainkit/docs/models/components/gettransactionresponse.md +++ b/chainkit/docs/models/components/gettransactionresponse.md @@ -150,6 +150,8 @@ let value: GetTransactionResponse = { nativeTransaction: { blockNumber: "339", blockTimestamp: 1648672486, + blockTimestampMilliseconds: 1648672486000, + blockMinDelayExcess: 7477290, blockHash: "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", chainId: "43114", diff --git a/chainkit/docs/models/components/internaltransaction.md b/chainkit/docs/models/components/internaltransaction.md index 8a756116..9b687927 100644 --- a/chainkit/docs/models/components/internaltransaction.md +++ b/chainkit/docs/models/components/internaltransaction.md @@ -8,6 +8,7 @@ import { InternalTransaction } from "@avalanche-sdk/chainkit/models/components"; let value: InternalTransaction = { blockNumber: "339", blockTimestamp: 1648672486, + blockTimestampMilliseconds: 1648672486000, blockHash: "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", txHash: "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4", @@ -37,16 +38,17 @@ let value: InternalTransaction = { ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `blockNumber` | *string* | :heavy_check_mark: | The block number on the chain. | 339 | -| `blockTimestamp` | *number* | :heavy_check_mark: | The block finality timestamp. | 1648672486 | -| `blockHash` | *string* | :heavy_check_mark: | The block hash identifier. | 0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c | -| `txHash` | *string* | :heavy_check_mark: | The transaction hash identifier. | 0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4 | -| `from` | [components.RichAddress](../../models/components/richaddress.md) | :heavy_check_mark: | N/A | | -| `to` | [components.RichAddress](../../models/components/richaddress.md) | :heavy_check_mark: | N/A | | -| `internalTxType` | [components.InternalTransactionOpCall](../../models/components/internaltransactionopcall.md) | :heavy_check_mark: | N/A | | -| `value` | *string* | :heavy_check_mark: | N/A | 10000000000000000000 | -| `isReverted` | *boolean* | :heavy_check_mark: | True if the internal transaction was reverted. | | -| `gasUsed` | *string* | :heavy_check_mark: | N/A | | -| `gasLimit` | *string* | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `blockNumber` | *string* | :heavy_check_mark: | The block number on the chain. | 339 | +| `blockTimestamp` | *number* | :heavy_check_mark: | The block creation (proposal) timestamp in seconds | 1648672486 | +| `blockTimestampMilliseconds` | *number* | :heavy_minus_sign: | The block creation (proposal) timestamp in milliseconds. Available only after Granite upgrade. | 1648672486000 | +| `blockHash` | *string* | :heavy_check_mark: | The block hash identifier. | 0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c | +| `txHash` | *string* | :heavy_check_mark: | The transaction hash identifier. | 0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4 | +| `from` | [components.RichAddress](../../models/components/richaddress.md) | :heavy_check_mark: | N/A | | +| `to` | [components.RichAddress](../../models/components/richaddress.md) | :heavy_check_mark: | N/A | | +| `internalTxType` | [components.InternalTransactionOpCall](../../models/components/internaltransactionopcall.md) | :heavy_check_mark: | N/A | | +| `value` | *string* | :heavy_check_mark: | N/A | 10000000000000000000 | +| `isReverted` | *boolean* | :heavy_check_mark: | True if the internal transaction was reverted. | | +| `gasUsed` | *string* | :heavy_check_mark: | N/A | | +| `gasLimit` | *string* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/chainkit/docs/models/components/listnfttokens.md b/chainkit/docs/models/components/listnfttokens.md index a0837d97..030abf4b 100644 --- a/chainkit/docs/models/components/listnfttokens.md +++ b/chainkit/docs/models/components/listnfttokens.md @@ -17,7 +17,6 @@ let value: ListNftTokens = { metadata: { indexStatus: "THROTTLED_TOKEN_URI", }, - ownerAddress: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", }, ], }; diff --git a/chainkit/docs/models/components/listtransactiondetailsresponse.md b/chainkit/docs/models/components/listtransactiondetailsresponse.md index 9e6765f5..4f5eeba6 100644 --- a/chainkit/docs/models/components/listtransactiondetailsresponse.md +++ b/chainkit/docs/models/components/listtransactiondetailsresponse.md @@ -11,6 +11,8 @@ let value: ListTransactionDetailsResponse = { nativeTransaction: { blockNumber: "339", blockTimestamp: 1648672486, + blockTimestampMilliseconds: 1648672486000, + blockMinDelayExcess: 7477290, blockHash: "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", chainId: "43114", diff --git a/chainkit/docs/models/components/nativetransaction.md b/chainkit/docs/models/components/nativetransaction.md index dc5f7b65..44eca7b7 100644 --- a/chainkit/docs/models/components/nativetransaction.md +++ b/chainkit/docs/models/components/nativetransaction.md @@ -8,6 +8,8 @@ import { NativeTransaction } from "@avalanche-sdk/chainkit/models/components"; let value: NativeTransaction = { blockNumber: "339", blockTimestamp: 1648672486, + blockTimestampMilliseconds: 1648672486000, + blockMinDelayExcess: 7477290, blockHash: "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", chainId: "43114", @@ -46,21 +48,23 @@ let value: NativeTransaction = { ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | -| `blockNumber` | *string* | :heavy_check_mark: | The block number on the chain. | 339 | -| `blockTimestamp` | *number* | :heavy_check_mark: | The block finality timestamp. | 1648672486 | -| `blockHash` | *string* | :heavy_check_mark: | The block hash identifier. | 0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c | -| `chainId` | *string* | :heavy_check_mark: | The EVM chain ID on which the transaction occured. | 43114 | -| `blockIndex` | *number* | :heavy_check_mark: | The index at which the transaction occured in the block (0-indexed). | 0 | -| `txHash` | *string* | :heavy_check_mark: | The transaction hash identifier. | 0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4 | -| `txStatus` | *string* | :heavy_check_mark: | The transaction status, which is either 0 (failed) or 1 (successful). | 1 | -| `txType` | *number* | :heavy_check_mark: | The transaction type. | 1 | -| `gasLimit` | *string* | :heavy_check_mark: | The gas limit set for the transaction. | 51373 | -| `gasUsed` | *string* | :heavy_check_mark: | The amount of gas used. | 51373 | -| `gasPrice` | *string* | :heavy_check_mark: | The gas price denominated by the number of decimals of the native token. | 470000000000 | -| `nonce` | *string* | :heavy_check_mark: | The nonce used by the sender of the transaction. | 1 | -| `from` | [components.RichAddress](../../models/components/richaddress.md) | :heavy_check_mark: | N/A | | -| `to` | [components.RichAddress](../../models/components/richaddress.md) | :heavy_check_mark: | N/A | | -| `method` | [components.Method](../../models/components/method.md) | :heavy_minus_sign: | N/A | | -| `value` | *string* | :heavy_check_mark: | N/A | 10000000000000000000 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `blockNumber` | *string* | :heavy_check_mark: | The block number on the chain. | 339 | +| `blockTimestamp` | *number* | :heavy_check_mark: | The block creation (proposal) timestamp in seconds | 1648672486 | +| `blockTimestampMilliseconds` | *number* | :heavy_minus_sign: | The block creation (proposal) timestamp in milliseconds. Available only after Granite upgrade. | 1648672486000 | +| `blockMinDelayExcess` | *number* | :heavy_minus_sign: | Minimum block delay in milliseconds. Available only after Granite upgrade. | 7477290 | +| `blockHash` | *string* | :heavy_check_mark: | The block hash identifier. | 0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c | +| `chainId` | *string* | :heavy_check_mark: | The EVM chain ID on which the transaction occured. | 43114 | +| `blockIndex` | *number* | :heavy_check_mark: | The index at which the transaction occured in the block (0-indexed). | 0 | +| `txHash` | *string* | :heavy_check_mark: | The transaction hash identifier. | 0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4 | +| `txStatus` | *string* | :heavy_check_mark: | The transaction status, which is either 0 (failed) or 1 (successful). | 1 | +| `txType` | *number* | :heavy_check_mark: | The transaction type. | 1 | +| `gasLimit` | *string* | :heavy_check_mark: | The gas limit set for the transaction. | 51373 | +| `gasUsed` | *string* | :heavy_check_mark: | The amount of gas used. | 51373 | +| `gasPrice` | *string* | :heavy_check_mark: | The gas price denominated by the number of decimals of the native token. | 470000000000 | +| `nonce` | *string* | :heavy_check_mark: | The nonce used by the sender of the transaction. | 1 | +| `from` | [components.RichAddress](../../models/components/richaddress.md) | :heavy_check_mark: | N/A | | +| `to` | [components.RichAddress](../../models/components/richaddress.md) | :heavy_check_mark: | N/A | | +| `method` | [components.Method](../../models/components/method.md) | :heavy_minus_sign: | N/A | | +| `value` | *string* | :heavy_check_mark: | N/A | 10000000000000000000 | \ No newline at end of file diff --git a/chainkit/docs/models/components/pchaintransaction.md b/chainkit/docs/models/components/pchaintransaction.md index 381097dd..22759f12 100644 --- a/chainkit/docs/models/components/pchaintransaction.md +++ b/chainkit/docs/models/components/pchaintransaction.md @@ -99,7 +99,7 @@ let value: PChainTransaction = { | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `txHash` | *string* | :heavy_check_mark: | A P-Chain transaction hash. | 3P91K6nuDFvDodcRuJTsgdf9SvYe5pMiKk38HppsoeAiEztCP | | `txType` | [components.PChainTransactionType](../../models/components/pchaintransactiontype.md) | :heavy_check_mark: | N/A | | -| `blockTimestamp` | *number* | :heavy_check_mark: | The block finality timestamp. | 1648672486 | +| `blockTimestamp` | *number* | :heavy_check_mark: | The block creation (proposal) timestamp in seconds | 1648672486 | | `blockNumber` | *string* | :heavy_check_mark: | The height of the block in which the transaction was included | | | `blockHash` | *string* | :heavy_check_mark: | N/A | | | `consumedUtxos` | [components.PChainUtxo](../../models/components/pchainutxo.md)[] | :heavy_check_mark: | The consumed UTXOs of the transaction | | diff --git a/chainkit/docs/models/components/pendingdelegatordetails.md b/chainkit/docs/models/components/pendingdelegatordetails.md index 63d91dcd..534be480 100644 --- a/chainkit/docs/models/components/pendingdelegatordetails.md +++ b/chainkit/docs/models/components/pendingdelegatordetails.md @@ -34,4 +34,4 @@ let value: PendingDelegatorDetails = { | `endTimestamp` | *number* | :heavy_check_mark: | N/A | | `estimatedGrossReward` | *string* | :heavy_check_mark: | Estimated total rewards that will be distributed for the successful delegation. | | `estimatedNetReward` | *string* | :heavy_check_mark: | Estimated net rewards that will be distributed to the delegator after deducting delegation fee from the gross reward for the successful delegation. | -| `delegationStatus` | [components.PendingDelegatorDetailsDelegationStatus](../../models/components/pendingdelegatordetailsdelegationstatus.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `delegationStatus` | *"pending"* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/chainkit/docs/models/components/pendingdelegatordetailsdelegationstatus.md b/chainkit/docs/models/components/pendingdelegatordetailsdelegationstatus.md deleted file mode 100644 index 63444f2d..00000000 --- a/chainkit/docs/models/components/pendingdelegatordetailsdelegationstatus.md +++ /dev/null @@ -1,15 +0,0 @@ -# PendingDelegatorDetailsDelegationStatus - -## Example Usage - -```typescript -import { PendingDelegatorDetailsDelegationStatus } from "@avalanche-sdk/chainkit/models/components"; - -let value: PendingDelegatorDetailsDelegationStatus = "pending"; -``` - -## Values - -```typescript -"pending" -``` \ No newline at end of file diff --git a/chainkit/docs/models/components/pendingicmmessage.md b/chainkit/docs/models/components/pendingicmmessage.md index a8c4a4e5..eb1128f7 100644 --- a/chainkit/docs/models/components/pendingicmmessage.md +++ b/chainkit/docs/models/components/pendingicmmessage.md @@ -43,21 +43,21 @@ let value: PendingIcmMessage = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `messageId` | *string* | :heavy_check_mark: | N/A | -| `icmContractAddress` | *string* | :heavy_check_mark: | N/A | -| `sourceBlockchainId` | *string* | :heavy_check_mark: | N/A | -| `destinationBlockchainId` | *string* | :heavy_check_mark: | N/A | -| `sourceEvmChainId` | *string* | :heavy_check_mark: | N/A | -| `destinationEvmChainId` | *string* | :heavy_check_mark: | N/A | -| `messageNonce` | *string* | :heavy_check_mark: | N/A | -| `from` | *string* | :heavy_check_mark: | N/A | -| `to` | *string* | :heavy_check_mark: | N/A | -| `data` | *string* | :heavy_minus_sign: | N/A | -| `messageExecuted` | *boolean* | :heavy_check_mark: | N/A | -| `receipts` | [components.IcmReceipt](../../models/components/icmreceipt.md)[] | :heavy_check_mark: | N/A | -| `receiptDelivered` | *boolean* | :heavy_check_mark: | N/A | -| `rewardDetails` | [components.IcmRewardDetails](../../models/components/icmrewarddetails.md) | :heavy_check_mark: | N/A | -| `sourceTransaction` | [components.IcmSourceTransaction](../../models/components/icmsourcetransaction.md) | :heavy_check_mark: | N/A | -| `status` | [components.PendingIcmMessageStatus](../../models/components/pendingicmmessagestatus.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `messageId` | *string* | :heavy_check_mark: | N/A | +| `icmContractAddress` | *string* | :heavy_check_mark: | N/A | +| `sourceBlockchainId` | *string* | :heavy_check_mark: | N/A | +| `destinationBlockchainId` | *string* | :heavy_check_mark: | N/A | +| `sourceEvmChainId` | *string* | :heavy_check_mark: | N/A | +| `destinationEvmChainId` | *string* | :heavy_check_mark: | N/A | +| `messageNonce` | *string* | :heavy_check_mark: | N/A | +| `from` | *string* | :heavy_check_mark: | N/A | +| `to` | *string* | :heavy_check_mark: | N/A | +| `data` | *string* | :heavy_minus_sign: | N/A | +| `messageExecuted` | *boolean* | :heavy_check_mark: | N/A | +| `receipts` | [components.IcmReceipt](../../models/components/icmreceipt.md)[] | :heavy_check_mark: | N/A | +| `receiptDelivered` | *boolean* | :heavy_check_mark: | N/A | +| `rewardDetails` | [components.IcmRewardDetails](../../models/components/icmrewarddetails.md) | :heavy_check_mark: | N/A | +| `sourceTransaction` | [components.IcmSourceTransaction](../../models/components/icmsourcetransaction.md) | :heavy_check_mark: | N/A | +| `status` | *"pending"* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/chainkit/docs/models/components/pendingicmmessagestatus.md b/chainkit/docs/models/components/pendingicmmessagestatus.md deleted file mode 100644 index 5a86a325..00000000 --- a/chainkit/docs/models/components/pendingicmmessagestatus.md +++ /dev/null @@ -1,15 +0,0 @@ -# PendingIcmMessageStatus - -## Example Usage - -```typescript -import { PendingIcmMessageStatus } from "@avalanche-sdk/chainkit/models/components"; - -let value: PendingIcmMessageStatus = "pending"; -``` - -## Values - -```typescript -"pending" -``` \ No newline at end of file diff --git a/chainkit/docs/models/components/pendingteleportermessage.md b/chainkit/docs/models/components/pendingteleportermessage.md index a0116603..2e3e10c6 100644 --- a/chainkit/docs/models/components/pendingteleportermessage.md +++ b/chainkit/docs/models/components/pendingteleportermessage.md @@ -43,21 +43,21 @@ let value: PendingTeleporterMessage = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `messageId` | *string* | :heavy_check_mark: | N/A | -| `teleporterContractAddress` | *string* | :heavy_check_mark: | N/A | -| `sourceBlockchainId` | *string* | :heavy_check_mark: | N/A | -| `destinationBlockchainId` | *string* | :heavy_check_mark: | N/A | -| `sourceEvmChainId` | *string* | :heavy_check_mark: | N/A | -| `destinationEvmChainId` | *string* | :heavy_check_mark: | N/A | -| `messageNonce` | *string* | :heavy_check_mark: | N/A | -| `from` | *string* | :heavy_check_mark: | N/A | -| `to` | *string* | :heavy_check_mark: | N/A | -| `data` | *string* | :heavy_minus_sign: | N/A | -| `messageExecuted` | *boolean* | :heavy_check_mark: | N/A | -| `receipts` | [components.TeleporterReceipt](../../models/components/teleporterreceipt.md)[] | :heavy_check_mark: | N/A | -| `receiptDelivered` | *boolean* | :heavy_check_mark: | N/A | -| `rewardDetails` | [components.TeleporterRewardDetails](../../models/components/teleporterrewarddetails.md) | :heavy_check_mark: | N/A | -| `sourceTransaction` | [components.TeleporterSourceTransaction](../../models/components/teleportersourcetransaction.md) | :heavy_check_mark: | N/A | -| `status` | [components.PendingTeleporterMessageStatus](../../models/components/pendingteleportermessagestatus.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `messageId` | *string* | :heavy_check_mark: | N/A | +| `teleporterContractAddress` | *string* | :heavy_check_mark: | N/A | +| `sourceBlockchainId` | *string* | :heavy_check_mark: | N/A | +| `destinationBlockchainId` | *string* | :heavy_check_mark: | N/A | +| `sourceEvmChainId` | *string* | :heavy_check_mark: | N/A | +| `destinationEvmChainId` | *string* | :heavy_check_mark: | N/A | +| `messageNonce` | *string* | :heavy_check_mark: | N/A | +| `from` | *string* | :heavy_check_mark: | N/A | +| `to` | *string* | :heavy_check_mark: | N/A | +| `data` | *string* | :heavy_minus_sign: | N/A | +| `messageExecuted` | *boolean* | :heavy_check_mark: | N/A | +| `receipts` | [components.TeleporterReceipt](../../models/components/teleporterreceipt.md)[] | :heavy_check_mark: | N/A | +| `receiptDelivered` | *boolean* | :heavy_check_mark: | N/A | +| `rewardDetails` | [components.TeleporterRewardDetails](../../models/components/teleporterrewarddetails.md) | :heavy_check_mark: | N/A | +| `sourceTransaction` | [components.TeleporterSourceTransaction](../../models/components/teleportersourcetransaction.md) | :heavy_check_mark: | N/A | +| `status` | *"pending"* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/chainkit/docs/models/components/pendingteleportermessagestatus.md b/chainkit/docs/models/components/pendingteleportermessagestatus.md deleted file mode 100644 index ef766a41..00000000 --- a/chainkit/docs/models/components/pendingteleportermessagestatus.md +++ /dev/null @@ -1,15 +0,0 @@ -# PendingTeleporterMessageStatus - -## Example Usage - -```typescript -import { PendingTeleporterMessageStatus } from "@avalanche-sdk/chainkit/models/components"; - -let value: PendingTeleporterMessageStatus = "pending"; -``` - -## Values - -```typescript -"pending" -``` \ No newline at end of file diff --git a/chainkit/docs/models/components/pendingvalidatordetails.md b/chainkit/docs/models/components/pendingvalidatordetails.md index a5de9ab1..b354fa77 100644 --- a/chainkit/docs/models/components/pendingvalidatordetails.md +++ b/chainkit/docs/models/components/pendingvalidatordetails.md @@ -18,14 +18,14 @@ let value: PendingValidatorDetails = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| `txHash` | *string* | :heavy_check_mark: | N/A | -| `nodeId` | *string* | :heavy_check_mark: | N/A | -| `subnetId` | *string* | :heavy_check_mark: | N/A | -| `amountStaked` | *string* | :heavy_check_mark: | N/A | -| `delegationFee` | *string* | :heavy_minus_sign: | The percentage of total estimated delegator rewards allocated to validator nodes for supporting delegations. | -| `startTimestamp` | *number* | :heavy_check_mark: | N/A | -| `endTimestamp` | *number* | :heavy_check_mark: | N/A | -| `blsCredentials` | [components.BlsCredentials](../../models/components/blscredentials.md) | :heavy_minus_sign: | Present for AddPermissionlessValidatorTx | -| `validationStatus` | [components.PendingValidatorDetailsValidationStatus](../../models/components/pendingvalidatordetailsvalidationstatus.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `txHash` | *string* | :heavy_check_mark: | N/A | +| `nodeId` | *string* | :heavy_check_mark: | N/A | +| `subnetId` | *string* | :heavy_check_mark: | N/A | +| `amountStaked` | *string* | :heavy_check_mark: | N/A | +| `delegationFee` | *string* | :heavy_minus_sign: | The percentage of total estimated delegator rewards allocated to validator nodes for supporting delegations. | +| `startTimestamp` | *number* | :heavy_check_mark: | N/A | +| `endTimestamp` | *number* | :heavy_check_mark: | N/A | +| `blsCredentials` | [components.BlsCredentials](../../models/components/blscredentials.md) | :heavy_minus_sign: | Present for AddPermissionlessValidatorTx | +| `validationStatus` | *"pending"* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/chainkit/docs/models/components/pendingvalidatordetailsvalidationstatus.md b/chainkit/docs/models/components/pendingvalidatordetailsvalidationstatus.md deleted file mode 100644 index e20c323f..00000000 --- a/chainkit/docs/models/components/pendingvalidatordetailsvalidationstatus.md +++ /dev/null @@ -1,15 +0,0 @@ -# PendingValidatorDetailsValidationStatus - -## Example Usage - -```typescript -import { PendingValidatorDetailsValidationStatus } from "@avalanche-sdk/chainkit/models/components"; - -let value: PendingValidatorDetailsValidationStatus = "pending"; -``` - -## Values - -```typescript -"pending" -``` \ No newline at end of file diff --git a/chainkit/docs/models/components/primarynetworkaddressactivityeventtype.md b/chainkit/docs/models/components/primarynetworkaddressactivityeventtype.md deleted file mode 100644 index 7d35e788..00000000 --- a/chainkit/docs/models/components/primarynetworkaddressactivityeventtype.md +++ /dev/null @@ -1,16 +0,0 @@ -# PrimaryNetworkAddressActivityEventType - -## Example Usage - -```typescript -import { PrimaryNetworkAddressActivityEventType } from "@avalanche-sdk/chainkit/models/components"; - -let value: PrimaryNetworkAddressActivityEventType = - "primary_network_address_activity"; -``` - -## Values - -```typescript -"primary_network_address_activity" -``` \ No newline at end of file diff --git a/chainkit/docs/models/components/primarynetworkaddressactivityrequest.md b/chainkit/docs/models/components/primarynetworkaddressactivityrequest.md index 8bc416b7..b0f7c93b 100644 --- a/chainkit/docs/models/components/primarynetworkaddressactivityrequest.md +++ b/chainkit/docs/models/components/primarynetworkaddressactivityrequest.md @@ -31,12 +31,12 @@ let value: PrimaryNetworkAddressActivityRequest = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | -| `eventType` | [components.PrimaryNetworkAddressActivityRequestEventType](../../models/components/primarynetworkaddressactivityrequesteventtype.md) | :heavy_check_mark: | N/A | -| `url` | *string* | :heavy_check_mark: | N/A | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `network` | [components.PrimaryNetworkType](../../models/components/primarynetworktype.md) | :heavy_check_mark: | N/A | -| `chainId` | *string* | :heavy_check_mark: | N/A | -| `metadata` | *components.PrimaryNetworkAddressActivityRequestMetadata* | :heavy_check_mark: | Metadata for platform address activity event | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `eventType` | *"primary_network_address_activity"* | :heavy_check_mark: | N/A | +| `url` | *string* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `network` | [components.PrimaryNetworkType](../../models/components/primarynetworktype.md) | :heavy_check_mark: | N/A | +| `chainId` | *string* | :heavy_check_mark: | N/A | +| `metadata` | *components.PrimaryNetworkAddressActivityRequestMetadata* | :heavy_check_mark: | Metadata for platform address activity event | \ No newline at end of file diff --git a/chainkit/docs/models/components/primarynetworkaddressactivityrequesteventtype.md b/chainkit/docs/models/components/primarynetworkaddressactivityrequesteventtype.md deleted file mode 100644 index 666ff4de..00000000 --- a/chainkit/docs/models/components/primarynetworkaddressactivityrequesteventtype.md +++ /dev/null @@ -1,16 +0,0 @@ -# PrimaryNetworkAddressActivityRequestEventType - -## Example Usage - -```typescript -import { PrimaryNetworkAddressActivityRequestEventType } from "@avalanche-sdk/chainkit/models/components"; - -let value: PrimaryNetworkAddressActivityRequestEventType = - "primary_network_address_activity"; -``` - -## Values - -```typescript -"primary_network_address_activity" -``` \ No newline at end of file diff --git a/chainkit/docs/models/components/primarynetworkaddressactivityresponse.md b/chainkit/docs/models/components/primarynetworkaddressactivityresponse.md index a03aa245..6d60a731 100644 --- a/chainkit/docs/models/components/primarynetworkaddressactivityresponse.md +++ b/chainkit/docs/models/components/primarynetworkaddressactivityresponse.md @@ -31,14 +31,14 @@ let value: PrimaryNetworkAddressActivityResponse = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | N/A | -| `url` | *string* | :heavy_check_mark: | N/A | -| `chainId` | *string* | :heavy_check_mark: | N/A | -| `status` | [components.WebhookStatusType](../../models/components/webhookstatustype.md) | :heavy_check_mark: | N/A | -| `createdAt` | *number* | :heavy_check_mark: | N/A | -| `name` | *string* | :heavy_check_mark: | N/A | -| `description` | *string* | :heavy_check_mark: | N/A | -| `eventType` | [components.PrimaryNetworkAddressActivityEventType](../../models/components/primarynetworkaddressactivityeventtype.md) | :heavy_check_mark: | N/A | -| `metadata` | [components.PrimaryNetworkAddressActivityMetadata](../../models/components/primarynetworkaddressactivitymetadata.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | N/A | +| `url` | *string* | :heavy_check_mark: | N/A | +| `chainId` | *string* | :heavy_check_mark: | N/A | +| `status` | [components.WebhookStatusType](../../models/components/webhookstatustype.md) | :heavy_check_mark: | N/A | +| `createdAt` | *number* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_check_mark: | N/A | +| `description` | *string* | :heavy_check_mark: | N/A | +| `eventType` | *"primary_network_address_activity"* | :heavy_check_mark: | N/A | +| `metadata` | [components.PrimaryNetworkAddressActivityMetadata](../../models/components/primarynetworkaddressactivitymetadata.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/chainkit/docs/models/components/removedvalidatordetails.md b/chainkit/docs/models/components/removedvalidatordetails.md index c3d1eff2..759c979f 100644 --- a/chainkit/docs/models/components/removedvalidatordetails.md +++ b/chainkit/docs/models/components/removedvalidatordetails.md @@ -20,16 +20,16 @@ let value: RemovedValidatorDetails = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| `txHash` | *string* | :heavy_check_mark: | N/A | -| `nodeId` | *string* | :heavy_check_mark: | N/A | -| `subnetId` | *string* | :heavy_check_mark: | N/A | -| `amountStaked` | *string* | :heavy_check_mark: | N/A | -| `delegationFee` | *string* | :heavy_minus_sign: | The percentage of total estimated delegator rewards allocated to validator nodes for supporting delegations. | -| `startTimestamp` | *number* | :heavy_check_mark: | N/A | -| `endTimestamp` | *number* | :heavy_check_mark: | N/A | -| `blsCredentials` | [components.BlsCredentials](../../models/components/blscredentials.md) | :heavy_minus_sign: | Present for AddPermissionlessValidatorTx | -| `removeTxHash` | *string* | :heavy_check_mark: | The transaction hash that removed the permissioned subnet validator. | -| `removeTimestamp` | *number* | :heavy_check_mark: | The timestamp of the transaction that removed the permissioned subnet validator. | -| `validationStatus` | [components.RemovedValidatorDetailsValidationStatus](../../models/components/removedvalidatordetailsvalidationstatus.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `txHash` | *string* | :heavy_check_mark: | N/A | +| `nodeId` | *string* | :heavy_check_mark: | N/A | +| `subnetId` | *string* | :heavy_check_mark: | N/A | +| `amountStaked` | *string* | :heavy_check_mark: | N/A | +| `delegationFee` | *string* | :heavy_minus_sign: | The percentage of total estimated delegator rewards allocated to validator nodes for supporting delegations. | +| `startTimestamp` | *number* | :heavy_check_mark: | N/A | +| `endTimestamp` | *number* | :heavy_check_mark: | N/A | +| `blsCredentials` | [components.BlsCredentials](../../models/components/blscredentials.md) | :heavy_minus_sign: | Present for AddPermissionlessValidatorTx | +| `removeTxHash` | *string* | :heavy_check_mark: | The transaction hash that removed the permissioned subnet validator. | +| `removeTimestamp` | *number* | :heavy_check_mark: | The timestamp of the transaction that removed the permissioned subnet validator. | +| `validationStatus` | *"removed"* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/chainkit/docs/models/components/removedvalidatordetailsvalidationstatus.md b/chainkit/docs/models/components/removedvalidatordetailsvalidationstatus.md deleted file mode 100644 index 7489aea1..00000000 --- a/chainkit/docs/models/components/removedvalidatordetailsvalidationstatus.md +++ /dev/null @@ -1,15 +0,0 @@ -# RemovedValidatorDetailsValidationStatus - -## Example Usage - -```typescript -import { RemovedValidatorDetailsValidationStatus } from "@avalanche-sdk/chainkit/models/components"; - -let value: RemovedValidatorDetailsValidationStatus = "removed"; -``` - -## Values - -```typescript -"removed" -``` \ No newline at end of file diff --git a/chainkit/docs/models/components/transactiondetails.md b/chainkit/docs/models/components/transactiondetails.md index 80879906..57a76dfc 100644 --- a/chainkit/docs/models/components/transactiondetails.md +++ b/chainkit/docs/models/components/transactiondetails.md @@ -9,6 +9,8 @@ let value: TransactionDetails = { nativeTransaction: { blockNumber: "339", blockTimestamp: 1648672486, + blockTimestampMilliseconds: 1648672486000, + blockMinDelayExcess: 7477290, blockHash: "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", chainId: "43114", diff --git a/chainkit/docs/models/components/transfer.md b/chainkit/docs/models/components/transfer.md index d49661dd..52cb14d2 100644 --- a/chainkit/docs/models/components/transfer.md +++ b/chainkit/docs/models/components/transfer.md @@ -9,6 +9,7 @@ const value: components.Erc20Transfer = { blockNumber: "339", blockTimestamp: 1648672486, + blockTimestampMilliseconds: 1648672486000, blockHash: "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", txHash: "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4", @@ -52,6 +53,7 @@ const value: components.Erc20Transfer = { const value: components.Erc721Transfer = { blockNumber: "339", blockTimestamp: 1648672486, + blockTimestampMilliseconds: 1648672486000, blockHash: "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", txHash: "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4", @@ -93,6 +95,7 @@ const value: components.Erc721Transfer = { const value: components.Erc1155Transfer = { blockNumber: "339", blockTimestamp: 1648672486, + blockTimestampMilliseconds: 1648672486000, blockHash: "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", txHash: "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4", diff --git a/chainkit/docs/models/components/unknowncontract.md b/chainkit/docs/models/components/unknowncontract.md index dbc66061..df7f78f1 100644 --- a/chainkit/docs/models/components/unknowncontract.md +++ b/chainkit/docs/models/components/unknowncontract.md @@ -27,4 +27,4 @@ let value: UnknownContract = { | `tags` | *string*[] | :heavy_minus_sign: | N/A | | | `address` | *string* | :heavy_check_mark: | A wallet or contract address in mixed-case checksum encoding. | 0x71C7656EC7ab88b098defB751B7401B5f6d8976F | | `deploymentDetails` | [components.ContractDeploymentDetails](../../models/components/contractdeploymentdetails.md) | :heavy_minus_sign: | N/A | | -| `ercType` | [components.UnknownContractErcType](../../models/components/unknowncontracterctype.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| `ercType` | *"UNKNOWN"* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/chainkit/docs/models/components/unknowncontracterctype.md b/chainkit/docs/models/components/unknowncontracterctype.md deleted file mode 100644 index ca7dc114..00000000 --- a/chainkit/docs/models/components/unknowncontracterctype.md +++ /dev/null @@ -1,15 +0,0 @@ -# UnknownContractErcType - -## Example Usage - -```typescript -import { UnknownContractErcType } from "@avalanche-sdk/chainkit/models/components"; - -let value: UnknownContractErcType = "UNKNOWN"; -``` - -## Values - -```typescript -"UNKNOWN" -``` \ No newline at end of file diff --git a/chainkit/docs/models/components/validatoractivityeventtype.md b/chainkit/docs/models/components/validatoractivityeventtype.md deleted file mode 100644 index aa12a57a..00000000 --- a/chainkit/docs/models/components/validatoractivityeventtype.md +++ /dev/null @@ -1,15 +0,0 @@ -# ValidatorActivityEventType - -## Example Usage - -```typescript -import { ValidatorActivityEventType } from "@avalanche-sdk/chainkit/models/components"; - -let value: ValidatorActivityEventType = "validator_activity"; -``` - -## Values - -```typescript -"validator_activity" -``` \ No newline at end of file diff --git a/chainkit/docs/models/components/validatoractivityrequest.md b/chainkit/docs/models/components/validatoractivityrequest.md index 819c5d4b..93256b5b 100644 --- a/chainkit/docs/models/components/validatoractivityrequest.md +++ b/chainkit/docs/models/components/validatoractivityrequest.md @@ -24,11 +24,11 @@ let value: ValidatorActivityRequest = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | -| `eventType` | [components.ValidatorActivityRequestEventType](../../models/components/validatoractivityrequesteventtype.md) | :heavy_check_mark: | N/A | -| `url` | *string* | :heavy_check_mark: | N/A | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `network` | [components.PrimaryNetworkType](../../models/components/primarynetworktype.md) | :heavy_check_mark: | N/A | -| `metadata` | *components.ValidatorActivityRequestMetadata* | :heavy_check_mark: | Metadata for platform validator activity event | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `eventType` | *"validator_activity"* | :heavy_check_mark: | N/A | +| `url` | *string* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `network` | [components.PrimaryNetworkType](../../models/components/primarynetworktype.md) | :heavy_check_mark: | N/A | +| `metadata` | *components.ValidatorActivityRequestMetadata* | :heavy_check_mark: | Metadata for platform validator activity event | \ No newline at end of file diff --git a/chainkit/docs/models/components/validatoractivityrequesteventtype.md b/chainkit/docs/models/components/validatoractivityrequesteventtype.md deleted file mode 100644 index 5358454e..00000000 --- a/chainkit/docs/models/components/validatoractivityrequesteventtype.md +++ /dev/null @@ -1,15 +0,0 @@ -# ValidatorActivityRequestEventType - -## Example Usage - -```typescript -import { ValidatorActivityRequestEventType } from "@avalanche-sdk/chainkit/models/components"; - -let value: ValidatorActivityRequestEventType = "validator_activity"; -``` - -## Values - -```typescript -"validator_activity" -``` \ No newline at end of file diff --git a/chainkit/docs/models/components/validatoractivityresponse.md b/chainkit/docs/models/components/validatoractivityresponse.md index 29f660aa..c182066b 100644 --- a/chainkit/docs/models/components/validatoractivityresponse.md +++ b/chainkit/docs/models/components/validatoractivityresponse.md @@ -29,14 +29,14 @@ let value: ValidatorActivityResponse = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | N/A | -| `url` | *string* | :heavy_check_mark: | N/A | -| `chainId` | *string* | :heavy_check_mark: | N/A | -| `status` | [components.WebhookStatusType](../../models/components/webhookstatustype.md) | :heavy_check_mark: | N/A | -| `createdAt` | *number* | :heavy_check_mark: | N/A | -| `name` | *string* | :heavy_check_mark: | N/A | -| `description` | *string* | :heavy_check_mark: | N/A | -| `eventType` | [components.ValidatorActivityEventType](../../models/components/validatoractivityeventtype.md) | :heavy_check_mark: | N/A | -| `metadata` | [components.ValidatorActivityMetadata](../../models/components/validatoractivitymetadata.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | N/A | +| `url` | *string* | :heavy_check_mark: | N/A | +| `chainId` | *string* | :heavy_check_mark: | N/A | +| `status` | [components.WebhookStatusType](../../models/components/webhookstatustype.md) | :heavy_check_mark: | N/A | +| `createdAt` | *number* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_check_mark: | N/A | +| `description` | *string* | :heavy_check_mark: | N/A | +| `eventType` | *"validator_activity"* | :heavy_check_mark: | N/A | +| `metadata` | [components.ValidatorActivityMetadata](../../models/components/validatoractivitymetadata.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/chainkit/docs/models/components/webhookaddressactivityresponse.md b/chainkit/docs/models/components/webhookaddressactivityresponse.md index d4795bd4..abd84f12 100644 --- a/chainkit/docs/models/components/webhookaddressactivityresponse.md +++ b/chainkit/docs/models/components/webhookaddressactivityresponse.md @@ -125,9 +125,9 @@ let value: WebhookAddressActivityResponse = { ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| `webhookId` | *string* | :heavy_check_mark: | Webhook ID | 401da7d9-d6d7-46c8-b431-72ff1e1543f4 | -| `eventType` | [components.WebhookAddressActivityResponseEventType](../../models/components/webhookaddressactivityresponseeventtype.md) | :heavy_check_mark: | Event type | address_activity | -| `messageId` | *string* | :heavy_check_mark: | Message ID | bc9732db-2430-4296-afc3-c51267beb14a | -| `event` | [components.TransactionEvent](../../models/components/transactionevent.md) | :heavy_check_mark: | Event details | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `webhookId` | *string* | :heavy_check_mark: | Webhook ID | 401da7d9-d6d7-46c8-b431-72ff1e1543f4 | +| `eventType` | [components.EventTypeEnum](../../models/components/eventtypeenum.md) | :heavy_check_mark: | Event type | address_activity | +| `messageId` | *string* | :heavy_check_mark: | Message ID | bc9732db-2430-4296-afc3-c51267beb14a | +| `event` | [components.TransactionEvent](../../models/components/transactionevent.md) | :heavy_check_mark: | Event details | | \ No newline at end of file diff --git a/chainkit/docs/models/components/webhookaddressactivityresponseeventtype.md b/chainkit/docs/models/components/webhookaddressactivityresponseeventtype.md deleted file mode 100644 index f92a962a..00000000 --- a/chainkit/docs/models/components/webhookaddressactivityresponseeventtype.md +++ /dev/null @@ -1,17 +0,0 @@ -# WebhookAddressActivityResponseEventType - -Event type - -## Example Usage - -```typescript -import { WebhookAddressActivityResponseEventType } from "@avalanche-sdk/chainkit/models/components"; - -let value: WebhookAddressActivityResponseEventType = "address_activity"; -``` - -## Values - -```typescript -"address_activity" -``` \ No newline at end of file diff --git a/chainkit/docs/models/operations/getlatestblocksresponse.md b/chainkit/docs/models/operations/getlatestblocksresponse.md index 146b2a72..eb6b0cec 100644 --- a/chainkit/docs/models/operations/getlatestblocksresponse.md +++ b/chainkit/docs/models/operations/getlatestblocksresponse.md @@ -12,6 +12,8 @@ let value: GetLatestBlocksResponse = { chainId: "43114", blockNumber: "339", blockTimestamp: 1648672486, + blockTimestampMilliseconds: 1648672486000, + blockMinDelayExcess: 7477290, blockHash: "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", txCount: 6022.29, diff --git a/chainkit/docs/models/operations/listalllatestblocksresponse.md b/chainkit/docs/models/operations/listalllatestblocksresponse.md index 0ae2952b..af51a2db 100644 --- a/chainkit/docs/models/operations/listalllatestblocksresponse.md +++ b/chainkit/docs/models/operations/listalllatestblocksresponse.md @@ -12,6 +12,8 @@ let value: ListAllLatestBlocksResponse = { chainId: "43114", blockNumber: "339", blockTimestamp: 1648672486, + blockTimestampMilliseconds: 1648672486000, + blockMinDelayExcess: 7477290, blockHash: "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", txCount: 6022.29, diff --git a/chainkit/docs/models/operations/listlatestblocksallchainsresponse.md b/chainkit/docs/models/operations/listlatestblocksallchainsresponse.md index 74a5e200..a8a31bbc 100644 --- a/chainkit/docs/models/operations/listlatestblocksallchainsresponse.md +++ b/chainkit/docs/models/operations/listlatestblocksallchainsresponse.md @@ -12,6 +12,8 @@ let value: ListLatestBlocksAllChainsResponse = { chainId: "43114", blockNumber: "339", blockTimestamp: 1648672486, + blockTimestampMilliseconds: 1648672486000, + blockMinDelayExcess: 7477290, blockHash: "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", txCount: 6022.29, diff --git a/chainkit/docs/models/operations/posttransactionexportjobrequest.md b/chainkit/docs/models/operations/posttransactionexportjobrequest.md index a1da64e0..1b7d9385 100644 --- a/chainkit/docs/models/operations/posttransactionexportjobrequest.md +++ b/chainkit/docs/models/operations/posttransactionexportjobrequest.md @@ -38,3 +38,33 @@ const value: components.CreatePrimaryNetworkTransactionExportRequest = { }; ``` +### `components.CreatePrimaryNetworkTransactionExportRequest` + +```typescript +const value: components.CreatePrimaryNetworkTransactionExportRequest = { + type: "TRANSACTION_EXPORT_PRIMARY_NETWORK_SIMPLE", + firstDate: "2023-05-01", + lastDate: "2023-05-02", + options: { + includeChains: [ + "p-chain", + ], + }, +}; +``` + +### `components.CreatePrimaryNetworkTransactionExportRequest` + +```typescript +const value: components.CreatePrimaryNetworkTransactionExportRequest = { + type: "TRANSACTION_EXPORT_PRIMARY_NETWORK_SIMPLE", + firstDate: "2023-05-01", + lastDate: "2023-05-02", + options: { + includeChains: [ + "p-chain", + ], + }, +}; +``` + diff --git a/chainkit/docs/sdks/addresschains/README.md b/chainkit/docs/sdks/addresschains/README.md index 0487e057..b49c3b10 100644 --- a/chainkit/docs/sdks/addresschains/README.md +++ b/chainkit/docs/sdks/addresschains/README.md @@ -9,7 +9,7 @@ ## list -Lists the chains where the specified address has participated in transactions or ERC token transfers, either as a sender or receiver. The data is refreshed every 15 minutes. +Lists the chains where the specified address has participated in transactions or ERC token transfers, either as a sender or receiver. The data is refreshed every 15 minutes. ### Example Usage diff --git a/chainkit/docs/sdks/evmblocks/README.md b/chainkit/docs/sdks/evmblocks/README.md index eba65dcd..e9a101c1 100644 --- a/chainkit/docs/sdks/evmblocks/README.md +++ b/chainkit/docs/sdks/evmblocks/README.md @@ -12,7 +12,7 @@ ## listLatestAllChains -Lists the most recent blocks from all supported EVM-compatible chains. The results can be filtered by network. +Lists the most recent blocks from all supported EVM-compatible chains. The results can be filtered by network. ### Example Usage diff --git a/chainkit/docs/sdks/evmtransactions/README.md b/chainkit/docs/sdks/evmtransactions/README.md index f3d52577..53c4b186 100644 --- a/chainkit/docs/sdks/evmtransactions/README.md +++ b/chainkit/docs/sdks/evmtransactions/README.md @@ -11,7 +11,7 @@ ## listLatestAllChains -Lists the most recent transactions from all supported EVM-compatible chains. The results can be filtered based on transaction status. +Lists the most recent transactions from all supported EVM-compatible chains. The results can be filtered based on transaction status. ### Example Usage diff --git a/chainkit/examples/package-lock.json b/chainkit/examples/package-lock.json index d6d4c3a6..1b79e1fd 100644 --- a/chainkit/examples/package-lock.json +++ b/chainkit/examples/package-lock.json @@ -18,7 +18,7 @@ }, "..": { "name": "@avalanche-sdk/chainkit", - "version": "0.3.0-alpha.11", + "version": "0.3.0-alpha.12", "license": "BSD-3-Clause", "dependencies": { "@modelcontextprotocol/sdk": ">=1.5.0 <1.10.0", diff --git a/chainkit/package-lock.json b/chainkit/package-lock.json index 177bf6fb..5b18b04d 100644 --- a/chainkit/package-lock.json +++ b/chainkit/package-lock.json @@ -1,12 +1,12 @@ { "name": "@avalanche-sdk/chainkit", - "version": "0.3.0-alpha.11", + "version": "0.3.0-alpha.12", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@avalanche-sdk/chainkit", - "version": "0.3.0-alpha.11", + "version": "0.3.0-alpha.12", "license": "BSD-3-Clause", "dependencies": { "@modelcontextprotocol/sdk": ">=1.5.0 <1.10.0", diff --git a/chainkit/package.json b/chainkit/package.json index c860701b..19bb055a 100644 --- a/chainkit/package.json +++ b/chainkit/package.json @@ -1,6 +1,6 @@ { "name": "@avalanche-sdk/chainkit", - "version": "0.3.0-alpha.11", + "version": "0.3.0-alpha.12", "author": "Sayan Kar", "license": "BSD-3-Clause", "publishConfig": { diff --git a/chainkit/src/funcs/dataEvmAddressChainsList.ts b/chainkit/src/funcs/dataEvmAddressChainsList.ts index 22fff401..d33df04a 100644 --- a/chainkit/src/funcs/dataEvmAddressChainsList.ts +++ b/chainkit/src/funcs/dataEvmAddressChainsList.ts @@ -31,7 +31,7 @@ import { Result } from "../types/fp.js"; * List all chains associated with a given address * * @remarks - * Lists the chains where the specified address has participated in transactions or ERC token transfers, either as a sender or receiver. The data is refreshed every 15 minutes. + * Lists the chains where the specified address has participated in transactions or ERC token transfers, either as a sender or receiver. The data is refreshed every 15 minutes. */ export function dataEvmAddressChainsList( client: AvalancheCore, diff --git a/chainkit/src/funcs/dataEvmBlocksListLatestAllChains.ts b/chainkit/src/funcs/dataEvmBlocksListLatestAllChains.ts index ae2e568a..f8462881 100644 --- a/chainkit/src/funcs/dataEvmBlocksListLatestAllChains.ts +++ b/chainkit/src/funcs/dataEvmBlocksListLatestAllChains.ts @@ -37,7 +37,7 @@ import { * List latest blocks across all supported EVM chains * * @remarks - * Lists the most recent blocks from all supported EVM-compatible chains. The results can be filtered by network. + * Lists the most recent blocks from all supported EVM-compatible chains. The results can be filtered by network. */ export function dataEvmBlocksListLatestAllChains( client: AvalancheCore, diff --git a/chainkit/src/funcs/dataEvmTransactionsListLatestAllChains.ts b/chainkit/src/funcs/dataEvmTransactionsListLatestAllChains.ts index eac5f9e9..1843c379 100644 --- a/chainkit/src/funcs/dataEvmTransactionsListLatestAllChains.ts +++ b/chainkit/src/funcs/dataEvmTransactionsListLatestAllChains.ts @@ -37,7 +37,7 @@ import { * List the latest transactions across all supported EVM chains * * @remarks - * Lists the most recent transactions from all supported EVM-compatible chains. The results can be filtered based on transaction status. + * Lists the most recent transactions from all supported EVM-compatible chains. The results can be filtered based on transaction status. */ export function dataEvmTransactionsListLatestAllChains( client: AvalancheCore, diff --git a/chainkit/src/funcs/validateWebhook.ts b/chainkit/src/funcs/validateWebhook.ts new file mode 100644 index 00000000..adf3bded --- /dev/null +++ b/chainkit/src/funcs/validateWebhook.ts @@ -0,0 +1,65 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { AvalancheCore } from "../core.js"; +import * as components from "../models/components/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { ERR, Result } from "../types/fp.js"; +import { WebhookAuthenticationError } from "../types/webhooks.js"; + +export async function validateWebhook(client: AvalancheCore, { + request: rawRequest, + secret, +}: { + request: { + body: BodyInit; + method: string; + url: string; + headers: Record | Headers; + } | Request; + secret: string; +}): Promise< + Result< + components.WebhookAddressActivityResponse, + SDKValidationError | WebhookAuthenticationError + > +> { + const request = normalizeRequest(rawRequest); + const verifyResult = await client._verifyWebhook({ request, secret }); + if (!verifyResult.ok) { + return verifyResult; + } + const knownSchemas = [components.webhookAddressActivityResponseFromJSON]; + + const jsonString = await request.text(); + + for (const schema of knownSchemas) { + const ret = schema(jsonString); + if (ret.ok) { + return ret; + } + } + + return ERR( + new SDKValidationError( + "No matching schema found for the given webhook payload", + jsonString, + jsonString, + ), + ); +} + +function normalizeRequest( + request: { + body: BodyInit; + method: string; + url: string; + headers: Record | Headers; + } | Request, +): Request { + if (request instanceof Request) { + return request; + } + return new Request(request.url, request); +} diff --git a/chainkit/src/hooks/hooks.ts b/chainkit/src/hooks/hooks.ts index d34c8849..9be513a9 100644 --- a/chainkit/src/hooks/hooks.ts +++ b/chainkit/src/hooks/hooks.ts @@ -3,6 +3,8 @@ */ import { RequestInput } from "../lib/http.js"; +import { ERR, Result } from "../types/fp.js"; +import { WebhookAuthenticationError } from "../types/webhooks.js"; import { AfterErrorContext, AfterErrorHook, @@ -16,7 +18,10 @@ import { Hooks, SDKInitHook, SDKInitOptions, + WebhookVerificationContext, + WebhookVerificationHook, } from "./types.js"; +import { WebhookSecurityHook } from "./webhook-security.js"; import { initHooks } from "./registration.js"; @@ -26,9 +31,12 @@ export class SDKHooks implements Hooks { beforeRequestHooks: BeforeRequestHook[] = []; afterSuccessHooks: AfterSuccessHook[] = []; afterErrorHooks: AfterErrorHook[] = []; + webhookVerificationHooks: WebhookVerificationHook[] = []; constructor() { - const presetHooks: Array = []; + const presetHooks: Array = [ + new WebhookSecurityHook(), + ]; for (const hook of presetHooks) { if ("sdkInit" in hook) { @@ -46,6 +54,9 @@ export class SDKHooks implements Hooks { if ("afterError" in hook) { this.registerAfterErrorHook(hook); } + if ("verifyWebhook" in hook) { + this.registerWebhookVerificationHook(hook); + } } initHooks(this); } @@ -129,4 +140,24 @@ export class SDKHooks implements Hooks { return { response: res, error: err }; } + + registerWebhookVerificationHook(hook: WebhookVerificationHook) { + this.webhookVerificationHooks.push(hook); + } + + async verifyWebhook( + hookCtx: WebhookVerificationContext, + { request, secret }: { request: Request; secret: string }, + ): Promise> { + let result: Result = ERR( + new WebhookAuthenticationError("No hooks registered to verify webhooks"), + ); + for (const hook of this.webhookVerificationHooks) { + result = await hook.verifyWebhook(hookCtx, { request, secret }); + if (!result.ok) { + return result; + } + } + return result; + } } diff --git a/chainkit/src/hooks/types.ts b/chainkit/src/hooks/types.ts index ba88232e..65bb9527 100644 --- a/chainkit/src/hooks/types.ts +++ b/chainkit/src/hooks/types.ts @@ -6,7 +6,11 @@ import { SDKOptions } from "../lib/config.js"; import { HTTPClient, RequestInput } from "../lib/http.js"; import { RetryConfig } from "../lib/retries.js"; import { SecurityState } from "../lib/security.js"; -import { WebhookRecipient } from "../types/webhooks.js"; +import { Result } from "../types/fp.js"; +import { + WebhookAuthenticationError, + WebhookRecipient, +} from "../types/webhooks.js"; export type HookContext = { baseURL: string | URL; @@ -30,6 +34,7 @@ export type BeforeCreateRequestContext = HookContext & {}; export type BeforeRequestContext = HookContext & {}; export type AfterSuccessContext = HookContext & {}; export type AfterErrorContext = HookContext & {}; +export type WebhookVerificationContext = {}; /** * SDKInitHook is called when the SDK is initializing. The @@ -92,6 +97,12 @@ export interface AfterErrorHook { error: unknown; }>; } +export interface WebhookVerificationHook { + verifyWebhook: ( + hookCtx: WebhookVerificationContext, + { request, secret }: { request: Request; secret: string }, + ) => Awaitable>; +} export interface Hooks { /** Registers a hook to be used by the SDK for initialization event. */ @@ -104,6 +115,8 @@ export interface Hooks { registerAfterSuccessHook(hook: AfterSuccessHook): void; /** Registers a hook to be used by the SDK for the after error event. */ registerAfterErrorHook(hook: AfterErrorHook): void; + /** Registers a hook to be used by the SDK for the webhook verification event. */ + registerWebhookVerificationHook(hook: WebhookVerificationHook): void; } export type Hook = @@ -111,4 +124,5 @@ export type Hook = | BeforeCreateRequestHook | BeforeRequestHook | AfterSuccessHook - | AfterErrorHook; + | AfterErrorHook + | WebhookVerificationHook; diff --git a/chainkit/src/hooks/webhook-security.ts b/chainkit/src/hooks/webhook-security.ts new file mode 100644 index 00000000..428bf77e --- /dev/null +++ b/chainkit/src/hooks/webhook-security.ts @@ -0,0 +1,170 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { + BeforeRequestContext, + BeforeRequestHook, + WebhookVerificationContext, + WebhookVerificationHook, +} from "./types.js"; + +import { bytesToBase64 } from "../lib/base64.js"; +import { ERR, OK, Result } from "../types/fp.js"; +import { WebhookAuthenticationError } from "../types/webhooks.js"; + +export class WebhookSecurityHook + implements BeforeRequestHook, WebhookVerificationHook +{ + private auth = new WebhookSecurity(); + + async beforeRequest( + hookCtx: BeforeRequestContext, + request: Request, + ): Promise { + if (!hookCtx.webhookRecipient) return request; + return this.auth.sign({ secret: hookCtx.webhookRecipient.secret, request }); + } + + async verifyWebhook( + _hookCtx: WebhookVerificationContext, + { request, secret }: { request: Request; secret: string }, + ): Promise> { + try { + await this.auth.verify({ request, secret }); + return OK(true); + } catch (e) { + if (e instanceof WebhookAuthenticationError) return ERR(e); + throw e; + } + } +} + +const headerName = "x-signature"; + +export class WebhookSecurity { + /** + * Signs a webhook request by generating a signature using the provided secret + * @returns A new Request object with the signature header added. + */ + async sign({ + secret, + request, + }: { + secret: string; + request: Request; + }): Promise { + // Validation: Ensure the request has a body and a secret is provided + this._assert(request.body, "Unable to sign webhook with missing body"); + this._assert(secret, "Unable to sign webhook, missing secret"); + + // Clone the original request to avoid mutating it + const newRequest = request.clone(); + + // Read the body content from the request + const bodyBytes = await request.arrayBuffer(); + this._assert(bodyBytes, "Unable to sign webhook with missing body"); + + // Safely access the SubtleCrypto interface for cryptographic operations + const crypto = globalThis?.crypto?.subtle; + this._assert( + crypto, + "SubtleCrypto not found, if you're using node 18, please upgrade to a more recent version of node", + ); + + // Encode the secret into bytes, assume UTF-8 encoding + const encoder = new TextEncoder(); + const secretBytes = encoder.encode(secret); + + // Import the secret as a CryptoKey for HMAC signing + const cryptoKey = await crypto.importKey( + "raw", + secretBytes, + { name: "HMAC", hash: "SHA-256" }, + false, + ["sign"], + ); + + // Generate the HMAC signature for the request body + const signatureBytes = await crypto.sign("HMAC", cryptoKey, bodyBytes); + const encodedSignature = bytesToBase64(new Uint8Array(signatureBytes)); + + // Add the signature to the request headers + newRequest.headers.set(headerName, encodedSignature); + + return newRequest; + } + + /** + * Verifies the authenticity of a webhook request by comparing signatures using constant-time comparison + */ + async verify({ + request, + secret, + }: { + request: Request; + secret: string; + }): Promise { + this._assert(secret, "Unable to verify webhook missing secret"); + + // Clone the request to avoid reading the body multiple times + request = request.clone(); + + // Retrieve the incoming signature from the request headers + const incomingSignature = request.headers.get(headerName); + this._assert( + incomingSignature, + "Unable to verify webhook missing signature", + ); + + // Read the body content from the request + const bodyBytes = await request.arrayBuffer(); + this._assert(bodyBytes, "Unable to verify webhook with missing body"); + + // Safely access the SubtleCrypto interface for cryptographic operations + const crypto = globalThis?.crypto?.subtle; + this._assert( + crypto, + "SubtleCrypto not found, if you're using node 18, please upgrade to a more recent version of node", + ); + + // Encode the secret into bytes, assume UTF-8 encoding + const encoder = new TextEncoder(); + const secretBytes = encoder.encode(secret); + + // Import the secret as a CryptoKey for HMAC verification + const cryptoKey = await crypto.importKey( + "raw", + secretBytes, + { name: "HMAC", hash: "SHA-256" }, + false, + ["verify"], + ); + + // Decode the incoming signature from the header encoding + let incomingSignatureBytes: Uint8Array; + try { + incomingSignatureBytes = Uint8Array.from( + atob(incomingSignature), + c => c.charCodeAt(0), + ); + } catch (e) { + this._assert(false, `Invalid signature format: ${e}`); + } + + // Use SubtleCrypto.verify for constant-time comparison (protects against timing attacks) + const isValid = await crypto.verify( + "HMAC", + cryptoKey, + incomingSignatureBytes, + bodyBytes, + ); + + this._assert(isValid, "Invalid signature"); + return true; + } + + private _assert(condition: any, message: string): asserts condition { + if (!condition) throw new WebhookAuthenticationError(message); + } +} diff --git a/chainkit/src/lib/config.ts b/chainkit/src/lib/config.ts index cbfee00f..4c9c4e1d 100644 --- a/chainkit/src/lib/config.ts +++ b/chainkit/src/lib/config.ts @@ -82,8 +82,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "1.0.0", - sdkVersion: "0.3.0-alpha.11", - genVersion: "2.755.9", + sdkVersion: "0.3.0-alpha.12", + genVersion: "2.768.0", userAgent: - "speakeasy-sdk/typescript 0.3.0-alpha.11 2.755.9 1.0.0 @avalanche-sdk/chainkit", + "speakeasy-sdk/typescript 0.3.0-alpha.12 2.768.0 1.0.0 @avalanche-sdk/chainkit", } as const; diff --git a/chainkit/src/lib/encodings.ts b/chainkit/src/lib/encodings.ts index 25c9dcba..31cd3733 100644 --- a/chainkit/src/lib/encodings.ts +++ b/chainkit/src/lib/encodings.ts @@ -102,8 +102,9 @@ export function encodeLabel( }); encValue = mapped?.join("").slice(1); } else { - const k = - options?.explode && isPlainObject(value) ? `${encodeString(pk)}=` : ""; + const k = options?.explode && isPlainObject(value) + ? `${encodeString(pk)}=` + : ""; encValue = `${k}${encodeValue(pv)}`; } @@ -426,6 +427,7 @@ export function queryJoin(...args: (string | undefined)[]): string { type QueryEncoderOptions = { explode?: boolean; charEncoding?: "percent" | "none"; + allowEmptyValue?: string[]; }; type QueryEncoder = ( @@ -440,7 +442,7 @@ type BulkQueryEncoder = ( ) => string; export function queryEncoder(f: QueryEncoder): BulkQueryEncoder { - const bulkEncode = function ( + const bulkEncode = function( values: Record, options?: QueryEncoderOptions, ): string { @@ -450,7 +452,19 @@ export function queryEncoder(f: QueryEncoder): BulkQueryEncoder { charEncoding: options?.charEncoding ?? "percent", }; + const allowEmptySet = new Set(options?.allowEmptyValue ?? []); + const encoded = Object.entries(values).map(([key, value]) => { + if (allowEmptySet.has(key)) { + if ( + value === undefined + || value === null + || value === "" + || (Array.isArray(value) && value.length === 0) + ) { + return `${encodeURIComponent(key)}=`; + } + } return f(key, value, opts); }); return queryJoin(...encoded); diff --git a/chainkit/src/lib/sdks.ts b/chainkit/src/lib/sdks.ts index bdb1f37c..fce231d1 100644 --- a/chainkit/src/lib/sdks.ts +++ b/chainkit/src/lib/sdks.ts @@ -12,6 +12,7 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { ERR, OK, Result } from "../types/fp.js"; +import { WebhookAuthenticationError } from "../types/webhooks.js"; import { stringToBase64 } from "./base64.js"; import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "./config.js"; import { encodeForm } from "./encodings.js"; @@ -302,6 +303,12 @@ export class ClientSDK { }, ); } + + async _verifyWebhook( + { request, secret }: { request: Request; secret: string }, + ): Promise> { + return this.#hooks.verifyWebhook({}, { request, secret }); + } } const jsonLikeContentTypeRE = /(application|text)\/.*?\+*json.*/; diff --git a/chainkit/src/mcp-server/mcp-server.ts b/chainkit/src/mcp-server/mcp-server.ts index a9d221e3..03c96cba 100644 --- a/chainkit/src/mcp-server/mcp-server.ts +++ b/chainkit/src/mcp-server/mcp-server.ts @@ -19,7 +19,7 @@ const routes = buildRouteMap({ export const app = buildApplication(routes, { name: "mcp", versionInfo: { - currentVersion: "0.3.0-alpha.11", + currentVersion: "0.3.0-alpha.12", }, }); diff --git a/chainkit/src/mcp-server/server.ts b/chainkit/src/mcp-server/server.ts index fde37bbe..28597dd8 100644 --- a/chainkit/src/mcp-server/server.ts +++ b/chainkit/src/mcp-server/server.ts @@ -129,7 +129,7 @@ export function createMCPServer(deps: { }) { const server = new McpServer({ name: "Avalanche", - version: "0.3.0-alpha.11", + version: "0.3.0-alpha.12", }); const client = new AvalancheCore({ diff --git a/chainkit/src/mcp-server/tools/dataEvmAddressChainsList.ts b/chainkit/src/mcp-server/tools/dataEvmAddressChainsList.ts index 467875f3..c29c3b2e 100644 --- a/chainkit/src/mcp-server/tools/dataEvmAddressChainsList.ts +++ b/chainkit/src/mcp-server/tools/dataEvmAddressChainsList.ts @@ -14,7 +14,7 @@ export const tool$dataEvmAddressChainsList: ToolDefinition = { name: "data-evm-address-chains-list", description: `List all chains associated with a given address -Lists the chains where the specified address has participated in transactions or ERC token transfers, either as a sender or receiver. The data is refreshed every 15 minutes.`, +Lists the chains where the specified address has participated in transactions or ERC token transfers, either as a sender or receiver. The data is refreshed every 15 minutes.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await dataEvmAddressChainsList( diff --git a/chainkit/src/mcp-server/tools/dataEvmBlocksListLatestAllChains.ts b/chainkit/src/mcp-server/tools/dataEvmBlocksListLatestAllChains.ts index ace59af3..634ae094 100644 --- a/chainkit/src/mcp-server/tools/dataEvmBlocksListLatestAllChains.ts +++ b/chainkit/src/mcp-server/tools/dataEvmBlocksListLatestAllChains.ts @@ -16,7 +16,7 @@ export const tool$dataEvmBlocksListLatestAllChains: ToolDefinition< name: "data-evm-blocks-list-latest-all-chains", description: `List latest blocks across all supported EVM chains -Lists the most recent blocks from all supported EVM-compatible chains. The results can be filtered by network.`, +Lists the most recent blocks from all supported EVM-compatible chains. The results can be filtered by network.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await dataEvmBlocksListLatestAllChains( diff --git a/chainkit/src/mcp-server/tools/dataEvmTransactionsListLatestAllChains.ts b/chainkit/src/mcp-server/tools/dataEvmTransactionsListLatestAllChains.ts index c270f44c..0302c177 100644 --- a/chainkit/src/mcp-server/tools/dataEvmTransactionsListLatestAllChains.ts +++ b/chainkit/src/mcp-server/tools/dataEvmTransactionsListLatestAllChains.ts @@ -16,7 +16,7 @@ export const tool$dataEvmTransactionsListLatestAllChains: ToolDefinition< name: "data-evm-transactions-list-latest-all-chains", description: `List the latest transactions across all supported EVM chains -Lists the most recent transactions from all supported EVM-compatible chains. The results can be filtered based on transaction status.`, +Lists the most recent transactions from all supported EVM-compatible chains. The results can be filtered based on transaction status.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await dataEvmTransactionsListLatestAllChains( diff --git a/chainkit/src/models/components/activedelegatordetails.ts b/chainkit/src/models/components/activedelegatordetails.ts index 3356ca50..4c83a3dc 100644 --- a/chainkit/src/models/components/activedelegatordetails.ts +++ b/chainkit/src/models/components/activedelegatordetails.ts @@ -4,17 +4,9 @@ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -export const ActiveDelegatorDetailsDelegationStatus = { - Active: "active", -} as const; -export type ActiveDelegatorDetailsDelegationStatus = ClosedEnum< - typeof ActiveDelegatorDetailsDelegationStatus ->; - export type ActiveDelegatorDetails = { txHash: string; nodeId: string; @@ -25,19 +17,9 @@ export type ActiveDelegatorDetails = { endTimestamp: number; estimatedGrossReward: string; estimatedNetReward: string; - delegationStatus: ActiveDelegatorDetailsDelegationStatus; + delegationStatus: "active"; }; -/** @internal */ -export const ActiveDelegatorDetailsDelegationStatus$inboundSchema: - z.ZodNativeEnum = z.nativeEnum( - ActiveDelegatorDetailsDelegationStatus, - ); -/** @internal */ -export const ActiveDelegatorDetailsDelegationStatus$outboundSchema: - z.ZodNativeEnum = - ActiveDelegatorDetailsDelegationStatus$inboundSchema; - /** @internal */ export const ActiveDelegatorDetails$inboundSchema: z.ZodType< ActiveDelegatorDetails, @@ -53,7 +35,7 @@ export const ActiveDelegatorDetails$inboundSchema: z.ZodType< endTimestamp: z.number(), estimatedGrossReward: z.string(), estimatedNetReward: z.string(), - delegationStatus: ActiveDelegatorDetailsDelegationStatus$inboundSchema, + delegationStatus: z.literal("active"), }); /** @internal */ export type ActiveDelegatorDetails$Outbound = { @@ -66,7 +48,7 @@ export type ActiveDelegatorDetails$Outbound = { endTimestamp: number; estimatedGrossReward: string; estimatedNetReward: string; - delegationStatus: string; + delegationStatus: "active"; }; /** @internal */ @@ -84,7 +66,7 @@ export const ActiveDelegatorDetails$outboundSchema: z.ZodType< endTimestamp: z.number(), estimatedGrossReward: z.string(), estimatedNetReward: z.string(), - delegationStatus: ActiveDelegatorDetailsDelegationStatus$outboundSchema, + delegationStatus: z.literal("active"), }); export function activeDelegatorDetailsToJSON( diff --git a/chainkit/src/models/components/activevalidatordetails.ts b/chainkit/src/models/components/activevalidatordetails.ts index 7a925142..46e4d1e0 100644 --- a/chainkit/src/models/components/activevalidatordetails.ts +++ b/chainkit/src/models/components/activevalidatordetails.ts @@ -4,7 +4,6 @@ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { @@ -26,13 +25,6 @@ import { ValidatorHealthDetails$outboundSchema, } from "./validatorhealthdetails.js"; -export const ActiveValidatorDetailsValidationStatus = { - Active: "active", -} as const; -export type ActiveValidatorDetailsValidationStatus = ClosedEnum< - typeof ActiveValidatorDetailsValidationStatus ->; - /** * The geographical location of the validator node, if available. */ @@ -99,7 +91,7 @@ export type ActiveValidatorDetails = { * Estimated rewards for the validator if the validation is successful. */ potentialRewards: Rewards; - validationStatus: ActiveValidatorDetailsValidationStatus; + validationStatus: "active"; validatorHealth: ValidatorHealthDetails; /** * The geographical location of the validator node, if available. @@ -107,16 +99,6 @@ export type ActiveValidatorDetails = { geolocation: Geolocation | null; }; -/** @internal */ -export const ActiveValidatorDetailsValidationStatus$inboundSchema: - z.ZodNativeEnum = z.nativeEnum( - ActiveValidatorDetailsValidationStatus, - ); -/** @internal */ -export const ActiveValidatorDetailsValidationStatus$outboundSchema: - z.ZodNativeEnum = - ActiveValidatorDetailsValidationStatus$inboundSchema; - /** @internal */ export const Geolocation$inboundSchema: z.ZodType< Geolocation, @@ -185,7 +167,7 @@ export const ActiveValidatorDetails$inboundSchema: z.ZodType< avalancheGoVersion: z.string().optional(), delegationCapacity: z.string().optional(), potentialRewards: Rewards$inboundSchema, - validationStatus: ActiveValidatorDetailsValidationStatus$inboundSchema, + validationStatus: z.literal("active"), validatorHealth: ValidatorHealthDetails$inboundSchema, geolocation: z.nullable(z.lazy(() => Geolocation$inboundSchema)), }); @@ -206,7 +188,7 @@ export type ActiveValidatorDetails$Outbound = { avalancheGoVersion?: string | undefined; delegationCapacity?: string | undefined; potentialRewards: Rewards$Outbound; - validationStatus: string; + validationStatus: "active"; validatorHealth: ValidatorHealthDetails$Outbound; geolocation: Geolocation$Outbound | null; }; @@ -232,7 +214,7 @@ export const ActiveValidatorDetails$outboundSchema: z.ZodType< avalancheGoVersion: z.string().optional(), delegationCapacity: z.string().optional(), potentialRewards: Rewards$outboundSchema, - validationStatus: ActiveValidatorDetailsValidationStatus$outboundSchema, + validationStatus: z.literal("active"), validatorHealth: ValidatorHealthDetails$outboundSchema, geolocation: z.nullable(z.lazy(() => Geolocation$outboundSchema)), }); diff --git a/chainkit/src/models/components/completeddelegatordetails.ts b/chainkit/src/models/components/completeddelegatordetails.ts index 5bb97aba..faa16990 100644 --- a/chainkit/src/models/components/completeddelegatordetails.ts +++ b/chainkit/src/models/components/completeddelegatordetails.ts @@ -4,17 +4,9 @@ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -export const CompletedDelegatorDetailsDelegationStatus = { - Completed: "completed", -} as const; -export type CompletedDelegatorDetailsDelegationStatus = ClosedEnum< - typeof CompletedDelegatorDetailsDelegationStatus ->; - export type CompletedDelegatorDetails = { txHash: string; nodeId: string; @@ -31,18 +23,9 @@ export type CompletedDelegatorDetails = { * Net rewards distributed to the delegator after deducting delegation fee from the gross reward for the successful delegation. */ netReward: string; - delegationStatus: CompletedDelegatorDetailsDelegationStatus; + delegationStatus: "completed"; }; -/** @internal */ -export const CompletedDelegatorDetailsDelegationStatus$inboundSchema: - z.ZodNativeEnum = z - .nativeEnum(CompletedDelegatorDetailsDelegationStatus); -/** @internal */ -export const CompletedDelegatorDetailsDelegationStatus$outboundSchema: - z.ZodNativeEnum = - CompletedDelegatorDetailsDelegationStatus$inboundSchema; - /** @internal */ export const CompletedDelegatorDetails$inboundSchema: z.ZodType< CompletedDelegatorDetails, @@ -58,7 +41,7 @@ export const CompletedDelegatorDetails$inboundSchema: z.ZodType< endTimestamp: z.number(), grossReward: z.string(), netReward: z.string(), - delegationStatus: CompletedDelegatorDetailsDelegationStatus$inboundSchema, + delegationStatus: z.literal("completed"), }); /** @internal */ export type CompletedDelegatorDetails$Outbound = { @@ -71,7 +54,7 @@ export type CompletedDelegatorDetails$Outbound = { endTimestamp: number; grossReward: string; netReward: string; - delegationStatus: string; + delegationStatus: "completed"; }; /** @internal */ @@ -89,7 +72,7 @@ export const CompletedDelegatorDetails$outboundSchema: z.ZodType< endTimestamp: z.number(), grossReward: z.string(), netReward: z.string(), - delegationStatus: CompletedDelegatorDetailsDelegationStatus$outboundSchema, + delegationStatus: z.literal("completed"), }); export function completedDelegatorDetailsToJSON( diff --git a/chainkit/src/models/components/completedvalidatordetails.ts b/chainkit/src/models/components/completedvalidatordetails.ts index 511eb172..e076f051 100644 --- a/chainkit/src/models/components/completedvalidatordetails.ts +++ b/chainkit/src/models/components/completedvalidatordetails.ts @@ -4,7 +4,6 @@ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { @@ -20,13 +19,6 @@ import { Rewards$outboundSchema, } from "./rewards.js"; -export const CompletedValidatorDetailsValidationStatus = { - Completed: "completed", -} as const; -export type CompletedValidatorDetailsValidationStatus = ClosedEnum< - typeof CompletedValidatorDetailsValidationStatus ->; - export type CompletedValidatorDetails = { txHash: string; nodeId: string; @@ -45,18 +37,9 @@ export type CompletedValidatorDetails = { delegatorCount: number; amountDelegated?: string | undefined; rewards: Rewards; - validationStatus: CompletedValidatorDetailsValidationStatus; + validationStatus: "completed"; }; -/** @internal */ -export const CompletedValidatorDetailsValidationStatus$inboundSchema: - z.ZodNativeEnum = z - .nativeEnum(CompletedValidatorDetailsValidationStatus); -/** @internal */ -export const CompletedValidatorDetailsValidationStatus$outboundSchema: - z.ZodNativeEnum = - CompletedValidatorDetailsValidationStatus$inboundSchema; - /** @internal */ export const CompletedValidatorDetails$inboundSchema: z.ZodType< CompletedValidatorDetails, @@ -74,7 +57,7 @@ export const CompletedValidatorDetails$inboundSchema: z.ZodType< delegatorCount: z.number(), amountDelegated: z.string().optional(), rewards: Rewards$inboundSchema, - validationStatus: CompletedValidatorDetailsValidationStatus$inboundSchema, + validationStatus: z.literal("completed"), }); /** @internal */ export type CompletedValidatorDetails$Outbound = { @@ -89,7 +72,7 @@ export type CompletedValidatorDetails$Outbound = { delegatorCount: number; amountDelegated?: string | undefined; rewards: Rewards$Outbound; - validationStatus: string; + validationStatus: "completed"; }; /** @internal */ @@ -109,7 +92,7 @@ export const CompletedValidatorDetails$outboundSchema: z.ZodType< delegatorCount: z.number(), amountDelegated: z.string().optional(), rewards: Rewards$outboundSchema, - validationStatus: CompletedValidatorDetailsValidationStatus$outboundSchema, + validationStatus: z.literal("completed"), }); export function completedValidatorDetailsToJSON( diff --git a/chainkit/src/models/components/createevmtransactionexportrequest.ts b/chainkit/src/models/components/createevmtransactionexportrequest.ts index bdacaad2..8530107f 100644 --- a/chainkit/src/models/components/createevmtransactionexportrequest.ts +++ b/chainkit/src/models/components/createevmtransactionexportrequest.ts @@ -12,14 +12,9 @@ import { EvmNetworkOptions$Outbound, EvmNetworkOptions$outboundSchema, } from "./evmnetworkoptions.js"; -import { - EVMOperationType, - EVMOperationType$inboundSchema, - EVMOperationType$outboundSchema, -} from "./evmoperationtype.js"; export type CreateEvmTransactionExportRequest = { - type: EVMOperationType; + type: "TRANSACTION_EXPORT_EVM"; firstDate?: string | undefined; lastDate?: string | undefined; /** @@ -39,7 +34,7 @@ export const CreateEvmTransactionExportRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - type: EVMOperationType$inboundSchema, + type: z.literal("TRANSACTION_EXPORT_EVM"), firstDate: z.string().optional(), lastDate: z.string().optional(), startDate: z.string().optional(), @@ -48,7 +43,7 @@ export const CreateEvmTransactionExportRequest$inboundSchema: z.ZodType< }); /** @internal */ export type CreateEvmTransactionExportRequest$Outbound = { - type: string; + type: "TRANSACTION_EXPORT_EVM"; firstDate?: string | undefined; lastDate?: string | undefined; startDate?: string | undefined; @@ -62,7 +57,7 @@ export const CreateEvmTransactionExportRequest$outboundSchema: z.ZodType< z.ZodTypeDef, CreateEvmTransactionExportRequest > = z.object({ - type: EVMOperationType$outboundSchema, + type: z.literal("TRANSACTION_EXPORT_EVM"), firstDate: z.string().optional(), lastDate: z.string().optional(), startDate: z.string().optional(), diff --git a/chainkit/src/models/components/deliveredicmmessage.ts b/chainkit/src/models/components/deliveredicmmessage.ts index 0ad4cff6..b45249d1 100644 --- a/chainkit/src/models/components/deliveredicmmessage.ts +++ b/chainkit/src/models/components/deliveredicmmessage.ts @@ -4,7 +4,6 @@ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { @@ -32,13 +31,6 @@ import { IcmSourceTransaction$outboundSchema, } from "./icmsourcetransaction.js"; -export const DeliveredIcmMessageStatus = { - Delivered: "delivered", -} as const; -export type DeliveredIcmMessageStatus = ClosedEnum< - typeof DeliveredIcmMessageStatus ->; - export type DeliveredIcmMessage = { messageId: string; icmContractAddress: string; @@ -56,18 +48,9 @@ export type DeliveredIcmMessage = { rewardDetails: IcmRewardDetails; sourceTransaction: IcmSourceTransaction; destinationTransaction: IcmDestinationTransaction; - status: DeliveredIcmMessageStatus; + status: "delivered"; }; -/** @internal */ -export const DeliveredIcmMessageStatus$inboundSchema: z.ZodNativeEnum< - typeof DeliveredIcmMessageStatus -> = z.nativeEnum(DeliveredIcmMessageStatus); -/** @internal */ -export const DeliveredIcmMessageStatus$outboundSchema: z.ZodNativeEnum< - typeof DeliveredIcmMessageStatus -> = DeliveredIcmMessageStatus$inboundSchema; - /** @internal */ export const DeliveredIcmMessage$inboundSchema: z.ZodType< DeliveredIcmMessage, @@ -90,7 +73,7 @@ export const DeliveredIcmMessage$inboundSchema: z.ZodType< rewardDetails: IcmRewardDetails$inboundSchema, sourceTransaction: IcmSourceTransaction$inboundSchema, destinationTransaction: IcmDestinationTransaction$inboundSchema, - status: DeliveredIcmMessageStatus$inboundSchema, + status: z.literal("delivered"), }); /** @internal */ export type DeliveredIcmMessage$Outbound = { @@ -110,7 +93,7 @@ export type DeliveredIcmMessage$Outbound = { rewardDetails: IcmRewardDetails$Outbound; sourceTransaction: IcmSourceTransaction$Outbound; destinationTransaction: IcmDestinationTransaction$Outbound; - status: string; + status: "delivered"; }; /** @internal */ @@ -135,7 +118,7 @@ export const DeliveredIcmMessage$outboundSchema: z.ZodType< rewardDetails: IcmRewardDetails$outboundSchema, sourceTransaction: IcmSourceTransaction$outboundSchema, destinationTransaction: IcmDestinationTransaction$outboundSchema, - status: DeliveredIcmMessageStatus$outboundSchema, + status: z.literal("delivered"), }); export function deliveredIcmMessageToJSON( diff --git a/chainkit/src/models/components/deliveredsourcenotindexedicmmessage.ts b/chainkit/src/models/components/deliveredsourcenotindexedicmmessage.ts index 629ec205..7f17e71c 100644 --- a/chainkit/src/models/components/deliveredsourcenotindexedicmmessage.ts +++ b/chainkit/src/models/components/deliveredsourcenotindexedicmmessage.ts @@ -4,7 +4,6 @@ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { @@ -26,13 +25,6 @@ import { IcmRewardDetails$outboundSchema, } from "./icmrewarddetails.js"; -export const DeliveredSourceNotIndexedIcmMessageStatus = { - DeliveredSourceNotIndexed: "delivered_source_not_indexed", -} as const; -export type DeliveredSourceNotIndexedIcmMessageStatus = ClosedEnum< - typeof DeliveredSourceNotIndexedIcmMessageStatus ->; - export type DeliveredSourceNotIndexedIcmMessage = { messageId: string; icmContractAddress: string; @@ -49,18 +41,9 @@ export type DeliveredSourceNotIndexedIcmMessage = { receiptDelivered: boolean; rewardDetails: IcmRewardDetails; destinationTransaction: IcmDestinationTransaction; - status: DeliveredSourceNotIndexedIcmMessageStatus; + status: "delivered_source_not_indexed"; }; -/** @internal */ -export const DeliveredSourceNotIndexedIcmMessageStatus$inboundSchema: - z.ZodNativeEnum = z - .nativeEnum(DeliveredSourceNotIndexedIcmMessageStatus); -/** @internal */ -export const DeliveredSourceNotIndexedIcmMessageStatus$outboundSchema: - z.ZodNativeEnum = - DeliveredSourceNotIndexedIcmMessageStatus$inboundSchema; - /** @internal */ export const DeliveredSourceNotIndexedIcmMessage$inboundSchema: z.ZodType< DeliveredSourceNotIndexedIcmMessage, @@ -82,7 +65,7 @@ export const DeliveredSourceNotIndexedIcmMessage$inboundSchema: z.ZodType< receiptDelivered: z.boolean(), rewardDetails: IcmRewardDetails$inboundSchema, destinationTransaction: IcmDestinationTransaction$inboundSchema, - status: DeliveredSourceNotIndexedIcmMessageStatus$inboundSchema, + status: z.literal("delivered_source_not_indexed"), }); /** @internal */ export type DeliveredSourceNotIndexedIcmMessage$Outbound = { @@ -101,7 +84,7 @@ export type DeliveredSourceNotIndexedIcmMessage$Outbound = { receiptDelivered: boolean; rewardDetails: IcmRewardDetails$Outbound; destinationTransaction: IcmDestinationTransaction$Outbound; - status: string; + status: "delivered_source_not_indexed"; }; /** @internal */ @@ -125,7 +108,7 @@ export const DeliveredSourceNotIndexedIcmMessage$outboundSchema: z.ZodType< receiptDelivered: z.boolean(), rewardDetails: IcmRewardDetails$outboundSchema, destinationTransaction: IcmDestinationTransaction$outboundSchema, - status: DeliveredSourceNotIndexedIcmMessageStatus$outboundSchema, + status: z.literal("delivered_source_not_indexed"), }); export function deliveredSourceNotIndexedIcmMessageToJSON( diff --git a/chainkit/src/models/components/deliveredsourcenotindexedteleportermessage.ts b/chainkit/src/models/components/deliveredsourcenotindexedteleportermessage.ts index 2a1fd6be..90cad023 100644 --- a/chainkit/src/models/components/deliveredsourcenotindexedteleportermessage.ts +++ b/chainkit/src/models/components/deliveredsourcenotindexedteleportermessage.ts @@ -4,7 +4,6 @@ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { @@ -26,13 +25,6 @@ import { TeleporterRewardDetails$outboundSchema, } from "./teleporterrewarddetails.js"; -export const DeliveredSourceNotIndexedTeleporterMessageStatus = { - DeliveredSourceNotIndexed: "delivered_source_not_indexed", -} as const; -export type DeliveredSourceNotIndexedTeleporterMessageStatus = ClosedEnum< - typeof DeliveredSourceNotIndexedTeleporterMessageStatus ->; - export type DeliveredSourceNotIndexedTeleporterMessage = { messageId: string; teleporterContractAddress: string; @@ -49,18 +41,9 @@ export type DeliveredSourceNotIndexedTeleporterMessage = { receiptDelivered: boolean; rewardDetails: TeleporterRewardDetails; destinationTransaction: TeleporterDestinationTransaction; - status: DeliveredSourceNotIndexedTeleporterMessageStatus; + status: "delivered_source_not_indexed"; }; -/** @internal */ -export const DeliveredSourceNotIndexedTeleporterMessageStatus$inboundSchema: - z.ZodNativeEnum = z - .nativeEnum(DeliveredSourceNotIndexedTeleporterMessageStatus); -/** @internal */ -export const DeliveredSourceNotIndexedTeleporterMessageStatus$outboundSchema: - z.ZodNativeEnum = - DeliveredSourceNotIndexedTeleporterMessageStatus$inboundSchema; - /** @internal */ export const DeliveredSourceNotIndexedTeleporterMessage$inboundSchema: z.ZodType = @@ -80,7 +63,7 @@ export const DeliveredSourceNotIndexedTeleporterMessage$inboundSchema: receiptDelivered: z.boolean(), rewardDetails: TeleporterRewardDetails$inboundSchema, destinationTransaction: TeleporterDestinationTransaction$inboundSchema, - status: DeliveredSourceNotIndexedTeleporterMessageStatus$inboundSchema, + status: z.literal("delivered_source_not_indexed"), }); /** @internal */ export type DeliveredSourceNotIndexedTeleporterMessage$Outbound = { @@ -99,7 +82,7 @@ export type DeliveredSourceNotIndexedTeleporterMessage$Outbound = { receiptDelivered: boolean; rewardDetails: TeleporterRewardDetails$Outbound; destinationTransaction: TeleporterDestinationTransaction$Outbound; - status: string; + status: "delivered_source_not_indexed"; }; /** @internal */ @@ -124,7 +107,7 @@ export const DeliveredSourceNotIndexedTeleporterMessage$outboundSchema: receiptDelivered: z.boolean(), rewardDetails: TeleporterRewardDetails$outboundSchema, destinationTransaction: TeleporterDestinationTransaction$outboundSchema, - status: DeliveredSourceNotIndexedTeleporterMessageStatus$outboundSchema, + status: z.literal("delivered_source_not_indexed"), }); export function deliveredSourceNotIndexedTeleporterMessageToJSON( diff --git a/chainkit/src/models/components/deliveredteleportermessage.ts b/chainkit/src/models/components/deliveredteleportermessage.ts index 10897661..c4f4de47 100644 --- a/chainkit/src/models/components/deliveredteleportermessage.ts +++ b/chainkit/src/models/components/deliveredteleportermessage.ts @@ -4,7 +4,6 @@ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { @@ -32,13 +31,6 @@ import { TeleporterSourceTransaction$outboundSchema, } from "./teleportersourcetransaction.js"; -export const DeliveredTeleporterMessageStatus = { - Delivered: "delivered", -} as const; -export type DeliveredTeleporterMessageStatus = ClosedEnum< - typeof DeliveredTeleporterMessageStatus ->; - export type DeliveredTeleporterMessage = { messageId: string; teleporterContractAddress: string; @@ -56,18 +48,9 @@ export type DeliveredTeleporterMessage = { rewardDetails: TeleporterRewardDetails; sourceTransaction: TeleporterSourceTransaction; destinationTransaction: TeleporterDestinationTransaction; - status: DeliveredTeleporterMessageStatus; + status: "delivered"; }; -/** @internal */ -export const DeliveredTeleporterMessageStatus$inboundSchema: z.ZodNativeEnum< - typeof DeliveredTeleporterMessageStatus -> = z.nativeEnum(DeliveredTeleporterMessageStatus); -/** @internal */ -export const DeliveredTeleporterMessageStatus$outboundSchema: z.ZodNativeEnum< - typeof DeliveredTeleporterMessageStatus -> = DeliveredTeleporterMessageStatus$inboundSchema; - /** @internal */ export const DeliveredTeleporterMessage$inboundSchema: z.ZodType< DeliveredTeleporterMessage, @@ -90,7 +73,7 @@ export const DeliveredTeleporterMessage$inboundSchema: z.ZodType< rewardDetails: TeleporterRewardDetails$inboundSchema, sourceTransaction: TeleporterSourceTransaction$inboundSchema, destinationTransaction: TeleporterDestinationTransaction$inboundSchema, - status: DeliveredTeleporterMessageStatus$inboundSchema, + status: z.literal("delivered"), }); /** @internal */ export type DeliveredTeleporterMessage$Outbound = { @@ -110,7 +93,7 @@ export type DeliveredTeleporterMessage$Outbound = { rewardDetails: TeleporterRewardDetails$Outbound; sourceTransaction: TeleporterSourceTransaction$Outbound; destinationTransaction: TeleporterDestinationTransaction$Outbound; - status: string; + status: "delivered"; }; /** @internal */ @@ -135,7 +118,7 @@ export const DeliveredTeleporterMessage$outboundSchema: z.ZodType< rewardDetails: TeleporterRewardDetails$outboundSchema, sourceTransaction: TeleporterSourceTransaction$outboundSchema, destinationTransaction: TeleporterDestinationTransaction$outboundSchema, - status: DeliveredTeleporterMessageStatus$outboundSchema, + status: z.literal("delivered"), }); export function deliveredTeleporterMessageToJSON( diff --git a/chainkit/src/models/components/erc1155contract.ts b/chainkit/src/models/components/erc1155contract.ts index 06dc6a98..54719b6d 100644 --- a/chainkit/src/models/components/erc1155contract.ts +++ b/chainkit/src/models/components/erc1155contract.ts @@ -4,7 +4,6 @@ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { @@ -32,11 +31,6 @@ import { ResourceLink$outboundSchema, } from "./resourcelink.js"; -export const Erc1155ContractErcType = { - Erc1155: "ERC-1155", -} as const; -export type Erc1155ContractErcType = ClosedEnum; - export type Erc1155Contract = { /** * The contract name. @@ -55,7 +49,7 @@ export type Erc1155Contract = { */ address: string; deploymentDetails?: ContractDeploymentDetails | undefined; - ercType: Erc1155ContractErcType; + ercType: "ERC-1155"; /** * The contract symbol. */ @@ -63,15 +57,6 @@ export type Erc1155Contract = { pricingProviders?: PricingProviders | undefined; }; -/** @internal */ -export const Erc1155ContractErcType$inboundSchema: z.ZodNativeEnum< - typeof Erc1155ContractErcType -> = z.nativeEnum(Erc1155ContractErcType); -/** @internal */ -export const Erc1155ContractErcType$outboundSchema: z.ZodNativeEnum< - typeof Erc1155ContractErcType -> = Erc1155ContractErcType$inboundSchema; - /** @internal */ export const Erc1155Contract$inboundSchema: z.ZodType< Erc1155Contract, @@ -89,7 +74,7 @@ export const Erc1155Contract$inboundSchema: z.ZodType< tags: z.array(z.string()).optional(), address: z.string(), deploymentDetails: ContractDeploymentDetails$inboundSchema.optional(), - ercType: Erc1155ContractErcType$inboundSchema, + ercType: z.literal("ERC-1155"), symbol: z.string().optional(), pricingProviders: PricingProviders$inboundSchema.optional(), }); @@ -106,7 +91,7 @@ export type Erc1155Contract$Outbound = { tags?: Array | undefined; address: string; deploymentDetails?: ContractDeploymentDetails$Outbound | undefined; - ercType: string; + ercType: "ERC-1155"; symbol?: string | undefined; pricingProviders?: PricingProviders$Outbound | undefined; }; @@ -128,7 +113,7 @@ export const Erc1155Contract$outboundSchema: z.ZodType< tags: z.array(z.string()).optional(), address: z.string(), deploymentDetails: ContractDeploymentDetails$outboundSchema.optional(), - ercType: Erc1155ContractErcType$outboundSchema, + ercType: z.literal("ERC-1155"), symbol: z.string().optional(), pricingProviders: PricingProviders$outboundSchema.optional(), }); diff --git a/chainkit/src/models/components/erc1155transfer.ts b/chainkit/src/models/components/erc1155transfer.ts index 8d558513..a270bd3e 100644 --- a/chainkit/src/models/components/erc1155transfer.ts +++ b/chainkit/src/models/components/erc1155transfer.ts @@ -25,9 +25,13 @@ export type Erc1155Transfer = { */ blockNumber: string; /** - * The block finality timestamp. + * The block creation (proposal) timestamp in seconds */ blockTimestamp: number; + /** + * The block creation (proposal) timestamp in milliseconds. Available only after Granite upgrade. + */ + blockTimestampMilliseconds?: number | undefined; /** * The block hash identifier. */ @@ -51,6 +55,7 @@ export const Erc1155Transfer$inboundSchema: z.ZodType< > = z.object({ blockNumber: z.string(), blockTimestamp: z.number(), + blockTimestampMilliseconds: z.number().optional(), blockHash: z.string(), txHash: z.string(), from: RichAddress$inboundSchema, @@ -63,6 +68,7 @@ export const Erc1155Transfer$inboundSchema: z.ZodType< export type Erc1155Transfer$Outbound = { blockNumber: string; blockTimestamp: number; + blockTimestampMilliseconds?: number | undefined; blockHash: string; txHash: string; from: RichAddress$Outbound; @@ -80,6 +86,7 @@ export const Erc1155Transfer$outboundSchema: z.ZodType< > = z.object({ blockNumber: z.string(), blockTimestamp: z.number(), + blockTimestampMilliseconds: z.number().optional(), blockHash: z.string(), txHash: z.string(), from: RichAddress$outboundSchema, diff --git a/chainkit/src/models/components/erc20contract.ts b/chainkit/src/models/components/erc20contract.ts index 2ed35373..7b8a84de 100644 --- a/chainkit/src/models/components/erc20contract.ts +++ b/chainkit/src/models/components/erc20contract.ts @@ -4,7 +4,6 @@ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { @@ -32,11 +31,6 @@ import { ResourceLink$outboundSchema, } from "./resourcelink.js"; -export const Erc20ContractErcType = { - Erc20: "ERC-20", -} as const; -export type Erc20ContractErcType = ClosedEnum; - export type Erc20Contract = { /** * The contract name. @@ -55,7 +49,7 @@ export type Erc20Contract = { */ address: string; deploymentDetails?: ContractDeploymentDetails | undefined; - ercType: Erc20ContractErcType; + ercType: "ERC-20"; /** * The contract symbol. */ @@ -67,15 +61,6 @@ export type Erc20Contract = { pricingProviders?: PricingProviders | undefined; }; -/** @internal */ -export const Erc20ContractErcType$inboundSchema: z.ZodNativeEnum< - typeof Erc20ContractErcType -> = z.nativeEnum(Erc20ContractErcType); -/** @internal */ -export const Erc20ContractErcType$outboundSchema: z.ZodNativeEnum< - typeof Erc20ContractErcType -> = Erc20ContractErcType$inboundSchema; - /** @internal */ export const Erc20Contract$inboundSchema: z.ZodType< Erc20Contract, @@ -93,7 +78,7 @@ export const Erc20Contract$inboundSchema: z.ZodType< tags: z.array(z.string()).optional(), address: z.string(), deploymentDetails: ContractDeploymentDetails$inboundSchema.optional(), - ercType: Erc20ContractErcType$inboundSchema, + ercType: z.literal("ERC-20"), symbol: z.string().optional(), decimals: z.number(), pricingProviders: PricingProviders$inboundSchema.optional(), @@ -111,7 +96,7 @@ export type Erc20Contract$Outbound = { tags?: Array | undefined; address: string; deploymentDetails?: ContractDeploymentDetails$Outbound | undefined; - ercType: string; + ercType: "ERC-20"; symbol?: string | undefined; decimals: number; pricingProviders?: PricingProviders$Outbound | undefined; @@ -134,7 +119,7 @@ export const Erc20Contract$outboundSchema: z.ZodType< tags: z.array(z.string()).optional(), address: z.string(), deploymentDetails: ContractDeploymentDetails$outboundSchema.optional(), - ercType: Erc20ContractErcType$outboundSchema, + ercType: z.literal("ERC-20"), symbol: z.string().optional(), decimals: z.number(), pricingProviders: PricingProviders$outboundSchema.optional(), diff --git a/chainkit/src/models/components/erc20transfer.ts b/chainkit/src/models/components/erc20transfer.ts index 78e7fbe2..80390f8a 100644 --- a/chainkit/src/models/components/erc20transfer.ts +++ b/chainkit/src/models/components/erc20transfer.ts @@ -25,9 +25,13 @@ export type Erc20Transfer = { */ blockNumber: string; /** - * The block finality timestamp. + * The block creation (proposal) timestamp in seconds */ blockTimestamp: number; + /** + * The block creation (proposal) timestamp in milliseconds. Available only after Granite upgrade. + */ + blockTimestampMilliseconds?: number | undefined; /** * The block hash identifier. */ @@ -51,6 +55,7 @@ export const Erc20Transfer$inboundSchema: z.ZodType< > = z.object({ blockNumber: z.string(), blockTimestamp: z.number(), + blockTimestampMilliseconds: z.number().optional(), blockHash: z.string(), txHash: z.string(), from: RichAddress$inboundSchema, @@ -63,6 +68,7 @@ export const Erc20Transfer$inboundSchema: z.ZodType< export type Erc20Transfer$Outbound = { blockNumber: string; blockTimestamp: number; + blockTimestampMilliseconds?: number | undefined; blockHash: string; txHash: string; from: RichAddress$Outbound; @@ -80,6 +86,7 @@ export const Erc20Transfer$outboundSchema: z.ZodType< > = z.object({ blockNumber: z.string(), blockTimestamp: z.number(), + blockTimestampMilliseconds: z.number().optional(), blockHash: z.string(), txHash: z.string(), from: RichAddress$outboundSchema, diff --git a/chainkit/src/models/components/erc721contract.ts b/chainkit/src/models/components/erc721contract.ts index 34d7e407..1cf8e0b0 100644 --- a/chainkit/src/models/components/erc721contract.ts +++ b/chainkit/src/models/components/erc721contract.ts @@ -4,7 +4,6 @@ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { @@ -26,11 +25,6 @@ import { ResourceLink$outboundSchema, } from "./resourcelink.js"; -export const Erc721ContractErcType = { - Erc721: "ERC-721", -} as const; -export type Erc721ContractErcType = ClosedEnum; - export type Erc721Contract = { /** * The contract name. @@ -49,22 +43,13 @@ export type Erc721Contract = { */ address: string; deploymentDetails?: ContractDeploymentDetails | undefined; - ercType: Erc721ContractErcType; + ercType: "ERC-721"; /** * The contract symbol. */ symbol?: string | undefined; }; -/** @internal */ -export const Erc721ContractErcType$inboundSchema: z.ZodNativeEnum< - typeof Erc721ContractErcType -> = z.nativeEnum(Erc721ContractErcType); -/** @internal */ -export const Erc721ContractErcType$outboundSchema: z.ZodNativeEnum< - typeof Erc721ContractErcType -> = Erc721ContractErcType$inboundSchema; - /** @internal */ export const Erc721Contract$inboundSchema: z.ZodType< Erc721Contract, @@ -82,7 +67,7 @@ export const Erc721Contract$inboundSchema: z.ZodType< tags: z.array(z.string()).optional(), address: z.string(), deploymentDetails: ContractDeploymentDetails$inboundSchema.optional(), - ercType: Erc721ContractErcType$inboundSchema, + ercType: z.literal("ERC-721"), symbol: z.string().optional(), }); /** @internal */ @@ -98,7 +83,7 @@ export type Erc721Contract$Outbound = { tags?: Array | undefined; address: string; deploymentDetails?: ContractDeploymentDetails$Outbound | undefined; - ercType: string; + ercType: "ERC-721"; symbol?: string | undefined; }; @@ -119,7 +104,7 @@ export const Erc721Contract$outboundSchema: z.ZodType< tags: z.array(z.string()).optional(), address: z.string(), deploymentDetails: ContractDeploymentDetails$outboundSchema.optional(), - ercType: Erc721ContractErcType$outboundSchema, + ercType: z.literal("ERC-721"), symbol: z.string().optional(), }); diff --git a/chainkit/src/models/components/erc721transfer.ts b/chainkit/src/models/components/erc721transfer.ts index aa4076ad..7d26e3a8 100644 --- a/chainkit/src/models/components/erc721transfer.ts +++ b/chainkit/src/models/components/erc721transfer.ts @@ -25,9 +25,13 @@ export type Erc721Transfer = { */ blockNumber: string; /** - * The block finality timestamp. + * The block creation (proposal) timestamp in seconds */ blockTimestamp: number; + /** + * The block creation (proposal) timestamp in milliseconds. Available only after Granite upgrade. + */ + blockTimestampMilliseconds?: number | undefined; /** * The block hash identifier. */ @@ -50,6 +54,7 @@ export const Erc721Transfer$inboundSchema: z.ZodType< > = z.object({ blockNumber: z.string(), blockTimestamp: z.number(), + blockTimestampMilliseconds: z.number().optional(), blockHash: z.string(), txHash: z.string(), from: RichAddress$inboundSchema, @@ -61,6 +66,7 @@ export const Erc721Transfer$inboundSchema: z.ZodType< export type Erc721Transfer$Outbound = { blockNumber: string; blockTimestamp: number; + blockTimestampMilliseconds?: number | undefined; blockHash: string; txHash: string; from: RichAddress$Outbound; @@ -77,6 +83,7 @@ export const Erc721Transfer$outboundSchema: z.ZodType< > = z.object({ blockNumber: z.string(), blockTimestamp: z.number(), + blockTimestampMilliseconds: z.number().optional(), blockHash: z.string(), txHash: z.string(), from: RichAddress$outboundSchema, diff --git a/chainkit/src/models/components/evmaddressactivityrequest.ts b/chainkit/src/models/components/evmaddressactivityrequest.ts index 19bd8ff4..a81357e9 100644 --- a/chainkit/src/models/components/evmaddressactivityrequest.ts +++ b/chainkit/src/models/components/evmaddressactivityrequest.ts @@ -4,7 +4,6 @@ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { @@ -14,17 +13,10 @@ import { AddressActivityMetadata$outboundSchema, } from "./addressactivitymetadata.js"; -export const EVMAddressActivityRequestEventType = { - AddressActivity: "address_activity", -} as const; -export type EVMAddressActivityRequestEventType = ClosedEnum< - typeof EVMAddressActivityRequestEventType ->; - export type EVMAddressActivityRequestMetadata = AddressActivityMetadata; export type EVMAddressActivityRequest = { - eventType: EVMAddressActivityRequestEventType; + eventType: "address_activity"; url: string; name?: string | undefined; description?: string | undefined; @@ -40,15 +32,6 @@ export type EVMAddressActivityRequest = { includeLogs?: boolean | undefined; }; -/** @internal */ -export const EVMAddressActivityRequestEventType$inboundSchema: z.ZodNativeEnum< - typeof EVMAddressActivityRequestEventType -> = z.nativeEnum(EVMAddressActivityRequestEventType); -/** @internal */ -export const EVMAddressActivityRequestEventType$outboundSchema: z.ZodNativeEnum< - typeof EVMAddressActivityRequestEventType -> = EVMAddressActivityRequestEventType$inboundSchema; - /** @internal */ export const EVMAddressActivityRequestMetadata$inboundSchema: z.ZodType< EVMAddressActivityRequestMetadata, @@ -91,7 +74,7 @@ export const EVMAddressActivityRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - eventType: EVMAddressActivityRequestEventType$inboundSchema, + eventType: z.literal("address_activity"), url: z.string(), name: z.string().optional(), description: z.string().optional(), @@ -102,7 +85,7 @@ export const EVMAddressActivityRequest$inboundSchema: z.ZodType< }); /** @internal */ export type EVMAddressActivityRequest$Outbound = { - eventType: string; + eventType: "address_activity"; url: string; name?: string | undefined; description?: string | undefined; @@ -118,7 +101,7 @@ export const EVMAddressActivityRequest$outboundSchema: z.ZodType< z.ZodTypeDef, EVMAddressActivityRequest > = z.object({ - eventType: EVMAddressActivityRequestEventType$outboundSchema, + eventType: z.literal("address_activity"), url: z.string(), name: z.string().optional(), description: z.string().optional(), diff --git a/chainkit/src/models/components/evmblock.ts b/chainkit/src/models/components/evmblock.ts index f0917bef..032a7121 100644 --- a/chainkit/src/models/components/evmblock.ts +++ b/chainkit/src/models/components/evmblock.ts @@ -17,9 +17,17 @@ export type EvmBlock = { */ blockNumber: string; /** - * The block finality timestamp. + * The block creation (proposal) timestamp in seconds */ blockTimestamp: number; + /** + * The block creation (proposal) timestamp in milliseconds. Available only after Granite upgrade. + */ + blockTimestampMilliseconds?: number | undefined; + /** + * Minimum block delay in milliseconds. Available only after Granite upgrade. + */ + blockMinDelayExcess?: number | undefined; /** * The block hash identifier. */ @@ -64,6 +72,8 @@ export const EvmBlock$inboundSchema: z.ZodType< chainId: z.string(), blockNumber: z.string(), blockTimestamp: z.number(), + blockTimestampMilliseconds: z.number().optional(), + blockMinDelayExcess: z.number().optional(), blockHash: z.string(), txCount: z.number(), baseFee: z.string(), @@ -79,6 +89,8 @@ export type EvmBlock$Outbound = { chainId: string; blockNumber: string; blockTimestamp: number; + blockTimestampMilliseconds?: number | undefined; + blockMinDelayExcess?: number | undefined; blockHash: string; txCount: number; baseFee: string; @@ -99,6 +111,8 @@ export const EvmBlock$outboundSchema: z.ZodType< chainId: z.string(), blockNumber: z.string(), blockTimestamp: z.number(), + blockTimestampMilliseconds: z.number().optional(), + blockMinDelayExcess: z.number().optional(), blockHash: z.string(), txCount: z.number(), baseFee: z.string(), diff --git a/chainkit/src/models/components/evmoperationtype.ts b/chainkit/src/models/components/evmoperationtype.ts deleted file mode 100644 index f7aac75f..00000000 --- a/chainkit/src/models/components/evmoperationtype.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; - -export const EVMOperationType = { - TransactionExportEvm: "TRANSACTION_EXPORT_EVM", -} as const; -export type EVMOperationType = ClosedEnum; - -/** @internal */ -export const EVMOperationType$inboundSchema: z.ZodNativeEnum< - typeof EVMOperationType -> = z.nativeEnum(EVMOperationType); -/** @internal */ -export const EVMOperationType$outboundSchema: z.ZodNativeEnum< - typeof EVMOperationType -> = EVMOperationType$inboundSchema; diff --git a/chainkit/src/models/components/fullnativetransactiondetails.ts b/chainkit/src/models/components/fullnativetransactiondetails.ts index cc0505d2..f8a6026a 100644 --- a/chainkit/src/models/components/fullnativetransactiondetails.ts +++ b/chainkit/src/models/components/fullnativetransactiondetails.ts @@ -25,9 +25,17 @@ export type FullNativeTransactionDetails = { */ blockNumber: string; /** - * The block finality timestamp. + * The block creation (proposal) timestamp in seconds */ blockTimestamp: number; + /** + * The block creation (proposal) timestamp in milliseconds. Available only after Granite upgrade. + */ + blockTimestampMilliseconds?: number | undefined; + /** + * Minimum block delay in milliseconds. Available only after Granite upgrade. + */ + blockMinDelayExcess?: number | undefined; /** * The block hash identifier. */ @@ -89,6 +97,8 @@ export const FullNativeTransactionDetails$inboundSchema: z.ZodType< > = z.object({ blockNumber: z.string(), blockTimestamp: z.number(), + blockTimestampMilliseconds: z.number().optional(), + blockMinDelayExcess: z.number().optional(), blockHash: z.string(), chainId: z.string(), blockIndex: z.number(), @@ -112,6 +122,8 @@ export const FullNativeTransactionDetails$inboundSchema: z.ZodType< export type FullNativeTransactionDetails$Outbound = { blockNumber: string; blockTimestamp: number; + blockTimestampMilliseconds?: number | undefined; + blockMinDelayExcess?: number | undefined; blockHash: string; chainId: string; blockIndex: number; @@ -140,6 +152,8 @@ export const FullNativeTransactionDetails$outboundSchema: z.ZodType< > = z.object({ blockNumber: z.string(), blockTimestamp: z.number(), + blockTimestampMilliseconds: z.number().optional(), + blockMinDelayExcess: z.number().optional(), blockHash: z.string(), chainId: z.string(), blockIndex: z.number(), diff --git a/chainkit/src/models/components/getevmblockresponse.ts b/chainkit/src/models/components/getevmblockresponse.ts index 9ce3d294..3099ed7b 100644 --- a/chainkit/src/models/components/getevmblockresponse.ts +++ b/chainkit/src/models/components/getevmblockresponse.ts @@ -17,9 +17,17 @@ export type GetEvmBlockResponse = { */ blockNumber: string; /** - * The block finality timestamp. + * The block creation (proposal) timestamp in seconds */ blockTimestamp: number; + /** + * The block creation (proposal) timestamp in milliseconds. Available only after Granite upgrade. + */ + blockTimestampMilliseconds?: number | undefined; + /** + * Minimum block delay in milliseconds. Available only after Granite upgrade. + */ + blockMinDelayExcess?: number | undefined; /** * The block hash identifier. */ @@ -64,6 +72,8 @@ export const GetEvmBlockResponse$inboundSchema: z.ZodType< chainId: z.string(), blockNumber: z.string(), blockTimestamp: z.number(), + blockTimestampMilliseconds: z.number().optional(), + blockMinDelayExcess: z.number().optional(), blockHash: z.string(), txCount: z.number(), baseFee: z.string(), @@ -79,6 +89,8 @@ export type GetEvmBlockResponse$Outbound = { chainId: string; blockNumber: string; blockTimestamp: number; + blockTimestampMilliseconds?: number | undefined; + blockMinDelayExcess?: number | undefined; blockHash: string; txCount: number; baseFee: string; @@ -99,6 +111,8 @@ export const GetEvmBlockResponse$outboundSchema: z.ZodType< chainId: z.string(), blockNumber: z.string(), blockTimestamp: z.number(), + blockTimestampMilliseconds: z.number().optional(), + blockMinDelayExcess: z.number().optional(), blockHash: z.string(), txCount: z.number(), baseFee: z.string(), diff --git a/chainkit/src/models/components/index.ts b/chainkit/src/models/components/index.ts index 1a9645e2..b8ae0b30 100644 --- a/chainkit/src/models/components/index.ts +++ b/chainkit/src/models/components/index.ts @@ -76,7 +76,6 @@ export * from "./evmgenesisfeeconfigdto.js"; export * from "./evmgenesiswarpconfigdto.js"; export * from "./evminput.js"; export * from "./evmnetworkoptions.js"; -export * from "./evmoperationtype.js"; export * from "./evmoutput.js"; export * from "./fullnativetransactiondetails.js"; export * from "./getchainresponse.js"; @@ -180,7 +179,6 @@ export * from "./pendingteleportermessage.js"; export * from "./pendingvalidatordetails.js"; export * from "./platformaddressactivitykeytype.js"; export * from "./pricingproviders.js"; -export * from "./primarynetworkaddressactivityeventtype.js"; export * from "./primarynetworkaddressactivitymetadata.js"; export * from "./primarynetworkaddressactivityrequest.js"; export * from "./primarynetworkaddressactivityresponse.js"; @@ -246,7 +244,6 @@ export * from "./utxocredential.js"; export * from "./utxossortbyoption.js"; export * from "./utxotype.js"; export * from "./validationstatustype.js"; -export * from "./validatoractivityeventtype.js"; export * from "./validatoractivitykeytype.js"; export * from "./validatoractivitymetadata.js"; export * from "./validatoractivityrequest.js"; diff --git a/chainkit/src/models/components/internaltransaction.ts b/chainkit/src/models/components/internaltransaction.ts index e3f1e457..2456cc1e 100644 --- a/chainkit/src/models/components/internaltransaction.ts +++ b/chainkit/src/models/components/internaltransaction.ts @@ -24,9 +24,13 @@ export type InternalTransaction = { */ blockNumber: string; /** - * The block finality timestamp. + * The block creation (proposal) timestamp in seconds */ blockTimestamp: number; + /** + * The block creation (proposal) timestamp in milliseconds. Available only after Granite upgrade. + */ + blockTimestampMilliseconds?: number | undefined; /** * The block hash identifier. */ @@ -55,6 +59,7 @@ export const InternalTransaction$inboundSchema: z.ZodType< > = z.object({ blockNumber: z.string(), blockTimestamp: z.number(), + blockTimestampMilliseconds: z.number().optional(), blockHash: z.string(), txHash: z.string(), from: RichAddress$inboundSchema, @@ -69,6 +74,7 @@ export const InternalTransaction$inboundSchema: z.ZodType< export type InternalTransaction$Outbound = { blockNumber: string; blockTimestamp: number; + blockTimestampMilliseconds?: number | undefined; blockHash: string; txHash: string; from: RichAddress$Outbound; @@ -88,6 +94,7 @@ export const InternalTransaction$outboundSchema: z.ZodType< > = z.object({ blockNumber: z.string(), blockTimestamp: z.number(), + blockTimestampMilliseconds: z.number().optional(), blockHash: z.string(), txHash: z.string(), from: RichAddress$outboundSchema, diff --git a/chainkit/src/models/components/listcchainatomictransactionsresponse.ts b/chainkit/src/models/components/listcchainatomictransactionsresponse.ts index 34e54388..3db499ff 100644 --- a/chainkit/src/models/components/listcchainatomictransactionsresponse.ts +++ b/chainkit/src/models/components/listcchainatomictransactionsresponse.ts @@ -26,15 +26,18 @@ import { } from "./primarynetworkchaininfo.js"; export type ListCChainAtomicTransactionsResponseTransaction = - | CChainExportTransaction - | CChainImportTransaction; + | (CChainExportTransaction & { txType: "ExportTx" }) + | (CChainImportTransaction & { txType: "ImportTx" }); export type ListCChainAtomicTransactionsResponse = { /** * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. */ nextPageToken?: string | undefined; - transactions: Array; + transactions: Array< + | (CChainExportTransaction & { txType: "ExportTx" }) + | (CChainImportTransaction & { txType: "ImportTx" }) + >; chainInfo: PrimaryNetworkChainInfo; }; @@ -45,13 +48,17 @@ export const ListCChainAtomicTransactionsResponseTransaction$inboundSchema: z.ZodTypeDef, unknown > = z.union([ - CChainExportTransaction$inboundSchema, - CChainImportTransaction$inboundSchema, + CChainExportTransaction$inboundSchema.and( + z.object({ txType: z.literal("ExportTx") }), + ), + CChainImportTransaction$inboundSchema.and( + z.object({ txType: z.literal("ImportTx") }), + ), ]); /** @internal */ export type ListCChainAtomicTransactionsResponseTransaction$Outbound = - | CChainExportTransaction$Outbound - | CChainImportTransaction$Outbound; + | (CChainExportTransaction$Outbound & { txType: "ExportTx" }) + | (CChainImportTransaction$Outbound & { txType: "ImportTx" }); /** @internal */ export const ListCChainAtomicTransactionsResponseTransaction$outboundSchema: @@ -60,8 +67,12 @@ export const ListCChainAtomicTransactionsResponseTransaction$outboundSchema: z.ZodTypeDef, ListCChainAtomicTransactionsResponseTransaction > = z.union([ - CChainExportTransaction$outboundSchema, - CChainImportTransaction$outboundSchema, + CChainExportTransaction$outboundSchema.and( + z.object({ txType: z.literal("ExportTx") }), + ), + CChainImportTransaction$outboundSchema.and( + z.object({ txType: z.literal("ImportTx") }), + ), ]); export function listCChainAtomicTransactionsResponseTransactionToJSON( @@ -99,8 +110,12 @@ export const ListCChainAtomicTransactionsResponse$inboundSchema: z.ZodType< nextPageToken: z.string().optional(), transactions: z.array( z.union([ - CChainExportTransaction$inboundSchema, - CChainImportTransaction$inboundSchema, + CChainExportTransaction$inboundSchema.and( + z.object({ txType: z.literal("ExportTx") }), + ), + CChainImportTransaction$inboundSchema.and( + z.object({ txType: z.literal("ImportTx") }), + ), ]), ), chainInfo: PrimaryNetworkChainInfo$inboundSchema, @@ -109,7 +124,8 @@ export const ListCChainAtomicTransactionsResponse$inboundSchema: z.ZodType< export type ListCChainAtomicTransactionsResponse$Outbound = { nextPageToken?: string | undefined; transactions: Array< - CChainExportTransaction$Outbound | CChainImportTransaction$Outbound + | (CChainExportTransaction$Outbound & { txType: "ExportTx" }) + | (CChainImportTransaction$Outbound & { txType: "ImportTx" }) >; chainInfo: PrimaryNetworkChainInfo$Outbound; }; @@ -123,8 +139,12 @@ export const ListCChainAtomicTransactionsResponse$outboundSchema: z.ZodType< nextPageToken: z.string().optional(), transactions: z.array( z.union([ - CChainExportTransaction$outboundSchema, - CChainImportTransaction$outboundSchema, + CChainExportTransaction$outboundSchema.and( + z.object({ txType: z.literal("ExportTx") }), + ), + CChainImportTransaction$outboundSchema.and( + z.object({ txType: z.literal("ImportTx") }), + ), ]), ), chainInfo: PrimaryNetworkChainInfo$outboundSchema, diff --git a/chainkit/src/models/components/listcollectiblebalancesresponse.ts b/chainkit/src/models/components/listcollectiblebalancesresponse.ts index 05da33c4..06f976e9 100644 --- a/chainkit/src/models/components/listcollectiblebalancesresponse.ts +++ b/chainkit/src/models/components/listcollectiblebalancesresponse.ts @@ -19,7 +19,9 @@ import { Erc721TokenBalance$outboundSchema, } from "./erc721tokenbalance.js"; -export type CollectibleBalance = Erc721TokenBalance | Erc1155TokenBalance; +export type CollectibleBalance = + | (Erc721TokenBalance & { ercType: "ERC-721" }) + | (Erc1155TokenBalance & { ercType: "ERC-1155" }); export type ListCollectibleBalancesResponse = { /** @@ -29,7 +31,10 @@ export type ListCollectibleBalancesResponse = { /** * The list of ERC-721 and ERC-1155 token balances for the address. */ - collectibleBalances: Array; + collectibleBalances: Array< + | (Erc721TokenBalance & { ercType: "ERC-721" }) + | (Erc1155TokenBalance & { ercType: "ERC-1155" }) + >; }; /** @internal */ @@ -38,13 +43,17 @@ export const CollectibleBalance$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.union([ - Erc721TokenBalance$inboundSchema, - Erc1155TokenBalance$inboundSchema, + Erc721TokenBalance$inboundSchema.and( + z.object({ ercType: z.literal("ERC-721") }), + ), + Erc1155TokenBalance$inboundSchema.and( + z.object({ ercType: z.literal("ERC-1155") }), + ), ]); /** @internal */ export type CollectibleBalance$Outbound = - | Erc721TokenBalance$Outbound - | Erc1155TokenBalance$Outbound; + | (Erc721TokenBalance$Outbound & { ercType: "ERC-721" }) + | (Erc1155TokenBalance$Outbound & { ercType: "ERC-1155" }); /** @internal */ export const CollectibleBalance$outboundSchema: z.ZodType< @@ -52,8 +61,12 @@ export const CollectibleBalance$outboundSchema: z.ZodType< z.ZodTypeDef, CollectibleBalance > = z.union([ - Erc721TokenBalance$outboundSchema, - Erc1155TokenBalance$outboundSchema, + Erc721TokenBalance$outboundSchema.and( + z.object({ ercType: z.literal("ERC-721") }), + ), + Erc1155TokenBalance$outboundSchema.and( + z.object({ ercType: z.literal("ERC-1155") }), + ), ]); export function collectibleBalanceToJSON( @@ -82,8 +95,12 @@ export const ListCollectibleBalancesResponse$inboundSchema: z.ZodType< nextPageToken: z.string().optional(), collectibleBalances: z.array( z.union([ - Erc721TokenBalance$inboundSchema, - Erc1155TokenBalance$inboundSchema, + Erc721TokenBalance$inboundSchema.and( + z.object({ ercType: z.literal("ERC-721") }), + ), + Erc1155TokenBalance$inboundSchema.and( + z.object({ ercType: z.literal("ERC-1155") }), + ), ]), ), }); @@ -91,7 +108,8 @@ export const ListCollectibleBalancesResponse$inboundSchema: z.ZodType< export type ListCollectibleBalancesResponse$Outbound = { nextPageToken?: string | undefined; collectibleBalances: Array< - Erc721TokenBalance$Outbound | Erc1155TokenBalance$Outbound + | (Erc721TokenBalance$Outbound & { ercType: "ERC-721" }) + | (Erc1155TokenBalance$Outbound & { ercType: "ERC-1155" }) >; }; @@ -104,8 +122,12 @@ export const ListCollectibleBalancesResponse$outboundSchema: z.ZodType< nextPageToken: z.string().optional(), collectibleBalances: z.array( z.union([ - Erc721TokenBalance$outboundSchema, - Erc1155TokenBalance$outboundSchema, + Erc721TokenBalance$outboundSchema.and( + z.object({ ercType: z.literal("ERC-721") }), + ), + Erc1155TokenBalance$outboundSchema.and( + z.object({ ercType: z.literal("ERC-1155") }), + ), ]), ), }); diff --git a/chainkit/src/models/components/listcontractsresponse.ts b/chainkit/src/models/components/listcontractsresponse.ts index bd9d2e18..30d5dfac 100644 --- a/chainkit/src/models/components/listcontractsresponse.ts +++ b/chainkit/src/models/components/listcontractsresponse.ts @@ -32,10 +32,10 @@ import { } from "./unknowncontract.js"; export type Contract = - | (Erc20Contract & { ercType: "ERC-20" }) - | (Erc721Contract & { ercType: "ERC-721" }) - | (Erc1155Contract & { ercType: "ERC-1155" }) - | (UnknownContract & { ercType: "UNKNOWN" }); + | Erc721Contract + | Erc1155Contract + | Erc20Contract + | UnknownContract; export type ListContractsResponse = { /** @@ -43,10 +43,7 @@ export type ListContractsResponse = { */ nextPageToken?: string | undefined; contracts: Array< - | (Erc20Contract & { ercType: "ERC-20" }) - | (Erc721Contract & { ercType: "ERC-721" }) - | (Erc1155Contract & { ercType: "ERC-1155" }) - | (UnknownContract & { ercType: "UNKNOWN" }) + Erc721Contract | Erc1155Contract | Erc20Contract | UnknownContract >; }; @@ -56,33 +53,17 @@ export const Contract$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.union([ - Erc20Contract$inboundSchema.and( - z.object({ ercType: z.literal("ERC-20") }).transform((v) => ({ - ercType: v.ercType, - })), - ), - Erc721Contract$inboundSchema.and( - z.object({ ercType: z.literal("ERC-721") }).transform((v) => ({ - ercType: v.ercType, - })), - ), - Erc1155Contract$inboundSchema.and( - z.object({ ercType: z.literal("ERC-1155") }).transform((v) => ({ - ercType: v.ercType, - })), - ), - UnknownContract$inboundSchema.and( - z.object({ ercType: z.literal("UNKNOWN") }).transform((v) => ({ - ercType: v.ercType, - })), - ), + Erc721Contract$inboundSchema, + Erc1155Contract$inboundSchema, + Erc20Contract$inboundSchema, + UnknownContract$inboundSchema, ]); /** @internal */ export type Contract$Outbound = - | (Erc20Contract$Outbound & { ercType: "ERC-20" }) - | (Erc721Contract$Outbound & { ercType: "ERC-721" }) - | (Erc1155Contract$Outbound & { ercType: "ERC-1155" }) - | (UnknownContract$Outbound & { ercType: "UNKNOWN" }); + | Erc721Contract$Outbound + | Erc1155Contract$Outbound + | Erc20Contract$Outbound + | UnknownContract$Outbound; /** @internal */ export const Contract$outboundSchema: z.ZodType< @@ -90,26 +71,10 @@ export const Contract$outboundSchema: z.ZodType< z.ZodTypeDef, Contract > = z.union([ - Erc20Contract$outboundSchema.and( - z.object({ ercType: z.literal("ERC-20") }).transform((v) => ({ - ercType: v.ercType, - })), - ), - Erc721Contract$outboundSchema.and( - z.object({ ercType: z.literal("ERC-721") }).transform((v) => ({ - ercType: v.ercType, - })), - ), - Erc1155Contract$outboundSchema.and( - z.object({ ercType: z.literal("ERC-1155") }).transform((v) => ({ - ercType: v.ercType, - })), - ), - UnknownContract$outboundSchema.and( - z.object({ ercType: z.literal("UNKNOWN") }).transform((v) => ({ - ercType: v.ercType, - })), - ), + Erc721Contract$outboundSchema, + Erc1155Contract$outboundSchema, + Erc20Contract$outboundSchema, + UnknownContract$outboundSchema, ]); export function contractToJSON(contract: Contract): string { @@ -134,26 +99,10 @@ export const ListContractsResponse$inboundSchema: z.ZodType< nextPageToken: z.string().optional(), contracts: z.array( z.union([ - Erc20Contract$inboundSchema.and( - z.object({ ercType: z.literal("ERC-20") }).transform((v) => ({ - ercType: v.ercType, - })), - ), - Erc721Contract$inboundSchema.and( - z.object({ ercType: z.literal("ERC-721") }).transform((v) => ({ - ercType: v.ercType, - })), - ), - Erc1155Contract$inboundSchema.and( - z.object({ ercType: z.literal("ERC-1155") }).transform((v) => ({ - ercType: v.ercType, - })), - ), - UnknownContract$inboundSchema.and( - z.object({ ercType: z.literal("UNKNOWN") }).transform((v) => ({ - ercType: v.ercType, - })), - ), + Erc721Contract$inboundSchema, + Erc1155Contract$inboundSchema, + Erc20Contract$inboundSchema, + UnknownContract$inboundSchema, ]), ), }); @@ -161,10 +110,10 @@ export const ListContractsResponse$inboundSchema: z.ZodType< export type ListContractsResponse$Outbound = { nextPageToken?: string | undefined; contracts: Array< - | (Erc20Contract$Outbound & { ercType: "ERC-20" }) - | (Erc721Contract$Outbound & { ercType: "ERC-721" }) - | (Erc1155Contract$Outbound & { ercType: "ERC-1155" }) - | (UnknownContract$Outbound & { ercType: "UNKNOWN" }) + | Erc721Contract$Outbound + | Erc1155Contract$Outbound + | Erc20Contract$Outbound + | UnknownContract$Outbound >; }; @@ -177,26 +126,10 @@ export const ListContractsResponse$outboundSchema: z.ZodType< nextPageToken: z.string().optional(), contracts: z.array( z.union([ - Erc20Contract$outboundSchema.and( - z.object({ ercType: z.literal("ERC-20") }).transform((v) => ({ - ercType: v.ercType, - })), - ), - Erc721Contract$outboundSchema.and( - z.object({ ercType: z.literal("ERC-721") }).transform((v) => ({ - ercType: v.ercType, - })), - ), - Erc1155Contract$outboundSchema.and( - z.object({ ercType: z.literal("ERC-1155") }).transform((v) => ({ - ercType: v.ercType, - })), - ), - UnknownContract$outboundSchema.and( - z.object({ ercType: z.literal("UNKNOWN") }).transform((v) => ({ - ercType: v.ercType, - })), - ), + Erc721Contract$outboundSchema, + Erc1155Contract$outboundSchema, + Erc20Contract$outboundSchema, + UnknownContract$outboundSchema, ]), ), }); diff --git a/chainkit/src/models/components/listdelegatordetailsresponse.ts b/chainkit/src/models/components/listdelegatordetailsresponse.ts index c1141f9a..64ce74c9 100644 --- a/chainkit/src/models/components/listdelegatordetailsresponse.ts +++ b/chainkit/src/models/components/listdelegatordetailsresponse.ts @@ -26,9 +26,9 @@ import { } from "./pendingdelegatordetails.js"; export type Delegator = - | (ActiveDelegatorDetails & { delegationStatus: "active" }) - | (PendingDelegatorDetails & { delegationStatus: "pending" }) - | (CompletedDelegatorDetails & { delegationStatus: "completed" }); + | ActiveDelegatorDetails + | PendingDelegatorDetails + | CompletedDelegatorDetails; export type ListDelegatorDetailsResponse = { /** @@ -39,9 +39,7 @@ export type ListDelegatorDetailsResponse = { * The list of Delegator Details. */ delegators: Array< - | (ActiveDelegatorDetails & { delegationStatus: "active" }) - | (PendingDelegatorDetails & { delegationStatus: "pending" }) - | (CompletedDelegatorDetails & { delegationStatus: "completed" }) + ActiveDelegatorDetails | PendingDelegatorDetails | CompletedDelegatorDetails >; }; @@ -51,27 +49,15 @@ export const Delegator$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.union([ - ActiveDelegatorDetails$inboundSchema.and( - z.object({ delegationStatus: z.literal("active") }).transform((v) => ({ - delegationStatus: v.delegationStatus, - })), - ), - PendingDelegatorDetails$inboundSchema.and( - z.object({ delegationStatus: z.literal("pending") }).transform((v) => ({ - delegationStatus: v.delegationStatus, - })), - ), - CompletedDelegatorDetails$inboundSchema.and( - z.object({ delegationStatus: z.literal("completed") }).transform((v) => ({ - delegationStatus: v.delegationStatus, - })), - ), + ActiveDelegatorDetails$inboundSchema, + PendingDelegatorDetails$inboundSchema, + CompletedDelegatorDetails$inboundSchema, ]); /** @internal */ export type Delegator$Outbound = - | (ActiveDelegatorDetails$Outbound & { delegationStatus: "active" }) - | (PendingDelegatorDetails$Outbound & { delegationStatus: "pending" }) - | (CompletedDelegatorDetails$Outbound & { delegationStatus: "completed" }); + | ActiveDelegatorDetails$Outbound + | PendingDelegatorDetails$Outbound + | CompletedDelegatorDetails$Outbound; /** @internal */ export const Delegator$outboundSchema: z.ZodType< @@ -79,21 +65,9 @@ export const Delegator$outboundSchema: z.ZodType< z.ZodTypeDef, Delegator > = z.union([ - ActiveDelegatorDetails$outboundSchema.and( - z.object({ delegationStatus: z.literal("active") }).transform((v) => ({ - delegationStatus: v.delegationStatus, - })), - ), - PendingDelegatorDetails$outboundSchema.and( - z.object({ delegationStatus: z.literal("pending") }).transform((v) => ({ - delegationStatus: v.delegationStatus, - })), - ), - CompletedDelegatorDetails$outboundSchema.and( - z.object({ delegationStatus: z.literal("completed") }).transform((v) => ({ - delegationStatus: v.delegationStatus, - })), - ), + ActiveDelegatorDetails$outboundSchema, + PendingDelegatorDetails$outboundSchema, + CompletedDelegatorDetails$outboundSchema, ]); export function delegatorToJSON(delegator: Delegator): string { @@ -118,21 +92,9 @@ export const ListDelegatorDetailsResponse$inboundSchema: z.ZodType< nextPageToken: z.string().optional(), delegators: z.array( z.union([ - ActiveDelegatorDetails$inboundSchema.and( - z.object({ delegationStatus: z.literal("active") }).transform((v) => ({ - delegationStatus: v.delegationStatus, - })), - ), - PendingDelegatorDetails$inboundSchema.and( - z.object({ delegationStatus: z.literal("pending") }).transform((v) => ({ - delegationStatus: v.delegationStatus, - })), - ), - CompletedDelegatorDetails$inboundSchema.and( - z.object({ delegationStatus: z.literal("completed") }).transform(( - v, - ) => ({ delegationStatus: v.delegationStatus })), - ), + ActiveDelegatorDetails$inboundSchema, + PendingDelegatorDetails$inboundSchema, + CompletedDelegatorDetails$inboundSchema, ]), ), }); @@ -140,9 +102,9 @@ export const ListDelegatorDetailsResponse$inboundSchema: z.ZodType< export type ListDelegatorDetailsResponse$Outbound = { nextPageToken?: string | undefined; delegators: Array< - | (ActiveDelegatorDetails$Outbound & { delegationStatus: "active" }) - | (PendingDelegatorDetails$Outbound & { delegationStatus: "pending" }) - | (CompletedDelegatorDetails$Outbound & { delegationStatus: "completed" }) + | ActiveDelegatorDetails$Outbound + | PendingDelegatorDetails$Outbound + | CompletedDelegatorDetails$Outbound >; }; @@ -155,21 +117,9 @@ export const ListDelegatorDetailsResponse$outboundSchema: z.ZodType< nextPageToken: z.string().optional(), delegators: z.array( z.union([ - ActiveDelegatorDetails$outboundSchema.and( - z.object({ delegationStatus: z.literal("active") }).transform((v) => ({ - delegationStatus: v.delegationStatus, - })), - ), - PendingDelegatorDetails$outboundSchema.and( - z.object({ delegationStatus: z.literal("pending") }).transform((v) => ({ - delegationStatus: v.delegationStatus, - })), - ), - CompletedDelegatorDetails$outboundSchema.and( - z.object({ delegationStatus: z.literal("completed") }).transform(( - v, - ) => ({ delegationStatus: v.delegationStatus })), - ), + ActiveDelegatorDetails$outboundSchema, + PendingDelegatorDetails$outboundSchema, + CompletedDelegatorDetails$outboundSchema, ]), ), }); diff --git a/chainkit/src/models/components/listicmmessagesresponse.ts b/chainkit/src/models/components/listicmmessagesresponse.ts index dab1b78a..7db216ef 100644 --- a/chainkit/src/models/components/listicmmessagesresponse.ts +++ b/chainkit/src/models/components/listicmmessagesresponse.ts @@ -26,11 +26,9 @@ import { } from "./pendingicmmessage.js"; export type ListIcmMessagesResponseMessage = - | (DeliveredIcmMessage & { status: "delivered" }) - | (PendingIcmMessage & { status: "pending" }) - | (DeliveredSourceNotIndexedIcmMessage & { - status: "delivered_source_not_indexed"; - }); + | PendingIcmMessage + | DeliveredIcmMessage + | DeliveredSourceNotIndexedIcmMessage; export type ListIcmMessagesResponse = { /** @@ -38,11 +36,9 @@ export type ListIcmMessagesResponse = { */ nextPageToken?: string | undefined; messages: Array< - | (DeliveredIcmMessage & { status: "delivered" }) - | (PendingIcmMessage & { status: "pending" }) - | (DeliveredSourceNotIndexedIcmMessage & { - status: "delivered_source_not_indexed"; - }) + | PendingIcmMessage + | DeliveredIcmMessage + | DeliveredSourceNotIndexedIcmMessage >; }; @@ -52,29 +48,15 @@ export const ListIcmMessagesResponseMessage$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.union([ - DeliveredIcmMessage$inboundSchema.and( - z.object({ status: z.literal("delivered") }).transform((v) => ({ - status: v.status, - })), - ), - PendingIcmMessage$inboundSchema.and( - z.object({ status: z.literal("pending") }).transform((v) => ({ - status: v.status, - })), - ), - DeliveredSourceNotIndexedIcmMessage$inboundSchema.and( - z.object({ status: z.literal("delivered_source_not_indexed") }).transform(( - v, - ) => ({ status: v.status })), - ), + PendingIcmMessage$inboundSchema, + DeliveredIcmMessage$inboundSchema, + DeliveredSourceNotIndexedIcmMessage$inboundSchema, ]); /** @internal */ export type ListIcmMessagesResponseMessage$Outbound = - | (DeliveredIcmMessage$Outbound & { status: "delivered" }) - | (PendingIcmMessage$Outbound & { status: "pending" }) - | (DeliveredSourceNotIndexedIcmMessage$Outbound & { - status: "delivered_source_not_indexed"; - }); + | PendingIcmMessage$Outbound + | DeliveredIcmMessage$Outbound + | DeliveredSourceNotIndexedIcmMessage$Outbound; /** @internal */ export const ListIcmMessagesResponseMessage$outboundSchema: z.ZodType< @@ -82,21 +64,9 @@ export const ListIcmMessagesResponseMessage$outboundSchema: z.ZodType< z.ZodTypeDef, ListIcmMessagesResponseMessage > = z.union([ - DeliveredIcmMessage$outboundSchema.and( - z.object({ status: z.literal("delivered") }).transform((v) => ({ - status: v.status, - })), - ), - PendingIcmMessage$outboundSchema.and( - z.object({ status: z.literal("pending") }).transform((v) => ({ - status: v.status, - })), - ), - DeliveredSourceNotIndexedIcmMessage$outboundSchema.and( - z.object({ status: z.literal("delivered_source_not_indexed") }).transform(( - v, - ) => ({ status: v.status })), - ), + PendingIcmMessage$outboundSchema, + DeliveredIcmMessage$outboundSchema, + DeliveredSourceNotIndexedIcmMessage$outboundSchema, ]); export function listIcmMessagesResponseMessageToJSON( @@ -127,20 +97,9 @@ export const ListIcmMessagesResponse$inboundSchema: z.ZodType< nextPageToken: z.string().optional(), messages: z.array( z.union([ - DeliveredIcmMessage$inboundSchema.and( - z.object({ status: z.literal("delivered") }).transform((v) => ({ - status: v.status, - })), - ), - PendingIcmMessage$inboundSchema.and( - z.object({ status: z.literal("pending") }).transform((v) => ({ - status: v.status, - })), - ), - DeliveredSourceNotIndexedIcmMessage$inboundSchema.and( - z.object({ status: z.literal("delivered_source_not_indexed") }) - .transform((v) => ({ status: v.status })), - ), + PendingIcmMessage$inboundSchema, + DeliveredIcmMessage$inboundSchema, + DeliveredSourceNotIndexedIcmMessage$inboundSchema, ]), ), }); @@ -148,11 +107,9 @@ export const ListIcmMessagesResponse$inboundSchema: z.ZodType< export type ListIcmMessagesResponse$Outbound = { nextPageToken?: string | undefined; messages: Array< - | (DeliveredIcmMessage$Outbound & { status: "delivered" }) - | (PendingIcmMessage$Outbound & { status: "pending" }) - | (DeliveredSourceNotIndexedIcmMessage$Outbound & { - status: "delivered_source_not_indexed"; - }) + | PendingIcmMessage$Outbound + | DeliveredIcmMessage$Outbound + | DeliveredSourceNotIndexedIcmMessage$Outbound >; }; @@ -165,20 +122,9 @@ export const ListIcmMessagesResponse$outboundSchema: z.ZodType< nextPageToken: z.string().optional(), messages: z.array( z.union([ - DeliveredIcmMessage$outboundSchema.and( - z.object({ status: z.literal("delivered") }).transform((v) => ({ - status: v.status, - })), - ), - PendingIcmMessage$outboundSchema.and( - z.object({ status: z.literal("pending") }).transform((v) => ({ - status: v.status, - })), - ), - DeliveredSourceNotIndexedIcmMessage$outboundSchema.and( - z.object({ status: z.literal("delivered_source_not_indexed") }) - .transform((v) => ({ status: v.status })), - ), + PendingIcmMessage$outboundSchema, + DeliveredIcmMessage$outboundSchema, + DeliveredSourceNotIndexedIcmMessage$outboundSchema, ]), ), }); diff --git a/chainkit/src/models/components/listnfttokens.ts b/chainkit/src/models/components/listnfttokens.ts index d4c2eee4..0c7ba268 100644 --- a/chainkit/src/models/components/listnfttokens.ts +++ b/chainkit/src/models/components/listnfttokens.ts @@ -19,28 +19,43 @@ import { Erc721Token$outboundSchema, } from "./erc721token.js"; -export type Token = Erc721Token | Erc1155Token; +export type Token = + | (Erc721Token & { ercType: "ERC-721" }) + | (Erc1155Token & { ercType: "ERC-1155" }); export type ListNftTokens = { /** * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. */ nextPageToken?: string | undefined; - tokens: Array; + tokens: Array< + | (Erc721Token & { ercType: "ERC-721" }) + | (Erc1155Token & { ercType: "ERC-1155" }) + >; }; /** @internal */ export const Token$inboundSchema: z.ZodType = z - .union([Erc721Token$inboundSchema, Erc1155Token$inboundSchema]); + .union([ + Erc721Token$inboundSchema.and(z.object({ ercType: z.literal("ERC-721") })), + Erc1155Token$inboundSchema.and( + z.object({ ercType: z.literal("ERC-1155") }), + ), + ]); /** @internal */ -export type Token$Outbound = Erc721Token$Outbound | Erc1155Token$Outbound; +export type Token$Outbound = + | (Erc721Token$Outbound & { ercType: "ERC-721" }) + | (Erc1155Token$Outbound & { ercType: "ERC-1155" }); /** @internal */ export const Token$outboundSchema: z.ZodType< Token$Outbound, z.ZodTypeDef, Token -> = z.union([Erc721Token$outboundSchema, Erc1155Token$outboundSchema]); +> = z.union([ + Erc721Token$outboundSchema.and(z.object({ ercType: z.literal("ERC-721") })), + Erc1155Token$outboundSchema.and(z.object({ ercType: z.literal("ERC-1155") })), +]); export function tokenToJSON(token: Token): string { return JSON.stringify(Token$outboundSchema.parse(token)); @@ -63,13 +78,23 @@ export const ListNftTokens$inboundSchema: z.ZodType< > = z.object({ nextPageToken: z.string().optional(), tokens: z.array( - z.union([Erc721Token$inboundSchema, Erc1155Token$inboundSchema]), + z.union([ + Erc721Token$inboundSchema.and( + z.object({ ercType: z.literal("ERC-721") }), + ), + Erc1155Token$inboundSchema.and( + z.object({ ercType: z.literal("ERC-1155") }), + ), + ]), ), }); /** @internal */ export type ListNftTokens$Outbound = { nextPageToken?: string | undefined; - tokens: Array; + tokens: Array< + | (Erc721Token$Outbound & { ercType: "ERC-721" }) + | (Erc1155Token$Outbound & { ercType: "ERC-1155" }) + >; }; /** @internal */ @@ -80,7 +105,14 @@ export const ListNftTokens$outboundSchema: z.ZodType< > = z.object({ nextPageToken: z.string().optional(), tokens: z.array( - z.union([Erc721Token$outboundSchema, Erc1155Token$outboundSchema]), + z.union([ + Erc721Token$outboundSchema.and( + z.object({ ercType: z.literal("ERC-721") }), + ), + Erc1155Token$outboundSchema.and( + z.object({ ercType: z.literal("ERC-1155") }), + ), + ]), ), }); diff --git a/chainkit/src/models/components/listteleportermessagesresponse.ts b/chainkit/src/models/components/listteleportermessagesresponse.ts index b139f5a2..24e3a989 100644 --- a/chainkit/src/models/components/listteleportermessagesresponse.ts +++ b/chainkit/src/models/components/listteleportermessagesresponse.ts @@ -26,11 +26,9 @@ import { } from "./pendingteleportermessage.js"; export type ListTeleporterMessagesResponseMessage = - | (DeliveredTeleporterMessage & { status: "delivered" }) - | (PendingTeleporterMessage & { status: "pending" }) - | (DeliveredSourceNotIndexedIcmMessage & { - status: "delivered_source_not_indexed"; - }); + | PendingTeleporterMessage + | DeliveredTeleporterMessage + | DeliveredSourceNotIndexedIcmMessage; export type ListTeleporterMessagesResponse = { /** @@ -38,11 +36,9 @@ export type ListTeleporterMessagesResponse = { */ nextPageToken?: string | undefined; messages: Array< - | (DeliveredTeleporterMessage & { status: "delivered" }) - | (PendingTeleporterMessage & { status: "pending" }) - | (DeliveredSourceNotIndexedIcmMessage & { - status: "delivered_source_not_indexed"; - }) + | PendingTeleporterMessage + | DeliveredTeleporterMessage + | DeliveredSourceNotIndexedIcmMessage >; }; @@ -52,29 +48,15 @@ export const ListTeleporterMessagesResponseMessage$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.union([ - DeliveredTeleporterMessage$inboundSchema.and( - z.object({ status: z.literal("delivered") }).transform((v) => ({ - status: v.status, - })), - ), - PendingTeleporterMessage$inboundSchema.and( - z.object({ status: z.literal("pending") }).transform((v) => ({ - status: v.status, - })), - ), - DeliveredSourceNotIndexedIcmMessage$inboundSchema.and( - z.object({ status: z.literal("delivered_source_not_indexed") }).transform(( - v, - ) => ({ status: v.status })), - ), + PendingTeleporterMessage$inboundSchema, + DeliveredTeleporterMessage$inboundSchema, + DeliveredSourceNotIndexedIcmMessage$inboundSchema, ]); /** @internal */ export type ListTeleporterMessagesResponseMessage$Outbound = - | (DeliveredTeleporterMessage$Outbound & { status: "delivered" }) - | (PendingTeleporterMessage$Outbound & { status: "pending" }) - | (DeliveredSourceNotIndexedIcmMessage$Outbound & { - status: "delivered_source_not_indexed"; - }); + | PendingTeleporterMessage$Outbound + | DeliveredTeleporterMessage$Outbound + | DeliveredSourceNotIndexedIcmMessage$Outbound; /** @internal */ export const ListTeleporterMessagesResponseMessage$outboundSchema: z.ZodType< @@ -82,21 +64,9 @@ export const ListTeleporterMessagesResponseMessage$outboundSchema: z.ZodType< z.ZodTypeDef, ListTeleporterMessagesResponseMessage > = z.union([ - DeliveredTeleporterMessage$outboundSchema.and( - z.object({ status: z.literal("delivered") }).transform((v) => ({ - status: v.status, - })), - ), - PendingTeleporterMessage$outboundSchema.and( - z.object({ status: z.literal("pending") }).transform((v) => ({ - status: v.status, - })), - ), - DeliveredSourceNotIndexedIcmMessage$outboundSchema.and( - z.object({ status: z.literal("delivered_source_not_indexed") }).transform(( - v, - ) => ({ status: v.status })), - ), + PendingTeleporterMessage$outboundSchema, + DeliveredTeleporterMessage$outboundSchema, + DeliveredSourceNotIndexedIcmMessage$outboundSchema, ]); export function listTeleporterMessagesResponseMessageToJSON( @@ -128,20 +98,9 @@ export const ListTeleporterMessagesResponse$inboundSchema: z.ZodType< nextPageToken: z.string().optional(), messages: z.array( z.union([ - DeliveredTeleporterMessage$inboundSchema.and( - z.object({ status: z.literal("delivered") }).transform((v) => ({ - status: v.status, - })), - ), - PendingTeleporterMessage$inboundSchema.and( - z.object({ status: z.literal("pending") }).transform((v) => ({ - status: v.status, - })), - ), - DeliveredSourceNotIndexedIcmMessage$inboundSchema.and( - z.object({ status: z.literal("delivered_source_not_indexed") }) - .transform((v) => ({ status: v.status })), - ), + PendingTeleporterMessage$inboundSchema, + DeliveredTeleporterMessage$inboundSchema, + DeliveredSourceNotIndexedIcmMessage$inboundSchema, ]), ), }); @@ -149,11 +108,9 @@ export const ListTeleporterMessagesResponse$inboundSchema: z.ZodType< export type ListTeleporterMessagesResponse$Outbound = { nextPageToken?: string | undefined; messages: Array< - | (DeliveredTeleporterMessage$Outbound & { status: "delivered" }) - | (PendingTeleporterMessage$Outbound & { status: "pending" }) - | (DeliveredSourceNotIndexedIcmMessage$Outbound & { - status: "delivered_source_not_indexed"; - }) + | PendingTeleporterMessage$Outbound + | DeliveredTeleporterMessage$Outbound + | DeliveredSourceNotIndexedIcmMessage$Outbound >; }; @@ -166,20 +123,9 @@ export const ListTeleporterMessagesResponse$outboundSchema: z.ZodType< nextPageToken: z.string().optional(), messages: z.array( z.union([ - DeliveredTeleporterMessage$outboundSchema.and( - z.object({ status: z.literal("delivered") }).transform((v) => ({ - status: v.status, - })), - ), - PendingTeleporterMessage$outboundSchema.and( - z.object({ status: z.literal("pending") }).transform((v) => ({ - status: v.status, - })), - ), - DeliveredSourceNotIndexedIcmMessage$outboundSchema.and( - z.object({ status: z.literal("delivered_source_not_indexed") }) - .transform((v) => ({ status: v.status })), - ), + PendingTeleporterMessage$outboundSchema, + DeliveredTeleporterMessage$outboundSchema, + DeliveredSourceNotIndexedIcmMessage$outboundSchema, ]), ), }); diff --git a/chainkit/src/models/components/listvalidatordetailsresponse.ts b/chainkit/src/models/components/listvalidatordetailsresponse.ts index 15cd719d..5b6b70f1 100644 --- a/chainkit/src/models/components/listvalidatordetailsresponse.ts +++ b/chainkit/src/models/components/listvalidatordetailsresponse.ts @@ -32,10 +32,10 @@ import { } from "./removedvalidatordetails.js"; export type Validator = - | (ActiveValidatorDetails & { validationStatus: "active" }) - | (CompletedValidatorDetails & { validationStatus: "completed" }) - | (RemovedValidatorDetails & { validationStatus: "removed" }) - | (PendingValidatorDetails & { validationStatus: "pending" }); + | ActiveValidatorDetails + | PendingValidatorDetails + | CompletedValidatorDetails + | RemovedValidatorDetails; export type ListValidatorDetailsResponse = { /** @@ -46,10 +46,10 @@ export type ListValidatorDetailsResponse = { * The list of validator Details. */ validators: Array< - | (ActiveValidatorDetails & { validationStatus: "active" }) - | (CompletedValidatorDetails & { validationStatus: "completed" }) - | (RemovedValidatorDetails & { validationStatus: "removed" }) - | (PendingValidatorDetails & { validationStatus: "pending" }) + | ActiveValidatorDetails + | PendingValidatorDetails + | CompletedValidatorDetails + | RemovedValidatorDetails >; }; @@ -59,33 +59,17 @@ export const Validator$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.union([ - ActiveValidatorDetails$inboundSchema.and( - z.object({ validationStatus: z.literal("active") }).transform((v) => ({ - validationStatus: v.validationStatus, - })), - ), - CompletedValidatorDetails$inboundSchema.and( - z.object({ validationStatus: z.literal("completed") }).transform((v) => ({ - validationStatus: v.validationStatus, - })), - ), - RemovedValidatorDetails$inboundSchema.and( - z.object({ validationStatus: z.literal("removed") }).transform((v) => ({ - validationStatus: v.validationStatus, - })), - ), - PendingValidatorDetails$inboundSchema.and( - z.object({ validationStatus: z.literal("pending") }).transform((v) => ({ - validationStatus: v.validationStatus, - })), - ), + ActiveValidatorDetails$inboundSchema, + PendingValidatorDetails$inboundSchema, + CompletedValidatorDetails$inboundSchema, + RemovedValidatorDetails$inboundSchema, ]); /** @internal */ export type Validator$Outbound = - | (ActiveValidatorDetails$Outbound & { validationStatus: "active" }) - | (CompletedValidatorDetails$Outbound & { validationStatus: "completed" }) - | (RemovedValidatorDetails$Outbound & { validationStatus: "removed" }) - | (PendingValidatorDetails$Outbound & { validationStatus: "pending" }); + | ActiveValidatorDetails$Outbound + | PendingValidatorDetails$Outbound + | CompletedValidatorDetails$Outbound + | RemovedValidatorDetails$Outbound; /** @internal */ export const Validator$outboundSchema: z.ZodType< @@ -93,26 +77,10 @@ export const Validator$outboundSchema: z.ZodType< z.ZodTypeDef, Validator > = z.union([ - ActiveValidatorDetails$outboundSchema.and( - z.object({ validationStatus: z.literal("active") }).transform((v) => ({ - validationStatus: v.validationStatus, - })), - ), - CompletedValidatorDetails$outboundSchema.and( - z.object({ validationStatus: z.literal("completed") }).transform((v) => ({ - validationStatus: v.validationStatus, - })), - ), - RemovedValidatorDetails$outboundSchema.and( - z.object({ validationStatus: z.literal("removed") }).transform((v) => ({ - validationStatus: v.validationStatus, - })), - ), - PendingValidatorDetails$outboundSchema.and( - z.object({ validationStatus: z.literal("pending") }).transform((v) => ({ - validationStatus: v.validationStatus, - })), - ), + ActiveValidatorDetails$outboundSchema, + PendingValidatorDetails$outboundSchema, + CompletedValidatorDetails$outboundSchema, + RemovedValidatorDetails$outboundSchema, ]); export function validatorToJSON(validator: Validator): string { @@ -137,26 +105,10 @@ export const ListValidatorDetailsResponse$inboundSchema: z.ZodType< nextPageToken: z.string().optional(), validators: z.array( z.union([ - ActiveValidatorDetails$inboundSchema.and( - z.object({ validationStatus: z.literal("active") }).transform((v) => ({ - validationStatus: v.validationStatus, - })), - ), - CompletedValidatorDetails$inboundSchema.and( - z.object({ validationStatus: z.literal("completed") }).transform(( - v, - ) => ({ validationStatus: v.validationStatus })), - ), - RemovedValidatorDetails$inboundSchema.and( - z.object({ validationStatus: z.literal("removed") }).transform((v) => ({ - validationStatus: v.validationStatus, - })), - ), - PendingValidatorDetails$inboundSchema.and( - z.object({ validationStatus: z.literal("pending") }).transform((v) => ({ - validationStatus: v.validationStatus, - })), - ), + ActiveValidatorDetails$inboundSchema, + PendingValidatorDetails$inboundSchema, + CompletedValidatorDetails$inboundSchema, + RemovedValidatorDetails$inboundSchema, ]), ), }); @@ -164,10 +116,10 @@ export const ListValidatorDetailsResponse$inboundSchema: z.ZodType< export type ListValidatorDetailsResponse$Outbound = { nextPageToken?: string | undefined; validators: Array< - | (ActiveValidatorDetails$Outbound & { validationStatus: "active" }) - | (CompletedValidatorDetails$Outbound & { validationStatus: "completed" }) - | (RemovedValidatorDetails$Outbound & { validationStatus: "removed" }) - | (PendingValidatorDetails$Outbound & { validationStatus: "pending" }) + | ActiveValidatorDetails$Outbound + | PendingValidatorDetails$Outbound + | CompletedValidatorDetails$Outbound + | RemovedValidatorDetails$Outbound >; }; @@ -180,26 +132,10 @@ export const ListValidatorDetailsResponse$outboundSchema: z.ZodType< nextPageToken: z.string().optional(), validators: z.array( z.union([ - ActiveValidatorDetails$outboundSchema.and( - z.object({ validationStatus: z.literal("active") }).transform((v) => ({ - validationStatus: v.validationStatus, - })), - ), - CompletedValidatorDetails$outboundSchema.and( - z.object({ validationStatus: z.literal("completed") }).transform(( - v, - ) => ({ validationStatus: v.validationStatus })), - ), - RemovedValidatorDetails$outboundSchema.and( - z.object({ validationStatus: z.literal("removed") }).transform((v) => ({ - validationStatus: v.validationStatus, - })), - ), - PendingValidatorDetails$outboundSchema.and( - z.object({ validationStatus: z.literal("pending") }).transform((v) => ({ - validationStatus: v.validationStatus, - })), - ), + ActiveValidatorDetails$outboundSchema, + PendingValidatorDetails$outboundSchema, + CompletedValidatorDetails$outboundSchema, + RemovedValidatorDetails$outboundSchema, ]), ), }); diff --git a/chainkit/src/models/components/listwebhooksresponse.ts b/chainkit/src/models/components/listwebhooksresponse.ts index 0c4b01d5..c027345e 100644 --- a/chainkit/src/models/components/listwebhooksresponse.ts +++ b/chainkit/src/models/components/listwebhooksresponse.ts @@ -26,7 +26,7 @@ import { } from "./validatoractivityresponse.js"; export type Webhook = - | EVMAddressActivityResponse + | (EVMAddressActivityResponse & { eventType: "address_activity" }) | PrimaryNetworkAddressActivityResponse | ValidatorActivityResponse; @@ -36,7 +36,7 @@ export type ListWebhooksResponse = { */ nextPageToken?: string | undefined; webhooks: Array< - | EVMAddressActivityResponse + | (EVMAddressActivityResponse & { eventType: "address_activity" }) | PrimaryNetworkAddressActivityResponse | ValidatorActivityResponse >; @@ -45,13 +45,15 @@ export type ListWebhooksResponse = { /** @internal */ export const Webhook$inboundSchema: z.ZodType = z.union([ - EVMAddressActivityResponse$inboundSchema, + EVMAddressActivityResponse$inboundSchema.and( + z.object({ eventType: z.literal("address_activity") }), + ), PrimaryNetworkAddressActivityResponse$inboundSchema, ValidatorActivityResponse$inboundSchema, ]); /** @internal */ export type Webhook$Outbound = - | EVMAddressActivityResponse$Outbound + | (EVMAddressActivityResponse$Outbound & { eventType: "address_activity" }) | PrimaryNetworkAddressActivityResponse$Outbound | ValidatorActivityResponse$Outbound; @@ -61,7 +63,9 @@ export const Webhook$outboundSchema: z.ZodType< z.ZodTypeDef, Webhook > = z.union([ - EVMAddressActivityResponse$outboundSchema, + EVMAddressActivityResponse$outboundSchema.and( + z.object({ eventType: z.literal("address_activity") }), + ), PrimaryNetworkAddressActivityResponse$outboundSchema, ValidatorActivityResponse$outboundSchema, ]); @@ -88,7 +92,9 @@ export const ListWebhooksResponse$inboundSchema: z.ZodType< nextPageToken: z.string().optional(), webhooks: z.array( z.union([ - EVMAddressActivityResponse$inboundSchema, + EVMAddressActivityResponse$inboundSchema.and( + z.object({ eventType: z.literal("address_activity") }), + ), PrimaryNetworkAddressActivityResponse$inboundSchema, ValidatorActivityResponse$inboundSchema, ]), @@ -98,7 +104,7 @@ export const ListWebhooksResponse$inboundSchema: z.ZodType< export type ListWebhooksResponse$Outbound = { nextPageToken?: string | undefined; webhooks: Array< - | EVMAddressActivityResponse$Outbound + | (EVMAddressActivityResponse$Outbound & { eventType: "address_activity" }) | PrimaryNetworkAddressActivityResponse$Outbound | ValidatorActivityResponse$Outbound >; @@ -113,7 +119,9 @@ export const ListWebhooksResponse$outboundSchema: z.ZodType< nextPageToken: z.string().optional(), webhooks: z.array( z.union([ - EVMAddressActivityResponse$outboundSchema, + EVMAddressActivityResponse$outboundSchema.and( + z.object({ eventType: z.literal("address_activity") }), + ), PrimaryNetworkAddressActivityResponse$outboundSchema, ValidatorActivityResponse$outboundSchema, ]), diff --git a/chainkit/src/models/components/nativetransaction.ts b/chainkit/src/models/components/nativetransaction.ts index 02032e1d..211b343b 100644 --- a/chainkit/src/models/components/nativetransaction.ts +++ b/chainkit/src/models/components/nativetransaction.ts @@ -25,9 +25,17 @@ export type NativeTransaction = { */ blockNumber: string; /** - * The block finality timestamp. + * The block creation (proposal) timestamp in seconds */ blockTimestamp: number; + /** + * The block creation (proposal) timestamp in milliseconds. Available only after Granite upgrade. + */ + blockTimestampMilliseconds?: number | undefined; + /** + * Minimum block delay in milliseconds. Available only after Granite upgrade. + */ + blockMinDelayExcess?: number | undefined; /** * The block hash identifier. */ @@ -82,6 +90,8 @@ export const NativeTransaction$inboundSchema: z.ZodType< > = z.object({ blockNumber: z.string(), blockTimestamp: z.number(), + blockTimestampMilliseconds: z.number().optional(), + blockMinDelayExcess: z.number().optional(), blockHash: z.string(), chainId: z.string(), blockIndex: z.number(), @@ -101,6 +111,8 @@ export const NativeTransaction$inboundSchema: z.ZodType< export type NativeTransaction$Outbound = { blockNumber: string; blockTimestamp: number; + blockTimestampMilliseconds?: number | undefined; + blockMinDelayExcess?: number | undefined; blockHash: string; chainId: string; blockIndex: number; @@ -125,6 +137,8 @@ export const NativeTransaction$outboundSchema: z.ZodType< > = z.object({ blockNumber: z.string(), blockTimestamp: z.number(), + blockTimestampMilliseconds: z.number().optional(), + blockMinDelayExcess: z.number().optional(), blockHash: z.string(), chainId: z.string(), blockIndex: z.number(), diff --git a/chainkit/src/models/components/pchaintransaction.ts b/chainkit/src/models/components/pchaintransaction.ts index 70e70864..1ed32a1e 100644 --- a/chainkit/src/models/components/pchaintransaction.ts +++ b/chainkit/src/models/components/pchaintransaction.ts @@ -61,7 +61,7 @@ export type PChainTransaction = { txHash: string; txType: PChainTransactionType; /** - * The block finality timestamp. + * The block creation (proposal) timestamp in seconds */ blockTimestamp: number; /** diff --git a/chainkit/src/models/components/pendingdelegatordetails.ts b/chainkit/src/models/components/pendingdelegatordetails.ts index 1d734920..be3aa425 100644 --- a/chainkit/src/models/components/pendingdelegatordetails.ts +++ b/chainkit/src/models/components/pendingdelegatordetails.ts @@ -4,17 +4,9 @@ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -export const PendingDelegatorDetailsDelegationStatus = { - Pending: "pending", -} as const; -export type PendingDelegatorDetailsDelegationStatus = ClosedEnum< - typeof PendingDelegatorDetailsDelegationStatus ->; - export type PendingDelegatorDetails = { txHash: string; nodeId: string; @@ -31,18 +23,9 @@ export type PendingDelegatorDetails = { * Estimated net rewards that will be distributed to the delegator after deducting delegation fee from the gross reward for the successful delegation. */ estimatedNetReward: string; - delegationStatus: PendingDelegatorDetailsDelegationStatus; + delegationStatus: "pending"; }; -/** @internal */ -export const PendingDelegatorDetailsDelegationStatus$inboundSchema: - z.ZodNativeEnum = z - .nativeEnum(PendingDelegatorDetailsDelegationStatus); -/** @internal */ -export const PendingDelegatorDetailsDelegationStatus$outboundSchema: - z.ZodNativeEnum = - PendingDelegatorDetailsDelegationStatus$inboundSchema; - /** @internal */ export const PendingDelegatorDetails$inboundSchema: z.ZodType< PendingDelegatorDetails, @@ -58,7 +41,7 @@ export const PendingDelegatorDetails$inboundSchema: z.ZodType< endTimestamp: z.number(), estimatedGrossReward: z.string(), estimatedNetReward: z.string(), - delegationStatus: PendingDelegatorDetailsDelegationStatus$inboundSchema, + delegationStatus: z.literal("pending"), }); /** @internal */ export type PendingDelegatorDetails$Outbound = { @@ -71,7 +54,7 @@ export type PendingDelegatorDetails$Outbound = { endTimestamp: number; estimatedGrossReward: string; estimatedNetReward: string; - delegationStatus: string; + delegationStatus: "pending"; }; /** @internal */ @@ -89,7 +72,7 @@ export const PendingDelegatorDetails$outboundSchema: z.ZodType< endTimestamp: z.number(), estimatedGrossReward: z.string(), estimatedNetReward: z.string(), - delegationStatus: PendingDelegatorDetailsDelegationStatus$outboundSchema, + delegationStatus: z.literal("pending"), }); export function pendingDelegatorDetailsToJSON( diff --git a/chainkit/src/models/components/pendingicmmessage.ts b/chainkit/src/models/components/pendingicmmessage.ts index e9205c49..3e2656e6 100644 --- a/chainkit/src/models/components/pendingicmmessage.ts +++ b/chainkit/src/models/components/pendingicmmessage.ts @@ -4,7 +4,6 @@ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { @@ -26,13 +25,6 @@ import { IcmSourceTransaction$outboundSchema, } from "./icmsourcetransaction.js"; -export const PendingIcmMessageStatus = { - Pending: "pending", -} as const; -export type PendingIcmMessageStatus = ClosedEnum< - typeof PendingIcmMessageStatus ->; - export type PendingIcmMessage = { messageId: string; icmContractAddress: string; @@ -49,18 +41,9 @@ export type PendingIcmMessage = { receiptDelivered: boolean; rewardDetails: IcmRewardDetails; sourceTransaction: IcmSourceTransaction; - status: PendingIcmMessageStatus; + status: "pending"; }; -/** @internal */ -export const PendingIcmMessageStatus$inboundSchema: z.ZodNativeEnum< - typeof PendingIcmMessageStatus -> = z.nativeEnum(PendingIcmMessageStatus); -/** @internal */ -export const PendingIcmMessageStatus$outboundSchema: z.ZodNativeEnum< - typeof PendingIcmMessageStatus -> = PendingIcmMessageStatus$inboundSchema; - /** @internal */ export const PendingIcmMessage$inboundSchema: z.ZodType< PendingIcmMessage, @@ -82,7 +65,7 @@ export const PendingIcmMessage$inboundSchema: z.ZodType< receiptDelivered: z.boolean(), rewardDetails: IcmRewardDetails$inboundSchema, sourceTransaction: IcmSourceTransaction$inboundSchema, - status: PendingIcmMessageStatus$inboundSchema, + status: z.literal("pending"), }); /** @internal */ export type PendingIcmMessage$Outbound = { @@ -101,7 +84,7 @@ export type PendingIcmMessage$Outbound = { receiptDelivered: boolean; rewardDetails: IcmRewardDetails$Outbound; sourceTransaction: IcmSourceTransaction$Outbound; - status: string; + status: "pending"; }; /** @internal */ @@ -125,7 +108,7 @@ export const PendingIcmMessage$outboundSchema: z.ZodType< receiptDelivered: z.boolean(), rewardDetails: IcmRewardDetails$outboundSchema, sourceTransaction: IcmSourceTransaction$outboundSchema, - status: PendingIcmMessageStatus$outboundSchema, + status: z.literal("pending"), }); export function pendingIcmMessageToJSON( diff --git a/chainkit/src/models/components/pendingteleportermessage.ts b/chainkit/src/models/components/pendingteleportermessage.ts index 71387399..126c2279 100644 --- a/chainkit/src/models/components/pendingteleportermessage.ts +++ b/chainkit/src/models/components/pendingteleportermessage.ts @@ -4,7 +4,6 @@ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { @@ -26,13 +25,6 @@ import { TeleporterSourceTransaction$outboundSchema, } from "./teleportersourcetransaction.js"; -export const PendingTeleporterMessageStatus = { - Pending: "pending", -} as const; -export type PendingTeleporterMessageStatus = ClosedEnum< - typeof PendingTeleporterMessageStatus ->; - export type PendingTeleporterMessage = { messageId: string; teleporterContractAddress: string; @@ -49,18 +41,9 @@ export type PendingTeleporterMessage = { receiptDelivered: boolean; rewardDetails: TeleporterRewardDetails; sourceTransaction: TeleporterSourceTransaction; - status: PendingTeleporterMessageStatus; + status: "pending"; }; -/** @internal */ -export const PendingTeleporterMessageStatus$inboundSchema: z.ZodNativeEnum< - typeof PendingTeleporterMessageStatus -> = z.nativeEnum(PendingTeleporterMessageStatus); -/** @internal */ -export const PendingTeleporterMessageStatus$outboundSchema: z.ZodNativeEnum< - typeof PendingTeleporterMessageStatus -> = PendingTeleporterMessageStatus$inboundSchema; - /** @internal */ export const PendingTeleporterMessage$inboundSchema: z.ZodType< PendingTeleporterMessage, @@ -82,7 +65,7 @@ export const PendingTeleporterMessage$inboundSchema: z.ZodType< receiptDelivered: z.boolean(), rewardDetails: TeleporterRewardDetails$inboundSchema, sourceTransaction: TeleporterSourceTransaction$inboundSchema, - status: PendingTeleporterMessageStatus$inboundSchema, + status: z.literal("pending"), }); /** @internal */ export type PendingTeleporterMessage$Outbound = { @@ -101,7 +84,7 @@ export type PendingTeleporterMessage$Outbound = { receiptDelivered: boolean; rewardDetails: TeleporterRewardDetails$Outbound; sourceTransaction: TeleporterSourceTransaction$Outbound; - status: string; + status: "pending"; }; /** @internal */ @@ -125,7 +108,7 @@ export const PendingTeleporterMessage$outboundSchema: z.ZodType< receiptDelivered: z.boolean(), rewardDetails: TeleporterRewardDetails$outboundSchema, sourceTransaction: TeleporterSourceTransaction$outboundSchema, - status: PendingTeleporterMessageStatus$outboundSchema, + status: z.literal("pending"), }); export function pendingTeleporterMessageToJSON( diff --git a/chainkit/src/models/components/pendingvalidatordetails.ts b/chainkit/src/models/components/pendingvalidatordetails.ts index 49da7907..5bcdb337 100644 --- a/chainkit/src/models/components/pendingvalidatordetails.ts +++ b/chainkit/src/models/components/pendingvalidatordetails.ts @@ -4,7 +4,6 @@ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { @@ -14,13 +13,6 @@ import { BlsCredentials$outboundSchema, } from "./blscredentials.js"; -export const PendingValidatorDetailsValidationStatus = { - Pending: "pending", -} as const; -export type PendingValidatorDetailsValidationStatus = ClosedEnum< - typeof PendingValidatorDetailsValidationStatus ->; - export type PendingValidatorDetails = { txHash: string; nodeId: string; @@ -36,18 +28,9 @@ export type PendingValidatorDetails = { * Present for AddPermissionlessValidatorTx */ blsCredentials?: BlsCredentials | undefined; - validationStatus: PendingValidatorDetailsValidationStatus; + validationStatus: "pending"; }; -/** @internal */ -export const PendingValidatorDetailsValidationStatus$inboundSchema: - z.ZodNativeEnum = z - .nativeEnum(PendingValidatorDetailsValidationStatus); -/** @internal */ -export const PendingValidatorDetailsValidationStatus$outboundSchema: - z.ZodNativeEnum = - PendingValidatorDetailsValidationStatus$inboundSchema; - /** @internal */ export const PendingValidatorDetails$inboundSchema: z.ZodType< PendingValidatorDetails, @@ -62,7 +45,7 @@ export const PendingValidatorDetails$inboundSchema: z.ZodType< startTimestamp: z.number(), endTimestamp: z.number(), blsCredentials: BlsCredentials$inboundSchema.optional(), - validationStatus: PendingValidatorDetailsValidationStatus$inboundSchema, + validationStatus: z.literal("pending"), }); /** @internal */ export type PendingValidatorDetails$Outbound = { @@ -74,7 +57,7 @@ export type PendingValidatorDetails$Outbound = { startTimestamp: number; endTimestamp: number; blsCredentials?: BlsCredentials$Outbound | undefined; - validationStatus: string; + validationStatus: "pending"; }; /** @internal */ @@ -91,7 +74,7 @@ export const PendingValidatorDetails$outboundSchema: z.ZodType< startTimestamp: z.number(), endTimestamp: z.number(), blsCredentials: BlsCredentials$outboundSchema.optional(), - validationStatus: PendingValidatorDetailsValidationStatus$outboundSchema, + validationStatus: z.literal("pending"), }); export function pendingValidatorDetailsToJSON( diff --git a/chainkit/src/models/components/primarynetworkaddressactivityeventtype.ts b/chainkit/src/models/components/primarynetworkaddressactivityeventtype.ts deleted file mode 100644 index 00febd5b..00000000 --- a/chainkit/src/models/components/primarynetworkaddressactivityeventtype.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; - -export const PrimaryNetworkAddressActivityEventType = { - PrimaryNetworkAddressActivity: "primary_network_address_activity", -} as const; -export type PrimaryNetworkAddressActivityEventType = ClosedEnum< - typeof PrimaryNetworkAddressActivityEventType ->; - -/** @internal */ -export const PrimaryNetworkAddressActivityEventType$inboundSchema: - z.ZodNativeEnum = z.nativeEnum( - PrimaryNetworkAddressActivityEventType, - ); -/** @internal */ -export const PrimaryNetworkAddressActivityEventType$outboundSchema: - z.ZodNativeEnum = - PrimaryNetworkAddressActivityEventType$inboundSchema; diff --git a/chainkit/src/models/components/primarynetworkaddressactivityrequest.ts b/chainkit/src/models/components/primarynetworkaddressactivityrequest.ts index ddbed3c6..c212e705 100644 --- a/chainkit/src/models/components/primarynetworkaddressactivityrequest.ts +++ b/chainkit/src/models/components/primarynetworkaddressactivityrequest.ts @@ -4,7 +4,6 @@ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { @@ -19,13 +18,6 @@ import { PrimaryNetworkType$outboundSchema, } from "./primarynetworktype.js"; -export const PrimaryNetworkAddressActivityRequestEventType = { - PrimaryNetworkAddressActivity: "primary_network_address_activity", -} as const; -export type PrimaryNetworkAddressActivityRequestEventType = ClosedEnum< - typeof PrimaryNetworkAddressActivityRequestEventType ->; - /** * Metadata for platform address activity event */ @@ -33,7 +25,7 @@ export type PrimaryNetworkAddressActivityRequestMetadata = PrimaryNetworkAddressActivityMetadata; export type PrimaryNetworkAddressActivityRequest = { - eventType: PrimaryNetworkAddressActivityRequestEventType; + eventType: "primary_network_address_activity"; url: string; name?: string | undefined; description?: string | undefined; @@ -45,15 +37,6 @@ export type PrimaryNetworkAddressActivityRequest = { metadata: PrimaryNetworkAddressActivityMetadata; }; -/** @internal */ -export const PrimaryNetworkAddressActivityRequestEventType$inboundSchema: - z.ZodNativeEnum = z - .nativeEnum(PrimaryNetworkAddressActivityRequestEventType); -/** @internal */ -export const PrimaryNetworkAddressActivityRequestEventType$outboundSchema: - z.ZodNativeEnum = - PrimaryNetworkAddressActivityRequestEventType$inboundSchema; - /** @internal */ export const PrimaryNetworkAddressActivityRequestMetadata$inboundSchema: z.ZodType< @@ -105,7 +88,7 @@ export const PrimaryNetworkAddressActivityRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - eventType: PrimaryNetworkAddressActivityRequestEventType$inboundSchema, + eventType: z.literal("primary_network_address_activity"), url: z.string(), name: z.string().optional(), description: z.string().optional(), @@ -115,7 +98,7 @@ export const PrimaryNetworkAddressActivityRequest$inboundSchema: z.ZodType< }); /** @internal */ export type PrimaryNetworkAddressActivityRequest$Outbound = { - eventType: string; + eventType: "primary_network_address_activity"; url: string; name?: string | undefined; description?: string | undefined; @@ -130,7 +113,7 @@ export const PrimaryNetworkAddressActivityRequest$outboundSchema: z.ZodType< z.ZodTypeDef, PrimaryNetworkAddressActivityRequest > = z.object({ - eventType: PrimaryNetworkAddressActivityRequestEventType$outboundSchema, + eventType: z.literal("primary_network_address_activity"), url: z.string(), name: z.string().optional(), description: z.string().optional(), diff --git a/chainkit/src/models/components/primarynetworkaddressactivityresponse.ts b/chainkit/src/models/components/primarynetworkaddressactivityresponse.ts index 2181579d..e08b32c2 100644 --- a/chainkit/src/models/components/primarynetworkaddressactivityresponse.ts +++ b/chainkit/src/models/components/primarynetworkaddressactivityresponse.ts @@ -6,11 +6,6 @@ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - PrimaryNetworkAddressActivityEventType, - PrimaryNetworkAddressActivityEventType$inboundSchema, - PrimaryNetworkAddressActivityEventType$outboundSchema, -} from "./primarynetworkaddressactivityeventtype.js"; import { PrimaryNetworkAddressActivityMetadata, PrimaryNetworkAddressActivityMetadata$inboundSchema, @@ -31,7 +26,7 @@ export type PrimaryNetworkAddressActivityResponse = { createdAt: number; name: string; description: string; - eventType: PrimaryNetworkAddressActivityEventType; + eventType: "primary_network_address_activity"; metadata: PrimaryNetworkAddressActivityMetadata; }; @@ -48,7 +43,7 @@ export const PrimaryNetworkAddressActivityResponse$inboundSchema: z.ZodType< createdAt: z.number(), name: z.string(), description: z.string(), - eventType: PrimaryNetworkAddressActivityEventType$inboundSchema, + eventType: z.literal("primary_network_address_activity"), metadata: PrimaryNetworkAddressActivityMetadata$inboundSchema, }); /** @internal */ @@ -60,7 +55,7 @@ export type PrimaryNetworkAddressActivityResponse$Outbound = { createdAt: number; name: string; description: string; - eventType: string; + eventType: "primary_network_address_activity"; metadata: PrimaryNetworkAddressActivityMetadata$Outbound; }; @@ -77,7 +72,7 @@ export const PrimaryNetworkAddressActivityResponse$outboundSchema: z.ZodType< createdAt: z.number(), name: z.string(), description: z.string(), - eventType: PrimaryNetworkAddressActivityEventType$outboundSchema, + eventType: z.literal("primary_network_address_activity"), metadata: PrimaryNetworkAddressActivityMetadata$outboundSchema, }); diff --git a/chainkit/src/models/components/removedvalidatordetails.ts b/chainkit/src/models/components/removedvalidatordetails.ts index 403fdfdd..84d560be 100644 --- a/chainkit/src/models/components/removedvalidatordetails.ts +++ b/chainkit/src/models/components/removedvalidatordetails.ts @@ -4,7 +4,6 @@ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { @@ -14,13 +13,6 @@ import { BlsCredentials$outboundSchema, } from "./blscredentials.js"; -export const RemovedValidatorDetailsValidationStatus = { - Removed: "removed", -} as const; -export type RemovedValidatorDetailsValidationStatus = ClosedEnum< - typeof RemovedValidatorDetailsValidationStatus ->; - export type RemovedValidatorDetails = { txHash: string; nodeId: string; @@ -44,18 +36,9 @@ export type RemovedValidatorDetails = { * The timestamp of the transaction that removed the permissioned subnet validator. */ removeTimestamp: number; - validationStatus: RemovedValidatorDetailsValidationStatus; + validationStatus: "removed"; }; -/** @internal */ -export const RemovedValidatorDetailsValidationStatus$inboundSchema: - z.ZodNativeEnum = z - .nativeEnum(RemovedValidatorDetailsValidationStatus); -/** @internal */ -export const RemovedValidatorDetailsValidationStatus$outboundSchema: - z.ZodNativeEnum = - RemovedValidatorDetailsValidationStatus$inboundSchema; - /** @internal */ export const RemovedValidatorDetails$inboundSchema: z.ZodType< RemovedValidatorDetails, @@ -72,7 +55,7 @@ export const RemovedValidatorDetails$inboundSchema: z.ZodType< blsCredentials: BlsCredentials$inboundSchema.optional(), removeTxHash: z.string(), removeTimestamp: z.number(), - validationStatus: RemovedValidatorDetailsValidationStatus$inboundSchema, + validationStatus: z.literal("removed"), }); /** @internal */ export type RemovedValidatorDetails$Outbound = { @@ -86,7 +69,7 @@ export type RemovedValidatorDetails$Outbound = { blsCredentials?: BlsCredentials$Outbound | undefined; removeTxHash: string; removeTimestamp: number; - validationStatus: string; + validationStatus: "removed"; }; /** @internal */ @@ -105,7 +88,7 @@ export const RemovedValidatorDetails$outboundSchema: z.ZodType< blsCredentials: BlsCredentials$outboundSchema.optional(), removeTxHash: z.string(), removeTimestamp: z.number(), - validationStatus: RemovedValidatorDetailsValidationStatus$outboundSchema, + validationStatus: z.literal("removed"), }); export function removedValidatorDetailsToJSON( diff --git a/chainkit/src/models/components/unknowncontract.ts b/chainkit/src/models/components/unknowncontract.ts index 080b9a0b..a2307f2a 100644 --- a/chainkit/src/models/components/unknowncontract.ts +++ b/chainkit/src/models/components/unknowncontract.ts @@ -4,7 +4,6 @@ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { @@ -26,11 +25,6 @@ import { ResourceLink$outboundSchema, } from "./resourcelink.js"; -export const UnknownContractErcType = { - Unknown: "UNKNOWN", -} as const; -export type UnknownContractErcType = ClosedEnum; - export type UnknownContract = { /** * The contract name. @@ -49,18 +43,9 @@ export type UnknownContract = { */ address: string; deploymentDetails?: ContractDeploymentDetails | undefined; - ercType: UnknownContractErcType; + ercType: "UNKNOWN"; }; -/** @internal */ -export const UnknownContractErcType$inboundSchema: z.ZodNativeEnum< - typeof UnknownContractErcType -> = z.nativeEnum(UnknownContractErcType); -/** @internal */ -export const UnknownContractErcType$outboundSchema: z.ZodNativeEnum< - typeof UnknownContractErcType -> = UnknownContractErcType$inboundSchema; - /** @internal */ export const UnknownContract$inboundSchema: z.ZodType< UnknownContract, @@ -78,7 +63,7 @@ export const UnknownContract$inboundSchema: z.ZodType< tags: z.array(z.string()).optional(), address: z.string(), deploymentDetails: ContractDeploymentDetails$inboundSchema.optional(), - ercType: UnknownContractErcType$inboundSchema, + ercType: z.literal("UNKNOWN"), }); /** @internal */ export type UnknownContract$Outbound = { @@ -93,7 +78,7 @@ export type UnknownContract$Outbound = { tags?: Array | undefined; address: string; deploymentDetails?: ContractDeploymentDetails$Outbound | undefined; - ercType: string; + ercType: "UNKNOWN"; }; /** @internal */ @@ -113,7 +98,7 @@ export const UnknownContract$outboundSchema: z.ZodType< tags: z.array(z.string()).optional(), address: z.string(), deploymentDetails: ContractDeploymentDetails$outboundSchema.optional(), - ercType: UnknownContractErcType$outboundSchema, + ercType: z.literal("UNKNOWN"), }); export function unknownContractToJSON( diff --git a/chainkit/src/models/components/validatoractivityeventtype.ts b/chainkit/src/models/components/validatoractivityeventtype.ts deleted file mode 100644 index 18f31d18..00000000 --- a/chainkit/src/models/components/validatoractivityeventtype.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; - -export const ValidatorActivityEventType = { - ValidatorActivity: "validator_activity", -} as const; -export type ValidatorActivityEventType = ClosedEnum< - typeof ValidatorActivityEventType ->; - -/** @internal */ -export const ValidatorActivityEventType$inboundSchema: z.ZodNativeEnum< - typeof ValidatorActivityEventType -> = z.nativeEnum(ValidatorActivityEventType); -/** @internal */ -export const ValidatorActivityEventType$outboundSchema: z.ZodNativeEnum< - typeof ValidatorActivityEventType -> = ValidatorActivityEventType$inboundSchema; diff --git a/chainkit/src/models/components/validatoractivityrequest.ts b/chainkit/src/models/components/validatoractivityrequest.ts index 2c91d12b..aafd1718 100644 --- a/chainkit/src/models/components/validatoractivityrequest.ts +++ b/chainkit/src/models/components/validatoractivityrequest.ts @@ -4,7 +4,6 @@ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { @@ -19,20 +18,13 @@ import { ValidatorActivityMetadata$outboundSchema, } from "./validatoractivitymetadata.js"; -export const ValidatorActivityRequestEventType = { - ValidatorActivity: "validator_activity", -} as const; -export type ValidatorActivityRequestEventType = ClosedEnum< - typeof ValidatorActivityRequestEventType ->; - /** * Metadata for platform validator activity event */ export type ValidatorActivityRequestMetadata = ValidatorActivityMetadata; export type ValidatorActivityRequest = { - eventType: ValidatorActivityRequestEventType; + eventType: "validator_activity"; url: string; name?: string | undefined; description?: string | undefined; @@ -43,15 +35,6 @@ export type ValidatorActivityRequest = { metadata: ValidatorActivityMetadata; }; -/** @internal */ -export const ValidatorActivityRequestEventType$inboundSchema: z.ZodNativeEnum< - typeof ValidatorActivityRequestEventType -> = z.nativeEnum(ValidatorActivityRequestEventType); -/** @internal */ -export const ValidatorActivityRequestEventType$outboundSchema: z.ZodNativeEnum< - typeof ValidatorActivityRequestEventType -> = ValidatorActivityRequestEventType$inboundSchema; - /** @internal */ export const ValidatorActivityRequestMetadata$inboundSchema: z.ZodType< ValidatorActivityRequestMetadata, @@ -94,7 +77,7 @@ export const ValidatorActivityRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - eventType: ValidatorActivityRequestEventType$inboundSchema, + eventType: z.literal("validator_activity"), url: z.string(), name: z.string().optional(), description: z.string().optional(), @@ -103,7 +86,7 @@ export const ValidatorActivityRequest$inboundSchema: z.ZodType< }); /** @internal */ export type ValidatorActivityRequest$Outbound = { - eventType: string; + eventType: "validator_activity"; url: string; name?: string | undefined; description?: string | undefined; @@ -117,7 +100,7 @@ export const ValidatorActivityRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ValidatorActivityRequest > = z.object({ - eventType: ValidatorActivityRequestEventType$outboundSchema, + eventType: z.literal("validator_activity"), url: z.string(), name: z.string().optional(), description: z.string().optional(), diff --git a/chainkit/src/models/components/validatoractivityresponse.ts b/chainkit/src/models/components/validatoractivityresponse.ts index 86f324d9..8fc522dc 100644 --- a/chainkit/src/models/components/validatoractivityresponse.ts +++ b/chainkit/src/models/components/validatoractivityresponse.ts @@ -6,11 +6,6 @@ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - ValidatorActivityEventType, - ValidatorActivityEventType$inboundSchema, - ValidatorActivityEventType$outboundSchema, -} from "./validatoractivityeventtype.js"; import { ValidatorActivityMetadata, ValidatorActivityMetadata$inboundSchema, @@ -31,7 +26,7 @@ export type ValidatorActivityResponse = { createdAt: number; name: string; description: string; - eventType: ValidatorActivityEventType; + eventType: "validator_activity"; metadata: ValidatorActivityMetadata; }; @@ -48,7 +43,7 @@ export const ValidatorActivityResponse$inboundSchema: z.ZodType< createdAt: z.number(), name: z.string(), description: z.string(), - eventType: ValidatorActivityEventType$inboundSchema, + eventType: z.literal("validator_activity"), metadata: ValidatorActivityMetadata$inboundSchema, }); /** @internal */ @@ -60,7 +55,7 @@ export type ValidatorActivityResponse$Outbound = { createdAt: number; name: string; description: string; - eventType: string; + eventType: "validator_activity"; metadata: ValidatorActivityMetadata$Outbound; }; @@ -77,7 +72,7 @@ export const ValidatorActivityResponse$outboundSchema: z.ZodType< createdAt: z.number(), name: z.string(), description: z.string(), - eventType: ValidatorActivityEventType$outboundSchema, + eventType: z.literal("validator_activity"), metadata: ValidatorActivityMetadata$outboundSchema, }); diff --git a/chainkit/src/models/components/webhookaddressactivityresponse.ts b/chainkit/src/models/components/webhookaddressactivityresponse.ts index fc04d1b9..a561778d 100644 --- a/chainkit/src/models/components/webhookaddressactivityresponse.ts +++ b/chainkit/src/models/components/webhookaddressactivityresponse.ts @@ -17,15 +17,13 @@ import { /** * Event type */ -export const WebhookAddressActivityResponseEventType = { +export const EventTypeEnum = { AddressActivity: "address_activity", } as const; /** * Event type */ -export type WebhookAddressActivityResponseEventType = ClosedEnum< - typeof WebhookAddressActivityResponseEventType ->; +export type EventTypeEnum = ClosedEnum; export type WebhookAddressActivityResponse = { /** @@ -35,7 +33,7 @@ export type WebhookAddressActivityResponse = { /** * Event type */ - eventType: WebhookAddressActivityResponseEventType; + eventType: EventTypeEnum; /** * Message ID */ @@ -47,13 +45,13 @@ export type WebhookAddressActivityResponse = { }; /** @internal */ -export const WebhookAddressActivityResponseEventType$inboundSchema: - z.ZodNativeEnum = z - .nativeEnum(WebhookAddressActivityResponseEventType); +export const EventTypeEnum$inboundSchema: z.ZodNativeEnum< + typeof EventTypeEnum +> = z.nativeEnum(EventTypeEnum); /** @internal */ -export const WebhookAddressActivityResponseEventType$outboundSchema: - z.ZodNativeEnum = - WebhookAddressActivityResponseEventType$inboundSchema; +export const EventTypeEnum$outboundSchema: z.ZodNativeEnum< + typeof EventTypeEnum +> = EventTypeEnum$inboundSchema; /** @internal */ export const WebhookAddressActivityResponse$inboundSchema: z.ZodType< @@ -62,7 +60,7 @@ export const WebhookAddressActivityResponse$inboundSchema: z.ZodType< unknown > = z.object({ webhookId: z.string(), - eventType: WebhookAddressActivityResponseEventType$inboundSchema, + eventType: EventTypeEnum$inboundSchema, messageId: z.string(), event: TransactionEvent$inboundSchema, }); @@ -81,7 +79,7 @@ export const WebhookAddressActivityResponse$outboundSchema: z.ZodType< WebhookAddressActivityResponse > = z.object({ webhookId: z.string(), - eventType: WebhookAddressActivityResponseEventType$outboundSchema, + eventType: EventTypeEnum$outboundSchema, messageId: z.string(), event: TransactionEvent$outboundSchema, }); diff --git a/chainkit/src/models/operations/createwebhook.ts b/chainkit/src/models/operations/createwebhook.ts index 6e283f7f..875ccfae 100644 --- a/chainkit/src/models/operations/createwebhook.ts +++ b/chainkit/src/models/operations/createwebhook.ts @@ -13,15 +13,15 @@ export const CreateWebhookServerList = [ ] as const; export type CreateWebhookRequest = - | components.PrimaryNetworkAddressActivityRequest | components.EVMAddressActivityRequest + | components.PrimaryNetworkAddressActivityRequest | components.ValidatorActivityRequest; /** * Successful response */ export type CreateWebhookResponse = - | components.EVMAddressActivityResponse + | (components.EVMAddressActivityResponse & { eventType: "address_activity" }) | components.PrimaryNetworkAddressActivityResponse | components.ValidatorActivityResponse; @@ -31,14 +31,14 @@ export const CreateWebhookRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.union([ - components.PrimaryNetworkAddressActivityRequest$inboundSchema, components.EVMAddressActivityRequest$inboundSchema, + components.PrimaryNetworkAddressActivityRequest$inboundSchema, components.ValidatorActivityRequest$inboundSchema, ]); /** @internal */ export type CreateWebhookRequest$Outbound = - | components.PrimaryNetworkAddressActivityRequest$Outbound | components.EVMAddressActivityRequest$Outbound + | components.PrimaryNetworkAddressActivityRequest$Outbound | components.ValidatorActivityRequest$Outbound; /** @internal */ @@ -47,8 +47,8 @@ export const CreateWebhookRequest$outboundSchema: z.ZodType< z.ZodTypeDef, CreateWebhookRequest > = z.union([ - components.PrimaryNetworkAddressActivityRequest$outboundSchema, components.EVMAddressActivityRequest$outboundSchema, + components.PrimaryNetworkAddressActivityRequest$outboundSchema, components.ValidatorActivityRequest$outboundSchema, ]); @@ -75,13 +75,17 @@ export const CreateWebhookResponse$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.union([ - components.EVMAddressActivityResponse$inboundSchema, + components.EVMAddressActivityResponse$inboundSchema.and( + z.object({ eventType: z.literal("address_activity") }), + ), components.PrimaryNetworkAddressActivityResponse$inboundSchema, components.ValidatorActivityResponse$inboundSchema, ]); /** @internal */ export type CreateWebhookResponse$Outbound = - | components.EVMAddressActivityResponse$Outbound + | (components.EVMAddressActivityResponse$Outbound & { + eventType: "address_activity"; + }) | components.PrimaryNetworkAddressActivityResponse$Outbound | components.ValidatorActivityResponse$Outbound; @@ -91,7 +95,9 @@ export const CreateWebhookResponse$outboundSchema: z.ZodType< z.ZodTypeDef, CreateWebhookResponse > = z.union([ - components.EVMAddressActivityResponse$outboundSchema, + components.EVMAddressActivityResponse$outboundSchema.and( + z.object({ eventType: z.literal("address_activity") }), + ), components.PrimaryNetworkAddressActivityResponse$outboundSchema, components.ValidatorActivityResponse$outboundSchema, ]); diff --git a/chainkit/src/models/operations/deactivatewebhook.ts b/chainkit/src/models/operations/deactivatewebhook.ts index c9ecc7b3..d062230a 100644 --- a/chainkit/src/models/operations/deactivatewebhook.ts +++ b/chainkit/src/models/operations/deactivatewebhook.ts @@ -23,7 +23,7 @@ export type DeactivateWebhookRequest = { * Successful response */ export type DeactivateWebhookResponse = - | components.EVMAddressActivityResponse + | (components.EVMAddressActivityResponse & { eventType: "address_activity" }) | components.PrimaryNetworkAddressActivityResponse | components.ValidatorActivityResponse; @@ -72,13 +72,17 @@ export const DeactivateWebhookResponse$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.union([ - components.EVMAddressActivityResponse$inboundSchema, + components.EVMAddressActivityResponse$inboundSchema.and( + z.object({ eventType: z.literal("address_activity") }), + ), components.PrimaryNetworkAddressActivityResponse$inboundSchema, components.ValidatorActivityResponse$inboundSchema, ]); /** @internal */ export type DeactivateWebhookResponse$Outbound = - | components.EVMAddressActivityResponse$Outbound + | (components.EVMAddressActivityResponse$Outbound & { + eventType: "address_activity"; + }) | components.PrimaryNetworkAddressActivityResponse$Outbound | components.ValidatorActivityResponse$Outbound; @@ -88,7 +92,9 @@ export const DeactivateWebhookResponse$outboundSchema: z.ZodType< z.ZodTypeDef, DeactivateWebhookResponse > = z.union([ - components.EVMAddressActivityResponse$outboundSchema, + components.EVMAddressActivityResponse$outboundSchema.and( + z.object({ eventType: z.literal("address_activity") }), + ), components.PrimaryNetworkAddressActivityResponse$outboundSchema, components.ValidatorActivityResponse$outboundSchema, ]); diff --git a/chainkit/src/models/operations/getcontractmetadata.ts b/chainkit/src/models/operations/getcontractmetadata.ts index 1c856651..67bbed3c 100644 --- a/chainkit/src/models/operations/getcontractmetadata.ts +++ b/chainkit/src/models/operations/getcontractmetadata.ts @@ -34,10 +34,10 @@ export type GetContractMetadataRequest = { * Successful response */ export type GetContractMetadataResponse = - | (components.Erc20Contract & { ercType: "ERC-20" }) - | (components.Erc721Contract & { ercType: "ERC-721" }) - | (components.Erc1155Contract & { ercType: "ERC-1155" }) - | (components.UnknownContract & { ercType: "UNKNOWN" }); + | components.Erc721Contract + | components.Erc1155Contract + | components.Erc20Contract + | components.UnknownContract; /** @internal */ export const GetContractMetadataGlobals$inboundSchema: z.ZodType< @@ -126,33 +126,17 @@ export const GetContractMetadataResponse$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.union([ - components.Erc20Contract$inboundSchema.and( - z.object({ ercType: z.literal("ERC-20") }).transform((v) => ({ - ercType: v.ercType, - })), - ), - components.Erc721Contract$inboundSchema.and( - z.object({ ercType: z.literal("ERC-721") }).transform((v) => ({ - ercType: v.ercType, - })), - ), - components.Erc1155Contract$inboundSchema.and( - z.object({ ercType: z.literal("ERC-1155") }).transform((v) => ({ - ercType: v.ercType, - })), - ), - components.UnknownContract$inboundSchema.and( - z.object({ ercType: z.literal("UNKNOWN") }).transform((v) => ({ - ercType: v.ercType, - })), - ), + components.Erc721Contract$inboundSchema, + components.Erc1155Contract$inboundSchema, + components.Erc20Contract$inboundSchema, + components.UnknownContract$inboundSchema, ]); /** @internal */ export type GetContractMetadataResponse$Outbound = - | (components.Erc20Contract$Outbound & { ercType: "ERC-20" }) - | (components.Erc721Contract$Outbound & { ercType: "ERC-721" }) - | (components.Erc1155Contract$Outbound & { ercType: "ERC-1155" }) - | (components.UnknownContract$Outbound & { ercType: "UNKNOWN" }); + | components.Erc721Contract$Outbound + | components.Erc1155Contract$Outbound + | components.Erc20Contract$Outbound + | components.UnknownContract$Outbound; /** @internal */ export const GetContractMetadataResponse$outboundSchema: z.ZodType< @@ -160,26 +144,10 @@ export const GetContractMetadataResponse$outboundSchema: z.ZodType< z.ZodTypeDef, GetContractMetadataResponse > = z.union([ - components.Erc20Contract$outboundSchema.and( - z.object({ ercType: z.literal("ERC-20") }).transform((v) => ({ - ercType: v.ercType, - })), - ), - components.Erc721Contract$outboundSchema.and( - z.object({ ercType: z.literal("ERC-721") }).transform((v) => ({ - ercType: v.ercType, - })), - ), - components.Erc1155Contract$outboundSchema.and( - z.object({ ercType: z.literal("ERC-1155") }).transform((v) => ({ - ercType: v.ercType, - })), - ), - components.UnknownContract$outboundSchema.and( - z.object({ ercType: z.literal("UNKNOWN") }).transform((v) => ({ - ercType: v.ercType, - })), - ), + components.Erc721Contract$outboundSchema, + components.Erc1155Contract$outboundSchema, + components.Erc20Contract$outboundSchema, + components.UnknownContract$outboundSchema, ]); export function getContractMetadataResponseToJSON( diff --git a/chainkit/src/models/operations/geticmmessage.ts b/chainkit/src/models/operations/geticmmessage.ts index 5cd82f00..1fbdf64a 100644 --- a/chainkit/src/models/operations/geticmmessage.ts +++ b/chainkit/src/models/operations/geticmmessage.ts @@ -23,11 +23,9 @@ export type GetIcmMessageRequest = { * Successful response */ export type GetIcmMessageResponse = - | (components.DeliveredIcmMessage & { status: "delivered" }) - | (components.PendingIcmMessage & { status: "pending" }) - | (components.DeliveredSourceNotIndexedIcmMessage & { - status: "delivered_source_not_indexed"; - }); + | components.PendingIcmMessage + | components.DeliveredIcmMessage + | components.DeliveredSourceNotIndexedIcmMessage; /** @internal */ export const GetIcmMessageRequest$inboundSchema: z.ZodType< @@ -74,29 +72,15 @@ export const GetIcmMessageResponse$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.union([ - components.DeliveredIcmMessage$inboundSchema.and( - z.object({ status: z.literal("delivered") }).transform((v) => ({ - status: v.status, - })), - ), - components.PendingIcmMessage$inboundSchema.and( - z.object({ status: z.literal("pending") }).transform((v) => ({ - status: v.status, - })), - ), - components.DeliveredSourceNotIndexedIcmMessage$inboundSchema.and( - z.object({ status: z.literal("delivered_source_not_indexed") }).transform(( - v, - ) => ({ status: v.status })), - ), + components.PendingIcmMessage$inboundSchema, + components.DeliveredIcmMessage$inboundSchema, + components.DeliveredSourceNotIndexedIcmMessage$inboundSchema, ]); /** @internal */ export type GetIcmMessageResponse$Outbound = - | (components.DeliveredIcmMessage$Outbound & { status: "delivered" }) - | (components.PendingIcmMessage$Outbound & { status: "pending" }) - | (components.DeliveredSourceNotIndexedIcmMessage$Outbound & { - status: "delivered_source_not_indexed"; - }); + | components.PendingIcmMessage$Outbound + | components.DeliveredIcmMessage$Outbound + | components.DeliveredSourceNotIndexedIcmMessage$Outbound; /** @internal */ export const GetIcmMessageResponse$outboundSchema: z.ZodType< @@ -104,21 +88,9 @@ export const GetIcmMessageResponse$outboundSchema: z.ZodType< z.ZodTypeDef, GetIcmMessageResponse > = z.union([ - components.DeliveredIcmMessage$outboundSchema.and( - z.object({ status: z.literal("delivered") }).transform((v) => ({ - status: v.status, - })), - ), - components.PendingIcmMessage$outboundSchema.and( - z.object({ status: z.literal("pending") }).transform((v) => ({ - status: v.status, - })), - ), - components.DeliveredSourceNotIndexedIcmMessage$outboundSchema.and( - z.object({ status: z.literal("delivered_source_not_indexed") }).transform(( - v, - ) => ({ status: v.status })), - ), + components.PendingIcmMessage$outboundSchema, + components.DeliveredIcmMessage$outboundSchema, + components.DeliveredSourceNotIndexedIcmMessage$outboundSchema, ]); export function getIcmMessageResponseToJSON( diff --git a/chainkit/src/models/operations/getteleportermessage.ts b/chainkit/src/models/operations/getteleportermessage.ts index 49a4e450..469732aa 100644 --- a/chainkit/src/models/operations/getteleportermessage.ts +++ b/chainkit/src/models/operations/getteleportermessage.ts @@ -23,11 +23,9 @@ export type GetTeleporterMessageRequest = { * Successful response */ export type GetTeleporterMessageResponse = - | (components.DeliveredTeleporterMessage & { status: "delivered" }) - | (components.PendingTeleporterMessage & { status: "pending" }) - | (components.DeliveredSourceNotIndexedTeleporterMessage & { - status: "delivered_source_not_indexed"; - }); + | components.PendingTeleporterMessage + | components.DeliveredTeleporterMessage + | components.DeliveredSourceNotIndexedTeleporterMessage; /** @internal */ export const GetTeleporterMessageRequest$inboundSchema: z.ZodType< @@ -76,29 +74,15 @@ export const GetTeleporterMessageResponse$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.union([ - components.DeliveredTeleporterMessage$inboundSchema.and( - z.object({ status: z.literal("delivered") }).transform((v) => ({ - status: v.status, - })), - ), - components.PendingTeleporterMessage$inboundSchema.and( - z.object({ status: z.literal("pending") }).transform((v) => ({ - status: v.status, - })), - ), - components.DeliveredSourceNotIndexedTeleporterMessage$inboundSchema.and( - z.object({ status: z.literal("delivered_source_not_indexed") }).transform(( - v, - ) => ({ status: v.status })), - ), + components.PendingTeleporterMessage$inboundSchema, + components.DeliveredTeleporterMessage$inboundSchema, + components.DeliveredSourceNotIndexedTeleporterMessage$inboundSchema, ]); /** @internal */ export type GetTeleporterMessageResponse$Outbound = - | (components.DeliveredTeleporterMessage$Outbound & { status: "delivered" }) - | (components.PendingTeleporterMessage$Outbound & { status: "pending" }) - | (components.DeliveredSourceNotIndexedTeleporterMessage$Outbound & { - status: "delivered_source_not_indexed"; - }); + | components.PendingTeleporterMessage$Outbound + | components.DeliveredTeleporterMessage$Outbound + | components.DeliveredSourceNotIndexedTeleporterMessage$Outbound; /** @internal */ export const GetTeleporterMessageResponse$outboundSchema: z.ZodType< @@ -106,21 +90,9 @@ export const GetTeleporterMessageResponse$outboundSchema: z.ZodType< z.ZodTypeDef, GetTeleporterMessageResponse > = z.union([ - components.DeliveredTeleporterMessage$outboundSchema.and( - z.object({ status: z.literal("delivered") }).transform((v) => ({ - status: v.status, - })), - ), - components.PendingTeleporterMessage$outboundSchema.and( - z.object({ status: z.literal("pending") }).transform((v) => ({ - status: v.status, - })), - ), - components.DeliveredSourceNotIndexedTeleporterMessage$outboundSchema.and( - z.object({ status: z.literal("delivered_source_not_indexed") }).transform(( - v, - ) => ({ status: v.status })), - ), + components.PendingTeleporterMessage$outboundSchema, + components.DeliveredTeleporterMessage$outboundSchema, + components.DeliveredSourceNotIndexedTeleporterMessage$outboundSchema, ]); export function getTeleporterMessageResponseToJSON( diff --git a/chainkit/src/models/operations/gettokendetails.ts b/chainkit/src/models/operations/gettokendetails.ts index f6c7ab73..5b41338d 100644 --- a/chainkit/src/models/operations/gettokendetails.ts +++ b/chainkit/src/models/operations/gettokendetails.ts @@ -132,14 +132,10 @@ export const GetTokenDetailsResponse$inboundSchema: z.ZodType< unknown > = z.union([ components.Erc721Token$inboundSchema.and( - z.object({ ercType: z.literal("ERC-721") }).transform((v) => ({ - ercType: v.ercType, - })), + z.object({ ercType: z.literal("ERC-721") }), ), components.Erc1155Token$inboundSchema.and( - z.object({ ercType: z.literal("ERC-1155") }).transform((v) => ({ - ercType: v.ercType, - })), + z.object({ ercType: z.literal("ERC-1155") }), ), ]); /** @internal */ @@ -154,14 +150,10 @@ export const GetTokenDetailsResponse$outboundSchema: z.ZodType< GetTokenDetailsResponse > = z.union([ components.Erc721Token$outboundSchema.and( - z.object({ ercType: z.literal("ERC-721") }).transform((v) => ({ - ercType: v.ercType, - })), + z.object({ ercType: z.literal("ERC-721") }), ), components.Erc1155Token$outboundSchema.and( - z.object({ ercType: z.literal("ERC-1155") }).transform((v) => ({ - ercType: v.ercType, - })), + z.object({ ercType: z.literal("ERC-1155") }), ), ]); diff --git a/chainkit/src/models/operations/getwebhook.ts b/chainkit/src/models/operations/getwebhook.ts index 5a450768..2f3ce7ea 100644 --- a/chainkit/src/models/operations/getwebhook.ts +++ b/chainkit/src/models/operations/getwebhook.ts @@ -23,7 +23,7 @@ export type GetWebhookRequest = { * Successful response */ export type GetWebhookResponse = - | components.EVMAddressActivityResponse + | (components.EVMAddressActivityResponse & { eventType: "address_activity" }) | components.PrimaryNetworkAddressActivityResponse | components.ValidatorActivityResponse; @@ -72,13 +72,17 @@ export const GetWebhookResponse$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.union([ - components.EVMAddressActivityResponse$inboundSchema, + components.EVMAddressActivityResponse$inboundSchema.and( + z.object({ eventType: z.literal("address_activity") }), + ), components.PrimaryNetworkAddressActivityResponse$inboundSchema, components.ValidatorActivityResponse$inboundSchema, ]); /** @internal */ export type GetWebhookResponse$Outbound = - | components.EVMAddressActivityResponse$Outbound + | (components.EVMAddressActivityResponse$Outbound & { + eventType: "address_activity"; + }) | components.PrimaryNetworkAddressActivityResponse$Outbound | components.ValidatorActivityResponse$Outbound; @@ -88,7 +92,9 @@ export const GetWebhookResponse$outboundSchema: z.ZodType< z.ZodTypeDef, GetWebhookResponse > = z.union([ - components.EVMAddressActivityResponse$outboundSchema, + components.EVMAddressActivityResponse$outboundSchema.and( + z.object({ eventType: z.literal("address_activity") }), + ), components.PrimaryNetworkAddressActivityResponse$outboundSchema, components.ValidatorActivityResponse$outboundSchema, ]); diff --git a/chainkit/src/models/operations/posttransactionexportjob.ts b/chainkit/src/models/operations/posttransactionexportjob.ts index 7a6b4b8a..528264a9 100644 --- a/chainkit/src/models/operations/posttransactionexportjob.ts +++ b/chainkit/src/models/operations/posttransactionexportjob.ts @@ -14,7 +14,15 @@ export const PostTransactionExportJobServerList = [ export type PostTransactionExportJobRequest = | components.CreateEvmTransactionExportRequest - | components.CreatePrimaryNetworkTransactionExportRequest; + | (components.CreatePrimaryNetworkTransactionExportRequest & { + type: "TRANSACTION_EXPORT_PRIMARY_NETWORK"; + }) + | (components.CreatePrimaryNetworkTransactionExportRequest & { + type: "TRANSACTION_EXPORT_PRIMARY_NETWORK_STAKING"; + }) + | (components.CreatePrimaryNetworkTransactionExportRequest & { + type: "TRANSACTION_EXPORT_PRIMARY_NETWORK_SIMPLE"; + }); /** @internal */ export const PostTransactionExportJobRequest$inboundSchema: z.ZodType< @@ -23,12 +31,28 @@ export const PostTransactionExportJobRequest$inboundSchema: z.ZodType< unknown > = z.union([ components.CreateEvmTransactionExportRequest$inboundSchema, - components.CreatePrimaryNetworkTransactionExportRequest$inboundSchema, + components.CreatePrimaryNetworkTransactionExportRequest$inboundSchema.and( + z.object({ type: z.literal("TRANSACTION_EXPORT_PRIMARY_NETWORK") }), + ), + components.CreatePrimaryNetworkTransactionExportRequest$inboundSchema.and( + z.object({ type: z.literal("TRANSACTION_EXPORT_PRIMARY_NETWORK_STAKING") }), + ), + components.CreatePrimaryNetworkTransactionExportRequest$inboundSchema.and( + z.object({ type: z.literal("TRANSACTION_EXPORT_PRIMARY_NETWORK_SIMPLE") }), + ), ]); /** @internal */ export type PostTransactionExportJobRequest$Outbound = | components.CreateEvmTransactionExportRequest$Outbound - | components.CreatePrimaryNetworkTransactionExportRequest$Outbound; + | (components.CreatePrimaryNetworkTransactionExportRequest$Outbound & { + type: "TRANSACTION_EXPORT_PRIMARY_NETWORK"; + }) + | (components.CreatePrimaryNetworkTransactionExportRequest$Outbound & { + type: "TRANSACTION_EXPORT_PRIMARY_NETWORK_STAKING"; + }) + | (components.CreatePrimaryNetworkTransactionExportRequest$Outbound & { + type: "TRANSACTION_EXPORT_PRIMARY_NETWORK_SIMPLE"; + }); /** @internal */ export const PostTransactionExportJobRequest$outboundSchema: z.ZodType< @@ -37,7 +61,15 @@ export const PostTransactionExportJobRequest$outboundSchema: z.ZodType< PostTransactionExportJobRequest > = z.union([ components.CreateEvmTransactionExportRequest$outboundSchema, - components.CreatePrimaryNetworkTransactionExportRequest$outboundSchema, + components.CreatePrimaryNetworkTransactionExportRequest$outboundSchema.and( + z.object({ type: z.literal("TRANSACTION_EXPORT_PRIMARY_NETWORK") }), + ), + components.CreatePrimaryNetworkTransactionExportRequest$outboundSchema.and( + z.object({ type: z.literal("TRANSACTION_EXPORT_PRIMARY_NETWORK_STAKING") }), + ), + components.CreatePrimaryNetworkTransactionExportRequest$outboundSchema.and( + z.object({ type: z.literal("TRANSACTION_EXPORT_PRIMARY_NETWORK_SIMPLE") }), + ), ]); export function postTransactionExportJobRequestToJSON( diff --git a/chainkit/src/models/operations/updatewebhook.ts b/chainkit/src/models/operations/updatewebhook.ts index 5d695a72..84359b59 100644 --- a/chainkit/src/models/operations/updatewebhook.ts +++ b/chainkit/src/models/operations/updatewebhook.ts @@ -25,7 +25,7 @@ export type UpdateWebhookRequest = { * Successful response */ export type UpdateWebhookResponse = - | components.EVMAddressActivityResponse + | (components.EVMAddressActivityResponse & { eventType: "address_activity" }) | components.PrimaryNetworkAddressActivityResponse | components.ValidatorActivityResponse; @@ -85,13 +85,17 @@ export const UpdateWebhookResponse$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.union([ - components.EVMAddressActivityResponse$inboundSchema, + components.EVMAddressActivityResponse$inboundSchema.and( + z.object({ eventType: z.literal("address_activity") }), + ), components.PrimaryNetworkAddressActivityResponse$inboundSchema, components.ValidatorActivityResponse$inboundSchema, ]); /** @internal */ export type UpdateWebhookResponse$Outbound = - | components.EVMAddressActivityResponse$Outbound + | (components.EVMAddressActivityResponse$Outbound & { + eventType: "address_activity"; + }) | components.PrimaryNetworkAddressActivityResponse$Outbound | components.ValidatorActivityResponse$Outbound; @@ -101,7 +105,9 @@ export const UpdateWebhookResponse$outboundSchema: z.ZodType< z.ZodTypeDef, UpdateWebhookResponse > = z.union([ - components.EVMAddressActivityResponse$outboundSchema, + components.EVMAddressActivityResponse$outboundSchema.and( + z.object({ eventType: z.literal("address_activity") }), + ), components.PrimaryNetworkAddressActivityResponse$outboundSchema, components.ValidatorActivityResponse$outboundSchema, ]); diff --git a/chainkit/src/sdk/addresschains.ts b/chainkit/src/sdk/addresschains.ts index 0b9539b0..e642bb91 100644 --- a/chainkit/src/sdk/addresschains.ts +++ b/chainkit/src/sdk/addresschains.ts @@ -13,7 +13,7 @@ export class AddressChains extends ClientSDK { * List all chains associated with a given address * * @remarks - * Lists the chains where the specified address has participated in transactions or ERC token transfers, either as a sender or receiver. The data is refreshed every 15 minutes. + * Lists the chains where the specified address has participated in transactions or ERC token transfers, either as a sender or receiver. The data is refreshed every 15 minutes. */ async list( request: operations.ListAddressChainsRequest, diff --git a/chainkit/src/sdk/evmblocks.ts b/chainkit/src/sdk/evmblocks.ts index c12dbe35..48cb1869 100644 --- a/chainkit/src/sdk/evmblocks.ts +++ b/chainkit/src/sdk/evmblocks.ts @@ -17,7 +17,7 @@ export class EvmBlocks extends ClientSDK { * List latest blocks across all supported EVM chains * * @remarks - * Lists the most recent blocks from all supported EVM-compatible chains. The results can be filtered by network. + * Lists the most recent blocks from all supported EVM-compatible chains. The results can be filtered by network. */ async listLatestAllChains( request: operations.ListLatestBlocksAllChainsRequest, diff --git a/chainkit/src/sdk/evmtransactions.ts b/chainkit/src/sdk/evmtransactions.ts index f171fc65..1ef4f325 100644 --- a/chainkit/src/sdk/evmtransactions.ts +++ b/chainkit/src/sdk/evmtransactions.ts @@ -16,7 +16,7 @@ export class EvmTransactions extends ClientSDK { * List the latest transactions across all supported EVM chains * * @remarks - * Lists the most recent transactions from all supported EVM-compatible chains. The results can be filtered based on transaction status. + * Lists the most recent transactions from all supported EVM-compatible chains. The results can be filtered based on transaction status. */ async listLatestAllChains( request: operations.ListLatestTransactionsAllChainsRequest, diff --git a/chainkit/src/sdk/sdk.ts b/chainkit/src/sdk/sdk.ts index 446843c1..31e7b9f1 100644 --- a/chainkit/src/sdk/sdk.ts +++ b/chainkit/src/sdk/sdk.ts @@ -2,7 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import { validateWebhook } from "../funcs/validateWebhook.js"; import { ClientSDK } from "../lib/sdks.js"; +import * as components from "../models/components/index.js"; +import { unwrapAsync } from "../types/fp.js"; import { AVAXSupply } from "./avaxsupply.js"; import { Data } from "./data.js"; import { Metrics } from "./metrics.js"; @@ -28,4 +31,22 @@ export class Avalanche extends ClientSDK { get avaxSupply(): AVAXSupply { return (this._avaxSupply ??= new AVAXSupply(this._options)); } + + async validateWebhook({ + request, + secret, + }: { + request: { + body: string; + headers: Record | Headers; + url: string; + method: string; + } | Request; + secret: string; + }): Promise { + return unwrapAsync(validateWebhook( + this, + { request, secret }, + )); + } } diff --git a/chainkit/src/types/enums.ts b/chainkit/src/types/enums.ts index 32ad7bcf..aba0ffd2 100644 --- a/chainkit/src/types/enums.ts +++ b/chainkit/src/types/enums.ts @@ -3,34 +3,14 @@ */ import * as z from "zod/v3"; +import { Unrecognized, unrecognized } from "./unrecognized.js"; -declare const __brand: unique symbol; -export type Unrecognized = T & { [__brand]: "unrecognized" }; export type ClosedEnum>> = T[keyof T]; export type OpenEnum>> = | T[keyof T] | Unrecognized; -function unrecognized(value: T): Unrecognized { - unrecognizedCount++; - return value as Unrecognized; -} - -let unrecognizedCount = 0; -let refCount = 0; -export function unrecognizedCounter() { - refCount++; - const start = unrecognizedCount; - return { - count: () => { - const count = unrecognizedCount - start; - if (--refCount === 0) unrecognizedCount = 0; - return count; - }, - }; -} - export function inboundSchema>( enumObj: T, ): z.ZodType, z.ZodTypeDef, unknown> { diff --git a/chainkit/src/types/index.ts b/chainkit/src/types/index.ts index 184e01ff..91ee497c 100644 --- a/chainkit/src/types/index.ts +++ b/chainkit/src/types/index.ts @@ -3,9 +3,11 @@ */ export { blobLikeSchema, isBlobLike } from "./blobs.js"; -export type { ClosedEnum, OpenEnum, Unrecognized } from "./enums.js"; +export type { ClosedEnum, OpenEnum } from "./enums.js"; export type { Result } from "./fp.js"; export type { PageIterator, Paginator } from "./operations.js"; export { createPageIterator } from "./operations.js"; export { RFCDate } from "./rfcdate.js"; +export * from "./unrecognized.js"; export type { WebhookRecipient } from "./webhooks.js"; +export type { WebhookAuthenticationError } from "./webhooks.js"; diff --git a/chainkit/src/types/unrecognized.ts b/chainkit/src/types/unrecognized.ts new file mode 100644 index 00000000..b7a2a13f --- /dev/null +++ b/chainkit/src/types/unrecognized.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +declare const __brand: unique symbol; +export type Unrecognized = T & { [__brand]: "unrecognized" }; + +function unrecognized(value: T): Unrecognized { + globalCount++; + return value as Unrecognized; +} + +let globalCount = 0; +let refCount = 0; +export function startCountingUnrecognized() { + refCount++; + const start = globalCount; + return { + /** + * Ends counting and returns the delta. + * @param delta - If provided, only this amount is added to the parent counter + * (used for nested unions where we only want to record the winning option's count). + * If not provided, records all counts since start(). + */ + end: (delta?: number) => { + const count = globalCount - start; + // Reset globalCount back to start, then add only the specified delta + globalCount = start + (delta ?? count); + if (--refCount === 0) globalCount = 0; + return count; + }, + }; +} + +export { unrecognized }; diff --git a/chainkit/src/types/webhooks.ts b/chainkit/src/types/webhooks.ts index 9510d20c..8f038db6 100644 --- a/chainkit/src/types/webhooks.ts +++ b/chainkit/src/types/webhooks.ts @@ -4,4 +4,8 @@ export type WebhookRecipient = { url: string; + secret: string; }; +export class WebhookAuthenticationError extends Error { + override name = "WebhookAuthenticationError"; +} diff --git a/chainkit/tsconfig.json b/chainkit/tsconfig.json index 94d81a34..0c1134eb 100644 --- a/chainkit/tsconfig.json +++ b/chainkit/tsconfig.json @@ -1,7 +1,6 @@ { "compilerOptions": { "incremental": true, - "tsBuildInfoFile": ".tsbuildinfo", "target": "ES2020", "lib": ["ES2022", "DOM", "DOM.Iterable"], "jsx": "react-jsx", From 941c384b6bb97647b7c91eda7457250388c71cf2 Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Mon, 1 Dec 2025 18:49:49 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow