@cobo/agentic-wallet 0.1.5 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +183 -114
- package/dist/api/audit-api.d.ts +1 -1
- package/dist/api/audit-api.js +1 -1
- package/dist/api/balance-api.d.ts +1 -1
- package/dist/api/balance-api.js +1 -1
- package/dist/api/coin-price-api.d.ts +1 -1
- package/dist/api/coin-price-api.js +1 -1
- package/dist/api/faucet-api.d.ts +1 -1
- package/dist/api/faucet-api.js +1 -1
- package/dist/api/health-api.d.ts +1 -1
- package/dist/api/health-api.js +1 -1
- package/dist/api/identity-api.d.ts +1 -1
- package/dist/api/identity-api.js +1 -1
- package/dist/api/meta-api.d.ts +1 -1
- package/dist/api/meta-api.js +1 -1
- package/dist/api/metadata-api.d.ts +1 -1
- package/dist/api/metadata-api.js +1 -1
- package/dist/api/pacts-api.d.ts +1 -1
- package/dist/api/pacts-api.js +1 -1
- package/dist/api/pending-operations-api.d.ts +1 -1
- package/dist/api/pending-operations-api.js +1 -1
- package/dist/api/recipes-api.d.ts +1 -119
- package/dist/api/recipes-api.d.ts.map +1 -1
- package/dist/api/recipes-api.js +1 -478
- package/dist/api/recipes-api.js.map +1 -1
- package/dist/api/suggestions-api.d.ts +1 -1
- package/dist/api/suggestions-api.js +1 -1
- package/dist/api/telemetry-api.d.ts +1 -1
- package/dist/api/telemetry-api.js +1 -1
- package/dist/api/transaction-records-api.d.ts +1 -1
- package/dist/api/transaction-records-api.js +1 -1
- package/dist/api/transactions-api.d.ts +6 -4
- package/dist/api/transactions-api.d.ts.map +1 -1
- package/dist/api/transactions-api.js +12 -4
- package/dist/api/transactions-api.js.map +1 -1
- package/dist/api/wallets-api.d.ts +9 -8
- package/dist/api/wallets-api.d.ts.map +1 -1
- package/dist/api/wallets-api.js +12 -8
- package/dist/api/wallets-api.js.map +1 -1
- package/dist/api.d.ts +1 -1
- package/dist/api.js +1 -1
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/models/agent-status-response.d.ts +2 -2
- package/dist/models/agent-status-response.js +1 -1
- package/dist/models/api-key-create-result-public.d.ts +1 -1
- package/dist/models/api-key-create-result-public.js +1 -1
- package/dist/models/api-key-create.d.ts +1 -1
- package/dist/models/api-key-create.js +1 -1
- package/dist/models/api-key-public-read.d.ts +7 -7
- package/dist/models/api-key-public-read.d.ts.map +1 -1
- package/dist/models/api-key-public-read.js +1 -1
- package/dist/models/audit-action.d.ts +1 -1
- package/dist/models/audit-action.js +1 -1
- package/dist/models/audit-log-page.d.ts +1 -1
- package/dist/models/audit-log-page.js +1 -1
- package/dist/models/audit-log-read.d.ts +11 -11
- package/dist/models/audit-log-read.d.ts.map +1 -1
- package/dist/models/audit-log-read.js +1 -1
- package/dist/models/audit-result.d.ts +1 -1
- package/dist/models/audit-result.js +1 -1
- package/dist/models/balance-read.d.ts +1 -1
- package/dist/models/balance-read.js +1 -1
- package/dist/models/chain-info.d.ts +1 -1
- package/dist/models/chain-info.js +1 -1
- package/dist/models/chain-metadata.d.ts +1 -1
- package/dist/models/chain-metadata.js +1 -1
- package/dist/models/completion-condition-type.d.ts +1 -1
- package/dist/models/completion-condition-type.js +1 -1
- package/dist/models/completion-condition.d.ts +1 -1
- package/dist/models/completion-condition.js +1 -1
- package/dist/models/contract-call-create.d.ts +1 -1
- package/dist/models/contract-call-create.js +1 -1
- package/dist/models/contract-call-submit-result.d.ts +1 -1
- package/dist/models/contract-call-submit-result.js +1 -1
- package/dist/models/delegation-spend-summary.d.ts +1 -1
- package/dist/models/delegation-spend-summary.js +1 -1
- package/dist/models/delegation-usage-limit-summary.d.ts +1 -1
- package/dist/models/delegation-usage-limit-summary.js +1 -1
- package/dist/models/drop-transaction-request.d.ts +1 -1
- package/dist/models/drop-transaction-request.js +1 -1
- package/dist/models/eip1559-fee-request.d.ts +3 -3
- package/dist/models/eip1559-fee-request.d.ts.map +1 -1
- package/dist/models/eip1559-fee-request.js +1 -1
- package/dist/models/estimate-contract-call-fee-request.d.ts +1 -1
- package/dist/models/estimate-contract-call-fee-request.js +1 -1
- package/dist/models/estimate-transfer-fee-read.d.ts +1 -1
- package/dist/models/estimate-transfer-fee-read.js +1 -1
- package/dist/models/estimate-transfer-fee-request.d.ts +1 -1
- package/dist/models/estimate-transfer-fee-request.js +1 -1
- package/dist/models/eth-call-request.d.ts +1 -1
- package/dist/models/eth-call-request.js +1 -1
- package/dist/models/eth-call-result.d.ts +1 -1
- package/dist/models/eth-call-result.js +1 -1
- package/dist/models/evmlegacy-fee-request.d.ts +1 -1
- package/dist/models/evmlegacy-fee-request.js +1 -1
- package/dist/models/external-transaction-operation-type.d.ts +1 -1
- package/dist/models/external-transaction-operation-type.js +1 -1
- package/dist/models/external-transaction-read.d.ts +1 -1
- package/dist/models/external-transaction-read.js +1 -1
- package/dist/models/external-transaction-stage.d.ts +1 -1
- package/dist/models/external-transaction-stage.js +1 -1
- package/dist/models/faucet-deposit-request.d.ts +1 -1
- package/dist/models/faucet-deposit-request.js +1 -1
- package/dist/models/faucet-deposit-result.d.ts +1 -1
- package/dist/models/faucet-deposit-result.js +1 -1
- package/dist/models/faucet-token-info.d.ts +1 -1
- package/dist/models/faucet-token-info.js +1 -1
- package/dist/models/faucet-token-item.d.ts +1 -1
- package/dist/models/faucet-token-item.js +1 -1
- package/dist/models/fee-estimate-read.d.ts +1 -1
- package/dist/models/fee-estimate-read.js +1 -1
- package/dist/models/fee-request.d.ts +1 -1
- package/dist/models/fee-request.js +1 -1
- package/dist/models/index.d.ts +3 -30
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/index.js +3 -30
- package/dist/models/index.js.map +1 -1
- package/dist/models/inline-policy-create.d.ts +1 -1
- package/dist/models/inline-policy-create.js +1 -1
- package/dist/models/key-share-holder-group-status.d.ts +1 -1
- package/dist/models/key-share-holder-group-status.js +1 -1
- package/dist/models/key-share-holder-group-type.d.ts +1 -1
- package/dist/models/key-share-holder-group-type.js +1 -1
- package/dist/models/key-share-holder-type.d.ts +1 -1
- package/dist/models/key-share-holder-type.js +1 -1
- package/dist/models/knowledge-search-type.d.ts +1 -1
- package/dist/models/knowledge-search-type.js +1 -1
- package/dist/models/langfuse-record.d.ts +1 -1
- package/dist/models/langfuse-record.js +1 -1
- package/dist/models/message-sign-create.d.ts +1 -1
- package/dist/models/message-sign-create.js +1 -1
- package/dist/models/message-sign-dest-type.d.ts +1 -1
- package/dist/models/message-sign-dest-type.js +1 -1
- package/dist/models/message-sign-result.d.ts +1 -1
- package/dist/models/message-sign-result.js +1 -1
- package/dist/models/model-error.d.ts +1 -1
- package/dist/models/model-error.js +1 -1
- package/dist/models/mpp-challenge.d.ts +1 -1
- package/dist/models/mpp-challenge.js +1 -1
- package/dist/models/mpp-session-action.d.ts +1 -1
- package/dist/models/mpp-session-action.js +1 -1
- package/dist/models/mpp-session-info.d.ts +1 -1
- package/dist/models/mpp-session-info.js +1 -1
- package/dist/models/mpp-session-params.d.ts +1 -1
- package/dist/models/mpp-session-params.js +1 -1
- package/dist/models/node-status-read.d.ts +1 -1
- package/dist/models/node-status-read.js +1 -1
- package/dist/models/pact-event-list-response.d.ts +1 -1
- package/dist/models/pact-event-list-response.js +1 -1
- package/dist/models/pact-event-read.d.ts +1 -1
- package/dist/models/pact-event-read.js +1 -1
- package/dist/models/pact-event-type.d.ts +1 -1
- package/dist/models/pact-event-type.js +1 -1
- package/dist/models/pact-list-response.d.ts +1 -1
- package/dist/models/pact-list-response.js +1 -1
- package/dist/models/pact-public-read.d.ts +14 -1
- package/dist/models/pact-public-read.d.ts.map +1 -1
- package/dist/models/pact-public-read.js +1 -1
- package/dist/models/pact-remaining.d.ts +35 -0
- package/dist/models/pact-remaining.d.ts.map +1 -0
- package/dist/models/{policy-create.js → pact-remaining.js} +2 -2
- package/dist/models/pact-remaining.js.map +1 -0
- package/dist/models/pact-spec-input.d.ts +1 -1
- package/dist/models/pact-spec-input.js +1 -1
- package/dist/models/pact-spec-output.d.ts +1 -1
- package/dist/models/pact-spec-output.js +1 -1
- package/dist/models/pact-stats-language.d.ts +1 -1
- package/dist/models/pact-stats-language.js +1 -1
- package/dist/models/pact-status.d.ts +1 -1
- package/dist/models/pact-status.js +1 -1
- package/dist/models/pact-submit-request.d.ts +7 -1
- package/dist/models/pact-submit-request.d.ts.map +1 -1
- package/dist/models/pact-submit-request.js +1 -1
- package/dist/models/pact-submit-response.d.ts +1 -1
- package/dist/models/pact-submit-response.js +1 -1
- package/dist/models/pact-summary.d.ts +16 -3
- package/dist/models/pact-summary.d.ts.map +1 -1
- package/dist/models/pact-summary.js +1 -1
- package/dist/models/pact-update-completion-conditions-request.d.ts +1 -1
- package/dist/models/pact-update-completion-conditions-request.js +1 -1
- package/dist/models/pact-update-policies-request.d.ts +1 -1
- package/dist/models/pact-update-policies-request.js +1 -1
- package/dist/models/pagination-meta.d.ts +1 -1
- package/dist/models/pagination-meta.js +1 -1
- package/dist/models/pair-token-status.d.ts +2 -1
- package/dist/models/pair-token-status.d.ts.map +1 -1
- package/dist/models/pair-token-status.js +2 -1
- package/dist/models/pair-token-status.js.map +1 -1
- package/dist/models/payment-create.d.ts +1 -1
- package/dist/models/payment-create.js +1 -1
- package/dist/models/payment-protocol.d.ts +1 -1
- package/dist/models/payment-protocol.js +1 -1
- package/dist/models/payment-result.d.ts +1 -1
- package/dist/models/payment-result.js +1 -1
- package/dist/models/pending-operation-action-result.d.ts +1 -1
- package/dist/models/pending-operation-action-result.js +1 -1
- package/dist/models/pending-operation-list-response.d.ts +1 -1
- package/dist/models/pending-operation-list-response.js +1 -1
- package/dist/models/pending-operation-read.d.ts +19 -19
- package/dist/models/pending-operation-read.d.ts.map +1 -1
- package/dist/models/pending-operation-read.js +1 -1
- package/dist/models/pending-operation-status.d.ts +1 -1
- package/dist/models/pending-operation-status.js +1 -1
- package/dist/models/pending-operation-type.d.ts +1 -1
- package/dist/models/pending-operation-type.js +1 -1
- package/dist/models/policy-type.d.ts +1 -1
- package/dist/models/policy-type.js +1 -1
- package/dist/models/principal-create-result.d.ts +2 -2
- package/dist/models/principal-create-result.js +1 -1
- package/dist/models/principal-create.d.ts +1 -1
- package/dist/models/principal-create.js +1 -1
- package/dist/models/principal-read.d.ts +2 -2
- package/dist/models/principal-read.js +1 -1
- package/dist/models/principal-type.d.ts +1 -1
- package/dist/models/principal-type.js +1 -1
- package/dist/models/principal-update.d.ts +1 -1
- package/dist/models/principal-update.js +1 -1
- package/dist/models/provision-request.d.ts +1 -1
- package/dist/models/provision-request.js +1 -1
- package/dist/models/provision-response.d.ts +2 -2
- package/dist/models/provision-response.js +1 -1
- package/dist/models/recent-address-read.d.ts +1 -1
- package/dist/models/recent-address-read.js +1 -1
- package/dist/models/recent-tx-summary.d.ts +47 -0
- package/dist/models/recent-tx-summary.d.ts.map +1 -0
- package/dist/models/{policy-read.js → recent-tx-summary.js} +2 -2
- package/dist/models/recent-tx-summary.js.map +1 -0
- package/dist/models/recipe-search-response.d.ts +1 -1
- package/dist/models/recipe-search-response.js +1 -1
- package/dist/models/recipe-search-source.d.ts +1 -1
- package/dist/models/recipe-search-source.js +1 -1
- package/dist/models/reject-pending-operation-request.d.ts +1 -1
- package/dist/models/reject-pending-operation-request.js +1 -1
- package/dist/models/search-recipes-request.d.ts +9 -3
- package/dist/models/search-recipes-request.d.ts.map +1 -1
- package/dist/models/search-recipes-request.js +1 -1
- package/dist/models/session-record.d.ts +1 -1
- package/dist/models/session-record.js +1 -1
- package/dist/models/session-span.d.ts +1 -1
- package/dist/models/session-span.js +1 -1
- package/dist/models/sol-address-lookup-table-account.d.ts +1 -1
- package/dist/models/sol-address-lookup-table-account.js +1 -1
- package/dist/models/sol-instruction-account.d.ts +1 -1
- package/dist/models/sol-instruction-account.js +1 -1
- package/dist/models/sol-instruction.d.ts +1 -1
- package/dist/models/sol-instruction.js +1 -1
- package/dist/models/solfee-request.d.ts +1 -1
- package/dist/models/solfee-request.js +1 -1
- package/dist/models/speedup-transaction-request.d.ts +1 -1
- package/dist/models/speedup-transaction-request.js +1 -1
- package/dist/models/standard-response-agent-status-response.d.ts +1 -1
- package/dist/models/standard-response-agent-status-response.js +1 -1
- package/dist/models/standard-response-api-key-create-result-public.d.ts +1 -1
- package/dist/models/standard-response-api-key-create-result-public.js +1 -1
- package/dist/models/standard-response-audit-log-page.d.ts +1 -1
- package/dist/models/standard-response-audit-log-page.js +1 -1
- package/dist/models/standard-response-chain-info.d.ts +1 -1
- package/dist/models/standard-response-chain-info.js +1 -1
- package/dist/models/standard-response-contract-call-submit-result.d.ts +1 -1
- package/dist/models/standard-response-contract-call-submit-result.js +1 -1
- package/dist/models/standard-response-dict-str-bool.d.ts +1 -1
- package/dist/models/standard-response-dict-str-bool.js +1 -1
- package/dist/models/standard-response-dict-str-str.d.ts +1 -1
- package/dist/models/standard-response-dict-str-str.js +1 -1
- package/dist/models/standard-response-estimate-transfer-fee-read.d.ts +1 -1
- package/dist/models/standard-response-estimate-transfer-fee-read.js +1 -1
- package/dist/models/standard-response-eth-call-result.d.ts +1 -1
- package/dist/models/standard-response-eth-call-result.js +1 -1
- package/dist/models/standard-response-faucet-deposit-result.d.ts +1 -1
- package/dist/models/standard-response-faucet-deposit-result.js +1 -1
- package/dist/models/standard-response-list-api-key-public-read.d.ts +1 -1
- package/dist/models/standard-response-list-api-key-public-read.js +1 -1
- package/dist/models/standard-response-list-balance-read.d.ts +1 -1
- package/dist/models/standard-response-list-balance-read.js +1 -1
- package/dist/models/standard-response-list-faucet-token-item.d.ts +1 -1
- package/dist/models/standard-response-list-faucet-token-item.js +1 -1
- package/dist/models/standard-response-list-principal-read.d.ts +1 -1
- package/dist/models/standard-response-list-principal-read.js +1 -1
- package/dist/models/standard-response-list-recent-address-read.d.ts +1 -1
- package/dist/models/standard-response-list-recent-address-read.js +1 -1
- package/dist/models/standard-response-list-token-candidate.d.ts +1 -1
- package/dist/models/standard-response-list-token-candidate.js +1 -1
- package/dist/models/standard-response-list-user-transaction-read.d.ts +1 -1
- package/dist/models/standard-response-list-user-transaction-read.js +1 -1
- package/dist/models/standard-response-list-wallet-address-read.d.ts +1 -1
- package/dist/models/standard-response-list-wallet-address-read.js +1 -1
- package/dist/models/standard-response-list-wallet-read.d.ts +1 -1
- package/dist/models/standard-response-list-wallet-read.js +1 -1
- package/dist/models/standard-response-message-sign-result.d.ts +1 -1
- package/dist/models/standard-response-message-sign-result.js +1 -1
- package/dist/models/standard-response-node-status-read.d.ts +1 -1
- package/dist/models/standard-response-node-status-read.js +1 -1
- package/dist/models/standard-response-pact-event-list-response.d.ts +1 -1
- package/dist/models/standard-response-pact-event-list-response.js +1 -1
- package/dist/models/standard-response-pact-list-response.d.ts +1 -1
- package/dist/models/standard-response-pact-list-response.js +1 -1
- package/dist/models/standard-response-pact-public-read.d.ts +1 -1
- package/dist/models/standard-response-pact-public-read.js +1 -1
- package/dist/models/standard-response-pact-submit-response.d.ts +1 -1
- package/dist/models/standard-response-pact-submit-response.js +1 -1
- package/dist/models/standard-response-payment-result.d.ts +1 -1
- package/dist/models/standard-response-payment-result.js +1 -1
- package/dist/models/standard-response-pending-operation-action-result.d.ts +1 -1
- package/dist/models/standard-response-pending-operation-action-result.js +1 -1
- package/dist/models/standard-response-pending-operation-list-response.d.ts +1 -1
- package/dist/models/standard-response-pending-operation-list-response.js +1 -1
- package/dist/models/standard-response-pending-operation-read.d.ts +1 -1
- package/dist/models/standard-response-pending-operation-read.js +1 -1
- package/dist/models/standard-response-principal-create-result.d.ts +1 -1
- package/dist/models/standard-response-principal-create-result.js +1 -1
- package/dist/models/standard-response-principal-read.d.ts +1 -1
- package/dist/models/standard-response-principal-read.js +1 -1
- package/dist/models/standard-response-provision-response.d.ts +1 -1
- package/dist/models/standard-response-provision-response.js +1 -1
- package/dist/models/standard-response-recipe-search-response.d.ts +1 -1
- package/dist/models/standard-response-recipe-search-response.js +1 -1
- package/dist/models/standard-response-suggestion-response.d.ts +1 -1
- package/dist/models/standard-response-suggestion-response.js +1 -1
- package/dist/models/standard-response-telemetry-config-response.d.ts +1 -1
- package/dist/models/standard-response-telemetry-config-response.js +1 -1
- package/dist/models/standard-response-transaction-rbf-result.d.ts +1 -1
- package/dist/models/standard-response-transaction-rbf-result.js +1 -1
- package/dist/models/standard-response-transfer-submit-result.d.ts +1 -1
- package/dist/models/standard-response-transfer-submit-result.js +1 -1
- package/dist/models/standard-response-user-transaction-read.d.ts +1 -1
- package/dist/models/standard-response-user-transaction-read.js +1 -1
- package/dist/models/standard-response-waas-paginated-response-chain-metadata.d.ts +1 -1
- package/dist/models/standard-response-waas-paginated-response-chain-metadata.js +1 -1
- package/dist/models/standard-response-waas-paginated-response-token-metadata.d.ts +1 -1
- package/dist/models/standard-response-waas-paginated-response-token-metadata.js +1 -1
- package/dist/models/standard-response-wallet-address-read.d.ts +1 -1
- package/dist/models/standard-response-wallet-address-read.js +1 -1
- package/dist/models/standard-response-wallet-detail-read.d.ts +1 -1
- package/dist/models/standard-response-wallet-detail-read.js +1 -1
- package/dist/models/standard-response-wallet-pact-history-read.d.ts +1 -1
- package/dist/models/standard-response-wallet-pact-history-read.js +1 -1
- package/dist/models/standard-response-wallet-pact-stats-read.d.ts +1 -1
- package/dist/models/standard-response-wallet-pact-stats-read.js +1 -1
- package/dist/models/standard-response-wallet-pair-info-read.d.ts +1 -1
- package/dist/models/standard-response-wallet-pair-info-read.js +1 -1
- package/dist/models/standard-response-wallet-pair-initiate-read.d.ts +1 -1
- package/dist/models/standard-response-wallet-pair-initiate-read.js +1 -1
- package/dist/models/standard-response-wallet-pair-read.d.ts +1 -1
- package/dist/models/standard-response-wallet-pair-read.js +1 -1
- package/dist/models/standard-response-wallet-read.d.ts +1 -1
- package/dist/models/standard-response-wallet-read.js +1 -1
- package/dist/models/standard-response-wallet-reshare-response.d.ts +1 -1
- package/dist/models/standard-response-wallet-reshare-response.js +1 -1
- package/dist/models/standard-response-wallet-tss-callback-response.d.ts +1 -1
- package/dist/models/standard-response-wallet-tss-callback-response.js +1 -1
- package/dist/models/standard-response-webhook-process-result.d.ts +1 -1
- package/dist/models/standard-response-webhook-process-result.js +1 -1
- package/dist/models/suggestion-key.d.ts +23 -9
- package/dist/models/suggestion-key.d.ts.map +1 -1
- package/dist/models/suggestion-key.js +23 -9
- package/dist/models/suggestion-key.js.map +1 -1
- package/dist/models/suggestion-response.d.ts +1 -1
- package/dist/models/suggestion-response.js +1 -1
- package/dist/models/telemetry-config-response.d.ts +1 -1
- package/dist/models/telemetry-config-response.js +1 -1
- package/dist/models/token-candidate.d.ts +1 -1
- package/dist/models/token-candidate.js +1 -1
- package/dist/models/token-metadata.d.ts +1 -1
- package/dist/models/token-metadata.js +1 -1
- package/dist/models/transaction-provider.d.ts +2 -1
- package/dist/models/transaction-provider.d.ts.map +1 -1
- package/dist/models/transaction-provider.js +2 -1
- package/dist/models/transaction-provider.js.map +1 -1
- package/dist/models/transaction-rbf-result.d.ts +1 -1
- package/dist/models/transaction-rbf-result.js +1 -1
- package/dist/models/transfer-create.d.ts +1 -1
- package/dist/models/transfer-create.js +1 -1
- package/dist/models/transfer-submit-result.d.ts +1 -1
- package/dist/models/transfer-submit-result.js +1 -1
- package/dist/models/ucw-share-public-data-callback.d.ts +1 -1
- package/dist/models/ucw-share-public-data-callback.js +1 -1
- package/dist/models/ucw-tss-key-share-group-callback.d.ts +1 -1
- package/dist/models/ucw-tss-key-share-group-callback.js +1 -1
- package/dist/models/user-transaction-data.d.ts +7 -1
- package/dist/models/user-transaction-data.d.ts.map +1 -1
- package/dist/models/user-transaction-data.js +1 -1
- package/dist/models/user-transaction-operation-type.d.ts +1 -1
- package/dist/models/user-transaction-operation-type.js +1 -1
- package/dist/models/user-transaction-read.d.ts +17 -3
- package/dist/models/user-transaction-read.d.ts.map +1 -1
- package/dist/models/user-transaction-read.js +1 -1
- package/dist/models/user-transaction-request-type.d.ts +1 -1
- package/dist/models/user-transaction-request-type.js +1 -1
- package/dist/models/validation-error-loc-inner.d.ts +1 -1
- package/dist/models/validation-error-loc-inner.js +1 -1
- package/dist/models/validation-error.d.ts +1 -1
- package/dist/models/validation-error.js +1 -1
- package/dist/models/vault-group-type.d.ts +1 -1
- package/dist/models/vault-group-type.js +1 -1
- package/dist/models/waas-paginated-response-chain-metadata.d.ts +1 -1
- package/dist/models/waas-paginated-response-chain-metadata.js +1 -1
- package/dist/models/waas-paginated-response-token-metadata.d.ts +1 -1
- package/dist/models/waas-paginated-response-token-metadata.js +1 -1
- package/dist/models/waas-pagination.d.ts +1 -1
- package/dist/models/waas-pagination.js +1 -1
- package/dist/models/wallet-address-create.d.ts +1 -1
- package/dist/models/wallet-address-create.js +1 -1
- package/dist/models/wallet-address-read.d.ts +1 -1
- package/dist/models/wallet-address-read.js +1 -1
- package/dist/models/wallet-create.d.ts +1 -1
- package/dist/models/wallet-create.js +1 -1
- package/dist/models/wallet-detail-read.d.ts +3 -3
- package/dist/models/wallet-detail-read.d.ts.map +1 -1
- package/dist/models/wallet-detail-read.js +1 -1
- package/dist/models/wallet-group-node-read.d.ts +1 -1
- package/dist/models/wallet-group-node-read.js +1 -1
- package/dist/models/wallet-group-read.d.ts +1 -1
- package/dist/models/wallet-group-read.js +1 -1
- package/dist/models/wallet-pact-currency.d.ts +1 -1
- package/dist/models/wallet-pact-currency.js +1 -1
- package/dist/models/wallet-pact-history-bucket-pact-read.d.ts +1 -1
- package/dist/models/wallet-pact-history-bucket-pact-read.js +1 -1
- package/dist/models/wallet-pact-history-bucket-read.d.ts +1 -1
- package/dist/models/wallet-pact-history-bucket-read.js +1 -1
- package/dist/models/wallet-pact-history-metric.d.ts +1 -1
- package/dist/models/wallet-pact-history-metric.js +1 -1
- package/dist/models/wallet-pact-history-range.d.ts +1 -1
- package/dist/models/wallet-pact-history-range.js +1 -1
- package/dist/models/wallet-pact-history-read.d.ts +1 -1
- package/dist/models/wallet-pact-history-read.js +1 -1
- package/dist/models/wallet-pact-history-summary-read.d.ts +1 -1
- package/dist/models/wallet-pact-history-summary-read.js +1 -1
- package/dist/models/wallet-pact-stats-read.d.ts +1 -1
- package/dist/models/wallet-pact-stats-read.js +1 -1
- package/dist/models/wallet-pair-agent-info.d.ts +1 -1
- package/dist/models/wallet-pair-agent-info.js +1 -1
- package/dist/models/wallet-pair-confirm.d.ts +7 -1
- package/dist/models/wallet-pair-confirm.d.ts.map +1 -1
- package/dist/models/wallet-pair-confirm.js +1 -1
- package/dist/models/wallet-pair-info-read.d.ts +9 -2
- package/dist/models/wallet-pair-info-read.d.ts.map +1 -1
- package/dist/models/wallet-pair-info-read.js +1 -1
- package/dist/models/wallet-pair-initiate-read.d.ts +25 -4
- package/dist/models/wallet-pair-initiate-read.d.ts.map +1 -1
- package/dist/models/wallet-pair-initiate-read.js +1 -1
- package/dist/models/wallet-pair-initiate.d.ts +2 -2
- package/dist/models/wallet-pair-initiate.js +1 -1
- package/dist/models/wallet-pair-read.d.ts +25 -4
- package/dist/models/wallet-pair-read.d.ts.map +1 -1
- package/dist/models/wallet-pair-read.js +1 -1
- package/dist/models/wallet-pair-status.d.ts +2 -1
- package/dist/models/wallet-pair-status.d.ts.map +1 -1
- package/dist/models/wallet-pair-status.js +2 -1
- package/dist/models/wallet-pair-status.js.map +1 -1
- package/dist/models/wallet-pair-token-purpose.d.ts +20 -0
- package/dist/models/wallet-pair-token-purpose.d.ts.map +1 -0
- package/dist/models/{policy-scope.js → wallet-pair-token-purpose.js} +7 -8
- package/dist/models/wallet-pair-token-purpose.js.map +1 -0
- package/dist/models/wallet-pair-wallet-info.d.ts +1 -1
- package/dist/models/wallet-pair-wallet-info.js +1 -1
- package/dist/models/wallet-read.d.ts +3 -3
- package/dist/models/wallet-read.d.ts.map +1 -1
- package/dist/models/wallet-read.js +1 -1
- package/dist/models/wallet-reshare-request.d.ts +7 -1
- package/dist/models/wallet-reshare-request.d.ts.map +1 -1
- package/dist/models/wallet-reshare-request.js +1 -1
- package/dist/models/wallet-reshare-response.d.ts +1 -1
- package/dist/models/wallet-reshare-response.js +1 -1
- package/dist/models/wallet-status.d.ts +1 -1
- package/dist/models/wallet-status.js +1 -1
- package/dist/models/wallet-tss-callback-request.d.ts +1 -1
- package/dist/models/wallet-tss-callback-request.js +1 -1
- package/dist/models/wallet-tss-callback-response.d.ts +1 -1
- package/dist/models/wallet-tss-callback-response.js +1 -1
- package/dist/models/wallet-type.d.ts +1 -1
- package/dist/models/wallet-type.js +1 -1
- package/dist/models/wallet-update.d.ts +1 -1
- package/dist/models/wallet-update.js +1 -1
- package/dist/models/webhook-process-result.d.ts +1 -1
- package/dist/models/webhook-process-result.js +1 -1
- package/dist/models/wrapped-validation-error.d.ts +1 -1
- package/dist/models/wrapped-validation-error.js +1 -1
- package/package.json +1 -1
- package/dist/models/applicable-limit-read.d.ts +0 -65
- package/dist/models/applicable-limit-read.d.ts.map +0 -1
- package/dist/models/applicable-limit-read.js +0 -12
- package/dist/models/applicable-limit-read.js.map +0 -1
- package/dist/models/policy-create.d.ts +0 -67
- package/dist/models/policy-create.d.ts.map +0 -1
- package/dist/models/policy-create.js.map +0 -1
- package/dist/models/policy-dry-run-request.d.ts +0 -84
- package/dist/models/policy-dry-run-request.d.ts.map +0 -1
- package/dist/models/policy-dry-run-request.js +0 -12
- package/dist/models/policy-dry-run-request.js.map +0 -1
- package/dist/models/policy-dry-run-result.d.ts +0 -63
- package/dist/models/policy-dry-run-result.d.ts.map +0 -1
- package/dist/models/policy-dry-run-result.js +0 -12
- package/dist/models/policy-dry-run-result.js.map +0 -1
- package/dist/models/policy-read.d.ts +0 -99
- package/dist/models/policy-read.d.ts.map +0 -1
- package/dist/models/policy-read.js.map +0 -1
- package/dist/models/policy-scope.d.ts +0 -21
- package/dist/models/policy-scope.d.ts.map +0 -1
- package/dist/models/policy-scope.js.map +0 -1
- package/dist/models/policy-update.d.ts +0 -41
- package/dist/models/policy-update.d.ts.map +0 -1
- package/dist/models/policy-update.js +0 -12
- package/dist/models/policy-update.js.map +0 -1
- package/dist/models/recipe-category-read.d.ts +0 -29
- package/dist/models/recipe-category-read.d.ts.map +0 -1
- package/dist/models/recipe-category-read.js +0 -12
- package/dist/models/recipe-category-read.js.map +0 -1
- package/dist/models/recipe-counter-result.d.ts +0 -29
- package/dist/models/recipe-counter-result.d.ts.map +0 -1
- package/dist/models/recipe-counter-result.js +0 -12
- package/dist/models/recipe-counter-result.js.map +0 -1
- package/dist/models/recipe-create-result.d.ts +0 -42
- package/dist/models/recipe-create-result.d.ts.map +0 -1
- package/dist/models/recipe-create-result.js +0 -12
- package/dist/models/recipe-create-result.js.map +0 -1
- package/dist/models/recipe-create.d.ts +0 -117
- package/dist/models/recipe-create.d.ts.map +0 -1
- package/dist/models/recipe-create.js +0 -12
- package/dist/models/recipe-create.js.map +0 -1
- package/dist/models/recipe-detail-read.d.ts +0 -166
- package/dist/models/recipe-detail-read.d.ts.map +0 -1
- package/dist/models/recipe-detail-read.js +0 -12
- package/dist/models/recipe-detail-read.js.map +0 -1
- package/dist/models/recipe-document.d.ts +0 -50
- package/dist/models/recipe-document.d.ts.map +0 -1
- package/dist/models/recipe-document.js +0 -12
- package/dist/models/recipe-document.js.map +0 -1
- package/dist/models/recipe-library-sort-by.d.ts +0 -21
- package/dist/models/recipe-library-sort-by.d.ts.map +0 -1
- package/dist/models/recipe-library-sort-by.js +0 -23
- package/dist/models/recipe-library-sort-by.js.map +0 -1
- package/dist/models/recipe-read.d.ts +0 -138
- package/dist/models/recipe-read.d.ts.map +0 -1
- package/dist/models/recipe-read.js +0 -12
- package/dist/models/recipe-read.js.map +0 -1
- package/dist/models/recipe-review-action.d.ts +0 -20
- package/dist/models/recipe-review-action.d.ts.map +0 -1
- package/dist/models/recipe-review-action.js +0 -22
- package/dist/models/recipe-review-action.js.map +0 -1
- package/dist/models/recipe-review-request.d.ts +0 -24
- package/dist/models/recipe-review-request.d.ts.map +0 -1
- package/dist/models/recipe-review-request.js +0 -12
- package/dist/models/recipe-review-request.js.map +0 -1
- package/dist/models/recipe-status.d.ts +0 -23
- package/dist/models/recipe-status.d.ts.map +0 -1
- package/dist/models/recipe-status.js +0 -25
- package/dist/models/recipe-status.js.map +0 -1
- package/dist/models/recipe-submission-create.d.ts +0 -99
- package/dist/models/recipe-submission-create.d.ts.map +0 -1
- package/dist/models/recipe-submission-create.js +0 -12
- package/dist/models/recipe-submission-create.js.map +0 -1
- package/dist/models/recipe-update.d.ts +0 -112
- package/dist/models/recipe-update.d.ts.map +0 -1
- package/dist/models/recipe-update.js +0 -12
- package/dist/models/recipe-update.js.map +0 -1
- package/dist/models/standard-response-list-policy-read.d.ts +0 -49
- package/dist/models/standard-response-list-policy-read.d.ts.map +0 -1
- package/dist/models/standard-response-list-policy-read.js +0 -12
- package/dist/models/standard-response-list-policy-read.js.map +0 -1
- package/dist/models/standard-response-list-recipe-category-read.d.ts +0 -49
- package/dist/models/standard-response-list-recipe-category-read.d.ts.map +0 -1
- package/dist/models/standard-response-list-recipe-category-read.js +0 -12
- package/dist/models/standard-response-list-recipe-category-read.js.map +0 -1
- package/dist/models/standard-response-list-recipe-read.d.ts +0 -49
- package/dist/models/standard-response-list-recipe-read.d.ts.map +0 -1
- package/dist/models/standard-response-list-recipe-read.js +0 -12
- package/dist/models/standard-response-list-recipe-read.js.map +0 -1
- package/dist/models/standard-response-policy-dry-run-result.d.ts +0 -49
- package/dist/models/standard-response-policy-dry-run-result.d.ts.map +0 -1
- package/dist/models/standard-response-policy-dry-run-result.js +0 -12
- package/dist/models/standard-response-policy-dry-run-result.js.map +0 -1
- package/dist/models/standard-response-policy-read.d.ts +0 -49
- package/dist/models/standard-response-policy-read.d.ts.map +0 -1
- package/dist/models/standard-response-policy-read.js +0 -12
- package/dist/models/standard-response-policy-read.js.map +0 -1
- package/dist/models/standard-response-recipe-counter-result.d.ts +0 -49
- package/dist/models/standard-response-recipe-counter-result.d.ts.map +0 -1
- package/dist/models/standard-response-recipe-counter-result.js +0 -12
- package/dist/models/standard-response-recipe-counter-result.js.map +0 -1
- package/dist/models/standard-response-recipe-create-result.d.ts +0 -49
- package/dist/models/standard-response-recipe-create-result.d.ts.map +0 -1
- package/dist/models/standard-response-recipe-create-result.js +0 -12
- package/dist/models/standard-response-recipe-create-result.js.map +0 -1
- package/dist/models/standard-response-recipe-detail-read.d.ts +0 -49
- package/dist/models/standard-response-recipe-detail-read.d.ts.map +0 -1
- package/dist/models/standard-response-recipe-detail-read.js +0 -12
- package/dist/models/standard-response-recipe-detail-read.js.map +0 -1
- package/dist/models/standard-response-recipe-document.d.ts +0 -49
- package/dist/models/standard-response-recipe-document.d.ts.map +0 -1
- package/dist/models/standard-response-recipe-document.js +0 -12
- package/dist/models/standard-response-recipe-document.js.map +0 -1
- package/dist/models/tier-evaluation-read.d.ts +0 -47
- package/dist/models/tier-evaluation-read.d.ts.map +0 -1
- package/dist/models/tier-evaluation-read.js +0 -12
- package/dist/models/tier-evaluation-read.js.map +0 -1
package/README.md
CHANGED
|
@@ -21,6 +21,14 @@ Instead of giving an agent a private key, Cobo Agentic Wallet gives it a control
|
|
|
21
21
|
[](https://www.npmjs.com/package/@cobo/agentic-wallet)
|
|
22
22
|
[](https://github.com/CoboGlobal/cobo-agentic-wallet-typescript-sdk/blob/master/LICENSE)
|
|
23
23
|
|
|
24
|
+
## AI coding agent support
|
|
25
|
+
|
|
26
|
+
If you are building with an AI coding agent (Claude Code, Cursor, Windsurf, etc.), install the CAW developer skill to give it context on the SDK and CLI:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npx skills add CoboGlobal/cobo-agentic-wallet --skill cobo-agentic-wallet-developer --yes --global
|
|
30
|
+
```
|
|
31
|
+
|
|
24
32
|
## Related repositories
|
|
25
33
|
|
|
26
34
|
- [CAW Python SDK](https://github.com/CoboGlobal/cobo-agentic-wallet-python-sdk)
|
|
@@ -33,142 +41,203 @@ Instead of giving an agent a private key, Cobo Agentic Wallet gives it a control
|
|
|
33
41
|
|
|
34
42
|
## Get Started
|
|
35
43
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
curl -fsSL https://raw.githubusercontent.com/CoboGlobal/cobo-agentic-wallet/master/install.sh | bash
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Then add `caw` to your PATH:
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
export PATH="$HOME/.cobo-agentic-wallet/bin:$PATH"
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
Verify the installation:
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
caw --version
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
### 2. Onboard and pair with the wallet owner
|
|
55
|
-
|
|
56
|
-
Run the interactive onboarding wizard. You will need an invitation code from the wallet owner.
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
caw onboard --wait --invitation-code <invitation-code>
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
The wizard runs through several phases until wallet `status` becomes `active`.
|
|
63
|
-
|
|
64
|
-
Once the wallet is active, generate a pairing token for the wallet owner:
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
caw wallet pair --code-only
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
The wallet owner enters the token in the Cobo Agentic Wallet app to complete ownership pairing.
|
|
44
|
+
Before using this SDK, follow the [Get Started guide](https://github.com/CoboGlobal/cobo-agentic-wallet#get-started) in the main repo to install the `caw` CLI, onboard, and get your credentials.
|
|
71
45
|
|
|
72
|
-
###
|
|
73
|
-
|
|
74
|
-
```bash
|
|
75
|
-
# List addresses for the wallet
|
|
76
|
-
caw address list
|
|
77
|
-
|
|
78
|
-
# Request native Sepolia ETH
|
|
79
|
-
caw faucet deposit --token-id SETH --address <your-seth-address>
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
Check the balance with `caw wallet balance`.
|
|
83
|
-
|
|
84
|
-
### 4. Get credentials
|
|
85
|
-
|
|
86
|
-
```bash
|
|
87
|
-
caw wallet current --show-api-key
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
Set the output values as environment variables:
|
|
91
|
-
|
|
92
|
-
```bash
|
|
93
|
-
export AGENT_WALLET_API_URL=https://api.agenticwallet.cobo.com
|
|
94
|
-
export AGENT_WALLET_API_KEY=your-agent-api-key
|
|
95
|
-
export AGENT_WALLET_WALLET_ID=your-wallet-uuid
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
### 5. Install the SDK
|
|
46
|
+
### 1. Install the SDK
|
|
99
47
|
|
|
100
48
|
```bash
|
|
101
49
|
npm install @cobo/agentic-wallet
|
|
102
50
|
```
|
|
103
51
|
|
|
104
|
-
###
|
|
52
|
+
### 2. Submit a pact and run a transfer
|
|
105
53
|
|
|
106
54
|
```typescript
|
|
107
|
-
import {
|
|
55
|
+
import {
|
|
56
|
+
AuditApi,
|
|
57
|
+
Configuration,
|
|
58
|
+
PactsApi,
|
|
59
|
+
TransactionsApi,
|
|
60
|
+
} from '@cobo/agentic-wallet';
|
|
108
61
|
|
|
109
62
|
const CHAIN_ID = 'SETH';
|
|
110
63
|
const TOKEN_ID = 'SETH';
|
|
111
|
-
const DESTINATION = '0x1111111111111111111111111111111111111111';
|
|
112
64
|
const ALLOWED_AMOUNT = '0.001';
|
|
65
|
+
const DENIED_AMOUNT = '0.005';
|
|
113
66
|
const DENY_THRESHOLD = '0.002';
|
|
114
67
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
const walletId = process.env.AGENT_WALLET_WALLET_ID!;
|
|
119
|
-
|
|
120
|
-
const config = new Configuration({ basePath: apiUrl, apiKey });
|
|
121
|
-
const pactsApi = new PactsApi(config);
|
|
122
|
-
|
|
123
|
-
// Submit a pact requesting transfer permissions
|
|
124
|
-
const pactResp = await pactsApi.submitPact({
|
|
125
|
-
wallet_id: walletId,
|
|
126
|
-
intent: 'Transfer tokens for testing',
|
|
127
|
-
spec: {
|
|
128
|
-
policies: [
|
|
129
|
-
{
|
|
130
|
-
name: 'max-tx-limit',
|
|
131
|
-
type: 'transfer',
|
|
132
|
-
rules: {
|
|
133
|
-
effect: 'allow',
|
|
134
|
-
when: { chain_in: [CHAIN_ID] },
|
|
135
|
-
deny_if: { amount_gt: DENY_THRESHOLD },
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
|
-
],
|
|
139
|
-
completion_conditions: [{ type: 'time_elapsed', threshold: '86400' }],
|
|
140
|
-
},
|
|
141
|
-
} as any);
|
|
142
|
-
const pactId = pactResp.data.pact_id;
|
|
143
|
-
console.log(`Pact submitted: ${pactId}`);
|
|
144
|
-
|
|
145
|
-
// Poll until the owner approves the pact
|
|
146
|
-
while (true) {
|
|
147
|
-
const pact = (await pactsApi.getPact(pactId)).data;
|
|
148
|
-
if (pact.status === 'active') break;
|
|
149
|
-
if (['rejected', 'expired', 'revoked', 'completed'].includes(pact.status as string)) {
|
|
150
|
-
throw new Error(`Pact ended: ${pact.status}`);
|
|
151
|
-
}
|
|
152
|
-
await new Promise(r => setTimeout(r, 5000));
|
|
153
|
-
}
|
|
68
|
+
function sleep(ms: number): Promise<void> {
|
|
69
|
+
return new Promise(resolve => setTimeout(resolve, ms));
|
|
70
|
+
}
|
|
154
71
|
|
|
155
|
-
|
|
72
|
+
interface ApiErrorPayload {
|
|
73
|
+
error?: { code?: string; reason?: string; details?: Record<string, string> };
|
|
74
|
+
suggestion?: string;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function parseApiError(err: unknown): { http: number | string; payload: ApiErrorPayload } {
|
|
78
|
+
const response = (err as { response?: { status?: number; data?: unknown } }).response;
|
|
79
|
+
const http = response?.status ?? '-';
|
|
80
|
+
const data = response?.data;
|
|
81
|
+
const payload: ApiErrorPayload =
|
|
82
|
+
data && typeof data === 'object' ? (data as ApiErrorPayload) : {};
|
|
83
|
+
return { http, payload };
|
|
84
|
+
}
|
|
156
85
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
86
|
+
async function main(): Promise<void> {
|
|
87
|
+
const basePath = process.env.AGENT_WALLET_API_URL!;
|
|
88
|
+
const apiKey = process.env.AGENT_WALLET_API_KEY!;
|
|
89
|
+
const walletId = process.env.AGENT_WALLET_WALLET_ID!;
|
|
90
|
+
const destination =
|
|
91
|
+
process.env.CAW_DESTINATION ?? '0x1111111111111111111111111111111111111111';
|
|
92
|
+
|
|
93
|
+
const ownerConfig = new Configuration({ apiKey, basePath });
|
|
94
|
+
const pactsApi = new PactsApi(ownerConfig);
|
|
95
|
+
const auditApi = new AuditApi(ownerConfig);
|
|
96
|
+
|
|
97
|
+
// Step 1: Submit a pact requesting transfer permissions for 24 hours.
|
|
98
|
+
console.log(
|
|
99
|
+
`[1/6] Submitting pact (allow ${CHAIN_ID}/${TOKEN_ID} transfers, ` +
|
|
100
|
+
`deny if amount > ${DENY_THRESHOLD})...`,
|
|
101
|
+
);
|
|
102
|
+
const pactResp = await pactsApi.submitPact({
|
|
103
|
+
wallet_id: walletId,
|
|
104
|
+
intent: 'Transfer tokens for integration testing',
|
|
105
|
+
spec: {
|
|
106
|
+
policies: [
|
|
107
|
+
{
|
|
108
|
+
name: 'max-tx-limit',
|
|
109
|
+
type: 'transfer',
|
|
110
|
+
rules: {
|
|
111
|
+
effect: 'allow',
|
|
112
|
+
when: {
|
|
113
|
+
chain_in: [CHAIN_ID],
|
|
114
|
+
token_in: [{ chain_id: CHAIN_ID, token_id: TOKEN_ID }],
|
|
115
|
+
},
|
|
116
|
+
deny_if: { amount_gt: DENY_THRESHOLD },
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
],
|
|
120
|
+
completion_conditions: [{ type: 'time_elapsed', threshold: '86400' }],
|
|
121
|
+
},
|
|
122
|
+
});
|
|
123
|
+
const pactId = pactResp.data.result.pact_id;
|
|
124
|
+
console.log(` pact submitted: id=${pactId}`);
|
|
125
|
+
|
|
126
|
+
// Step 2: Poll until the owner approves the pact.
|
|
127
|
+
console.log('[2/6] Waiting for owner approval in the Cobo Agentic Wallet app...');
|
|
128
|
+
const started = Date.now();
|
|
129
|
+
let pactApiKey: string | undefined;
|
|
130
|
+
let lastStatus: string | undefined;
|
|
131
|
+
while (!pactApiKey) {
|
|
132
|
+
const pact = (await pactsApi.getPact(pactId)).data.result;
|
|
133
|
+
const status = pact.status ?? '';
|
|
134
|
+
if (status !== lastStatus) {
|
|
135
|
+
const elapsed = Math.floor((Date.now() - started) / 1000);
|
|
136
|
+
console.log(` pact status -> ${status} (elapsed ${elapsed}s)`);
|
|
137
|
+
lastStatus = status;
|
|
138
|
+
}
|
|
139
|
+
if (status === 'active') {
|
|
140
|
+
pactApiKey = pact.api_key;
|
|
141
|
+
break;
|
|
142
|
+
}
|
|
143
|
+
if (['rejected', 'expired', 'revoked', 'completed'].includes(status)) {
|
|
144
|
+
throw new Error(`Pact reached terminal status before use: ${status}`);
|
|
145
|
+
}
|
|
146
|
+
await sleep(5000);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// Step 3: Use the pact-scoped API key for all subsequent calls.
|
|
150
|
+
console.log('[3/6] Pact is active; switching to pact-scoped API key.');
|
|
151
|
+
const pactConfig = new Configuration({ apiKey: pactApiKey, basePath });
|
|
152
|
+
const txApi = new TransactionsApi(pactConfig);
|
|
153
|
+
|
|
154
|
+
// Step 4: Execute an allowed transfer (within the deny threshold).
|
|
155
|
+
console.log(
|
|
156
|
+
`[4/6] Submitting allowed transfer: ${ALLOWED_AMOUNT} ${TOKEN_ID} -> ${destination}`,
|
|
157
|
+
);
|
|
158
|
+
const allowed = (
|
|
159
|
+
await txApi.transferTokens(walletId, {
|
|
160
|
+
chain_id: CHAIN_ID,
|
|
161
|
+
dst_addr: destination,
|
|
162
|
+
token_id: TOKEN_ID,
|
|
163
|
+
amount: ALLOWED_AMOUNT,
|
|
164
|
+
})
|
|
165
|
+
).data.result;
|
|
166
|
+
console.log(
|
|
167
|
+
` ALLOWED: tx_id=${allowed.id} status=${allowed.status} (${allowed.status_display ?? '-'}) ` +
|
|
168
|
+
`request_id=${allowed.request_id} hash=${allowed.transaction_hash ?? '-'}`,
|
|
169
|
+
);
|
|
170
|
+
|
|
171
|
+
// Step 5: Trigger a policy denial (amount exceeds the deny threshold),
|
|
172
|
+
// then follow the denial guidance and retry with a compliant amount.
|
|
173
|
+
console.log(
|
|
174
|
+
`[5/6] Submitting transfer that should be blocked: ` +
|
|
175
|
+
`${DENIED_AMOUNT} ${TOKEN_ID} -> ${destination}`,
|
|
176
|
+
);
|
|
177
|
+
try {
|
|
178
|
+
await txApi.transferTokens(walletId, {
|
|
179
|
+
chain_id: CHAIN_ID,
|
|
180
|
+
dst_addr: destination,
|
|
181
|
+
token_id: TOKEN_ID,
|
|
182
|
+
amount: DENIED_AMOUNT,
|
|
183
|
+
});
|
|
184
|
+
} catch (error) {
|
|
185
|
+
const { http, payload } = parseApiError(error);
|
|
186
|
+
const err = payload.error ?? {};
|
|
187
|
+
console.log(
|
|
188
|
+
` DENIED as expected: http=${http} ` +
|
|
189
|
+
`code=${err.code ?? '-'} reason=${err.reason ?? '-'}`,
|
|
190
|
+
);
|
|
191
|
+
if (err.details) {
|
|
192
|
+
console.log(` details: ${JSON.stringify(err.details)}`);
|
|
193
|
+
}
|
|
194
|
+
if (payload.suggestion) {
|
|
195
|
+
console.log(` suggestion: ${payload.suggestion}`);
|
|
196
|
+
}
|
|
160
197
|
|
|
161
|
-
|
|
162
|
-
|
|
198
|
+
console.log(
|
|
199
|
+
` retrying with compliant amount ${ALLOWED_AMOUNT} ${TOKEN_ID}...`,
|
|
200
|
+
);
|
|
201
|
+
const retry = (
|
|
202
|
+
await txApi.transferTokens(walletId, {
|
|
163
203
|
chain_id: CHAIN_ID,
|
|
164
|
-
dst_addr:
|
|
204
|
+
dst_addr: destination,
|
|
165
205
|
token_id: TOKEN_ID,
|
|
166
206
|
amount: ALLOWED_AMOUNT,
|
|
167
|
-
|
|
168
|
-
|
|
207
|
+
})
|
|
208
|
+
).data.result;
|
|
209
|
+
console.log(
|
|
210
|
+
` RETRY ALLOWED: tx_id=${retry.id} status=${retry.status} (${retry.status_display ?? '-'}) ` +
|
|
211
|
+
`request_id=${retry.request_id} hash=${retry.transaction_hash ?? '-'}`,
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// Step 6: Verify allowed and denied events in audit logs.
|
|
216
|
+
console.log('[6/6] Fetching recent audit entries for this wallet...');
|
|
217
|
+
const logs = await auditApi.listAuditLogs(
|
|
218
|
+
walletId,
|
|
219
|
+
undefined,
|
|
220
|
+
undefined,
|
|
221
|
+
undefined,
|
|
222
|
+
undefined,
|
|
223
|
+
undefined,
|
|
224
|
+
undefined,
|
|
225
|
+
undefined,
|
|
226
|
+
undefined,
|
|
227
|
+
20,
|
|
228
|
+
);
|
|
229
|
+
const items = (logs.data.result as { items?: Array<{ result?: string }> })?.items ?? [];
|
|
230
|
+
const allowedCount = items.filter(item => item.result === 'allowed').length;
|
|
231
|
+
const deniedCount = items.filter(item => item.result === 'denied').length;
|
|
232
|
+
console.log(
|
|
233
|
+
` audit (last ${items.length} entries): allowed=${allowedCount}, denied=${deniedCount}`,
|
|
234
|
+
);
|
|
169
235
|
}
|
|
170
236
|
|
|
171
|
-
main().catch(
|
|
237
|
+
main().catch(error => {
|
|
238
|
+
console.error(error);
|
|
239
|
+
process.exit(1);
|
|
240
|
+
});
|
|
172
241
|
```
|
|
173
242
|
|
|
174
243
|
## Contributing
|
package/dist/api/audit-api.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Cobo Agentic Wallet Service
|
|
3
3
|
*
|
|
4
|
-
* The version of the OpenAPI document: 1.
|
|
4
|
+
* The version of the OpenAPI document: 1.3.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
7
7
|
* https://openapi-generator.tech
|
package/dist/api/audit-api.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Cobo Agentic Wallet Service
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.3.0
|
|
6
6
|
*
|
|
7
7
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
8
8
|
* https://openapi-generator.tech
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Cobo Agentic Wallet Service
|
|
3
3
|
*
|
|
4
|
-
* The version of the OpenAPI document: 1.
|
|
4
|
+
* The version of the OpenAPI document: 1.3.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
7
7
|
* https://openapi-generator.tech
|
package/dist/api/balance-api.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Cobo Agentic Wallet Service
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.3.0
|
|
6
6
|
*
|
|
7
7
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
8
8
|
* https://openapi-generator.tech
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Cobo Agentic Wallet Service
|
|
3
3
|
*
|
|
4
|
-
* The version of the OpenAPI document: 1.
|
|
4
|
+
* The version of the OpenAPI document: 1.3.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
7
7
|
* https://openapi-generator.tech
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Cobo Agentic Wallet Service
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.3.0
|
|
6
6
|
*
|
|
7
7
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
8
8
|
* https://openapi-generator.tech
|
package/dist/api/faucet-api.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Cobo Agentic Wallet Service
|
|
3
3
|
*
|
|
4
|
-
* The version of the OpenAPI document: 1.
|
|
4
|
+
* The version of the OpenAPI document: 1.3.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
7
7
|
* https://openapi-generator.tech
|
package/dist/api/faucet-api.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Cobo Agentic Wallet Service
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.3.0
|
|
6
6
|
*
|
|
7
7
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
8
8
|
* https://openapi-generator.tech
|
package/dist/api/health-api.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Cobo Agentic Wallet Service
|
|
3
3
|
*
|
|
4
|
-
* The version of the OpenAPI document: 1.
|
|
4
|
+
* The version of the OpenAPI document: 1.3.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
7
7
|
* https://openapi-generator.tech
|
package/dist/api/health-api.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Cobo Agentic Wallet Service
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.3.0
|
|
6
6
|
*
|
|
7
7
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
8
8
|
* https://openapi-generator.tech
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Cobo Agentic Wallet Service
|
|
3
3
|
*
|
|
4
|
-
* The version of the OpenAPI document: 1.
|
|
4
|
+
* The version of the OpenAPI document: 1.3.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
7
7
|
* https://openapi-generator.tech
|
package/dist/api/identity-api.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Cobo Agentic Wallet Service
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.3.0
|
|
6
6
|
*
|
|
7
7
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
8
8
|
* https://openapi-generator.tech
|
package/dist/api/meta-api.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Cobo Agentic Wallet Service
|
|
3
3
|
*
|
|
4
|
-
* The version of the OpenAPI document: 1.
|
|
4
|
+
* The version of the OpenAPI document: 1.3.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
7
7
|
* https://openapi-generator.tech
|
package/dist/api/meta-api.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Cobo Agentic Wallet Service
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.3.0
|
|
6
6
|
*
|
|
7
7
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
8
8
|
* https://openapi-generator.tech
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Cobo Agentic Wallet Service
|
|
3
3
|
*
|
|
4
|
-
* The version of the OpenAPI document: 1.
|
|
4
|
+
* The version of the OpenAPI document: 1.3.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
7
7
|
* https://openapi-generator.tech
|
package/dist/api/metadata-api.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Cobo Agentic Wallet Service
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.3.0
|
|
6
6
|
*
|
|
7
7
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
8
8
|
* https://openapi-generator.tech
|
package/dist/api/pacts-api.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Cobo Agentic Wallet Service
|
|
3
3
|
*
|
|
4
|
-
* The version of the OpenAPI document: 1.
|
|
4
|
+
* The version of the OpenAPI document: 1.3.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
7
7
|
* https://openapi-generator.tech
|
package/dist/api/pacts-api.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Cobo Agentic Wallet Service
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.3.0
|
|
6
6
|
*
|
|
7
7
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
8
8
|
* https://openapi-generator.tech
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Cobo Agentic Wallet Service
|
|
3
3
|
*
|
|
4
|
-
* The version of the OpenAPI document: 1.
|
|
4
|
+
* The version of the OpenAPI document: 1.3.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
7
7
|
* https://openapi-generator.tech
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Cobo Agentic Wallet Service
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.3.0
|
|
6
6
|
*
|
|
7
7
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
8
8
|
* https://openapi-generator.tech
|