@paysponge/sdk 0.1.75 → 0.1.88
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 +5 -0
- package/dist/api/generated/openapi/apis/default-api.d.ts +180 -1
- package/dist/api/generated/openapi/apis/default-api.d.ts.map +1 -1
- package/dist/api/generated/openapi/apis/default-api.js +179 -1
- package/dist/api/generated/openapi/apis/default-api.js.map +1 -1
- package/dist/api/generated/openapi/models/index.d.ts +2 -0
- package/dist/api/generated/openapi/models/index.d.ts.map +1 -1
- package/dist/api/generated/openapi/models/index.js +2 -0
- package/dist/api/generated/openapi/models/index.js.map +1 -1
- package/dist/api/generated/openapi/models/post-api-bank-onboard-request.d.ts +6 -0
- package/dist/api/generated/openapi/models/post-api-bank-onboard-request.d.ts.map +1 -1
- package/dist/api/generated/openapi/models/post-api-bank-onboard-request.js +2 -0
- package/dist/api/generated/openapi/models/post-api-bank-onboard-request.js.map +1 -1
- package/dist/api/generated/openapi/models/post-api-hackathon-claim-request.d.ts +45 -0
- package/dist/api/generated/openapi/models/post-api-hackathon-claim-request.d.ts.map +1 -0
- package/dist/api/generated/openapi/models/post-api-hackathon-claim-request.js +52 -0
- package/dist/api/generated/openapi/models/post-api-hackathon-claim-request.js.map +1 -0
- package/dist/api/generated/openapi/models/post-api-hackathon-validate-request.d.ts +39 -0
- package/dist/api/generated/openapi/models/post-api-hackathon-validate-request.d.ts.map +1 -0
- package/dist/api/generated/openapi/models/post-api-hackathon-validate-request.js +48 -0
- package/dist/api/generated/openapi/models/post-api-hackathon-validate-request.js.map +1 -0
- package/dist/api/generated/openapi/models/post-api-mpp-fetch-request.d.ts +1 -1
- package/dist/api/generated/openapi/models/post-api-mpp-fetch-request.js +2 -2
- package/dist/api/generated/openapi/models/post-api-mpp-fetch-request.js.map +1 -1
- package/dist/api/generated/openapi/models/post-api-mpp-session-start-request.d.ts +1 -1
- package/dist/api/generated/openapi/models/post-api-mpp-session-start-request.js +2 -2
- package/dist/api/generated/openapi/models/post-api-mpp-session-start-request.js.map +1 -1
- package/dist/api/generated/openapi/models/post-api-onramp-crypto-request.d.ts +1 -1
- package/dist/api/generated/openapi/models/post-api-onramp-crypto-request.js +1 -1
- package/dist/api/generated/openapi/models/post-api-onramp-crypto-request.js.map +1 -1
- package/dist/api/generated/openapi/models/post-api-paid-fetch-request.d.ts +14 -0
- package/dist/api/generated/openapi/models/post-api-paid-fetch-request.d.ts.map +1 -1
- package/dist/api/generated/openapi/models/post-api-paid-fetch-request.js +9 -0
- package/dist/api/generated/openapi/models/post-api-paid-fetch-request.js.map +1 -1
- package/dist/api/generated/openapi/models/post-api-sponge-card-contracts-by-contract-id-fund-request.d.ts +6 -0
- package/dist/api/generated/openapi/models/post-api-sponge-card-contracts-by-contract-id-fund-request.d.ts.map +1 -1
- package/dist/api/generated/openapi/models/post-api-sponge-card-contracts-by-contract-id-fund-request.js +2 -0
- package/dist/api/generated/openapi/models/post-api-sponge-card-contracts-by-contract-id-fund-request.js.map +1 -1
- package/dist/api/generated/openapi/models/post-api-sponge-card-onboard-request.d.ts +11 -5
- package/dist/api/generated/openapi/models/post-api-sponge-card-onboard-request.d.ts.map +1 -1
- package/dist/api/generated/openapi/models/post-api-sponge-card-onboard-request.js +7 -15
- package/dist/api/generated/openapi/models/post-api-sponge-card-onboard-request.js.map +1 -1
- package/dist/api/generated/openapi/models/post-api-transactions-bridge-request.d.ts +14 -14
- package/dist/api/generated/openapi/models/post-api-transactions-bridge-request.js +15 -15
- package/dist/api/generated/openapi/models/post-api-transactions-bridge-request.js.map +1 -1
- package/dist/api/generated/openapi/models/post-api-transfers-evm-request.d.ts +1 -0
- package/dist/api/generated/openapi/models/post-api-transfers-evm-request.d.ts.map +1 -1
- package/dist/api/generated/openapi/models/post-api-transfers-evm-request.js +1 -0
- package/dist/api/generated/openapi/models/post-api-transfers-evm-request.js.map +1 -1
- package/dist/api/http.d.ts +10 -0
- package/dist/api/http.d.ts.map +1 -1
- package/dist/api/http.js +26 -0
- package/dist/api/http.js.map +1 -1
- package/dist/api/public-tools.d.ts +1 -0
- package/dist/api/public-tools.d.ts.map +1 -1
- package/dist/api/public-tools.js.map +1 -1
- package/dist/api/transactions.js +1 -1
- package/dist/api/transactions.js.map +1 -1
- package/dist/auth/device-flow.d.ts.map +1 -1
- package/dist/auth/device-flow.js +6 -0
- package/dist/auth/device-flow.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +484 -2
- package/dist/cli.js.map +1 -1
- package/dist/client.d.ts +3 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js.map +1 -1
- package/dist/platform.d.ts +5 -5
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +90 -38
- package/dist/platform.js.map +1 -1
- package/dist/registration.d.ts.map +1 -1
- package/dist/registration.js +4 -0
- package/dist/registration.js.map +1 -1
- package/dist/tools/definitions.d.ts.map +1 -1
- package/dist/tools/definitions.js +450 -10
- package/dist/tools/definitions.js.map +1 -1
- package/dist/tools/executor.d.ts.map +1 -1
- package/dist/tools/executor.js +116 -0
- package/dist/tools/executor.js.map +1 -1
- package/dist/types/schemas.d.ts +38 -23
- package/dist/types/schemas.d.ts.map +1 -1
- package/dist/types/schemas.js +20 -4
- package/dist/types/schemas.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -46,8 +46,13 @@ export const TOOL_DEFINITIONS = [
|
|
|
46
46
|
enum: [
|
|
47
47
|
"ethereum",
|
|
48
48
|
"base",
|
|
49
|
+
"arbitrum-one",
|
|
50
|
+
"monad",
|
|
51
|
+
"polygon",
|
|
49
52
|
"sepolia",
|
|
50
53
|
"base-sepolia",
|
|
54
|
+
"arbitrum-sepolia",
|
|
55
|
+
"polygon-amoy",
|
|
51
56
|
"tempo-testnet",
|
|
52
57
|
"tempo",
|
|
53
58
|
"solana",
|
|
@@ -76,13 +81,13 @@ export const TOOL_DEFINITIONS = [
|
|
|
76
81
|
},
|
|
77
82
|
{
|
|
78
83
|
name: "evm_transfer",
|
|
79
|
-
description: "Transfer native tokens or USDC on Ethereum, Base, Polygon, or their testnets. Supports native (ETH/POL) and USDC transfers.",
|
|
84
|
+
description: "Transfer native tokens or USDC on Ethereum, Base, Arbitrum, Polygon, Monad, or their testnets. Supports native (ETH/MON/POL) and USDC transfers.",
|
|
80
85
|
input_schema: {
|
|
81
86
|
type: "object",
|
|
82
87
|
properties: {
|
|
83
88
|
chain: {
|
|
84
89
|
type: "string",
|
|
85
|
-
enum: ["ethereum", "base", "polygon", "sepolia", "base-sepolia", "polygon-amoy"],
|
|
90
|
+
enum: ["ethereum", "base", "arbitrum-one", "monad", "polygon", "sepolia", "base-sepolia", "arbitrum-sepolia", "polygon-amoy", "monad-testnet"],
|
|
86
91
|
description: "The chain to transfer on",
|
|
87
92
|
},
|
|
88
93
|
to: {
|
|
@@ -95,8 +100,8 @@ export const TOOL_DEFINITIONS = [
|
|
|
95
100
|
},
|
|
96
101
|
currency: {
|
|
97
102
|
type: "string",
|
|
98
|
-
enum: ["ETH", "POL", "USDC"],
|
|
99
|
-
description: "The currency to transfer (ETH for Ethereum/Base, POL for Polygon, or USDC)",
|
|
103
|
+
enum: ["ETH", "MON", "POL", "USDC"],
|
|
104
|
+
description: "The currency to transfer (ETH for Ethereum/Base/Arbitrum, MON for Monad, POL for Polygon, or USDC)",
|
|
100
105
|
},
|
|
101
106
|
},
|
|
102
107
|
required: ["chain", "to", "amount", "currency"],
|
|
@@ -321,18 +326,18 @@ export const TOOL_DEFINITIONS = [
|
|
|
321
326
|
},
|
|
322
327
|
{
|
|
323
328
|
name: "bridge",
|
|
324
|
-
description: "Bridge tokens between different blockchains using deBridge. Supports Ethereum, Base, and
|
|
329
|
+
description: "Bridge tokens between different blockchains using deBridge. Supports Ethereum, Base, Arbitrum, Polygon, Monad, Tempo, Solana, and Hyperliquid where routes are available.",
|
|
325
330
|
input_schema: {
|
|
326
331
|
type: "object",
|
|
327
332
|
properties: {
|
|
328
333
|
sourceChain: {
|
|
329
334
|
type: "string",
|
|
330
|
-
enum: ["ethereum", "base", "sepolia", "base-sepolia", "solana", "solana-devnet"],
|
|
335
|
+
enum: ["ethereum", "base", "arbitrum-one", "polygon", "monad", "tempo", "sepolia", "base-sepolia", "arbitrum-sepolia", "polygon-amoy", "monad-testnet", "solana", "solana-devnet"],
|
|
331
336
|
description: "The source chain to bridge FROM",
|
|
332
337
|
},
|
|
333
338
|
destinationChain: {
|
|
334
339
|
type: "string",
|
|
335
|
-
enum: ["ethereum", "base", "sepolia", "base-sepolia", "solana", "solana-devnet"],
|
|
340
|
+
enum: ["ethereum", "base", "arbitrum-one", "polygon", "monad", "tempo", "hyperliquid", "polymarket", "sepolia", "base-sepolia", "arbitrum-sepolia", "polygon-amoy", "monad-testnet", "solana", "solana-devnet"],
|
|
336
341
|
description: "The destination chain to bridge TO",
|
|
337
342
|
},
|
|
338
343
|
token: {
|
|
@@ -525,8 +530,8 @@ export const TOOL_DEFINITIONS = [
|
|
|
525
530
|
{
|
|
526
531
|
name: "paid_fetch",
|
|
527
532
|
description: "Make an HTTP request with automatic paid API handling. " +
|
|
528
|
-
"This is the main one-shot paid fetch tool. It
|
|
529
|
-
"and
|
|
533
|
+
"This is the main one-shot paid fetch tool. It detects x402 or MPP from the endpoint's 402 challenge, " +
|
|
534
|
+
"handles the matching payment flow, and if both are advertised chooses the route with the highest available stablecoin balance.",
|
|
530
535
|
input_schema: {
|
|
531
536
|
type: "object",
|
|
532
537
|
properties: {
|
|
@@ -552,6 +557,11 @@ export const TOOL_DEFINITIONS = [
|
|
|
552
557
|
enum: ["base", "solana", "tempo", "ethereum"],
|
|
553
558
|
description: "Preferred wallet chain to spend from. This is a hint, not a hard requirement.",
|
|
554
559
|
},
|
|
560
|
+
protocol: {
|
|
561
|
+
type: "string",
|
|
562
|
+
enum: ["x402", "mpp"],
|
|
563
|
+
description: "Explicit protocol override/debug option. Omit to route from the endpoint's 402 response and balance tie-breaker.",
|
|
564
|
+
},
|
|
555
565
|
},
|
|
556
566
|
required: ["url"],
|
|
557
567
|
},
|
|
@@ -854,6 +864,211 @@ export const TOOL_DEFINITIONS = [
|
|
|
854
864
|
{ key: "created_at", label: "Created" },
|
|
855
865
|
], "Key stored"),
|
|
856
866
|
},
|
|
867
|
+
{
|
|
868
|
+
name: "bank_onboard",
|
|
869
|
+
description: "Start or resume banking onboarding. Returns a KYC verification link until internal KYC is approved, then a Bridge terms URL unless the customer is already active.",
|
|
870
|
+
input_schema: {
|
|
871
|
+
type: "object",
|
|
872
|
+
properties: {
|
|
873
|
+
wallet_id: {
|
|
874
|
+
type: "string",
|
|
875
|
+
description: "Optional wallet ID to associate with the onboarding request.",
|
|
876
|
+
},
|
|
877
|
+
redirect_uri: {
|
|
878
|
+
type: "string",
|
|
879
|
+
description: "URL to redirect to after KYC completion.",
|
|
880
|
+
},
|
|
881
|
+
customer_type: {
|
|
882
|
+
type: "string",
|
|
883
|
+
enum: ["individual", "business"],
|
|
884
|
+
description: "Customer type. KYC-backed bank onboarding currently supports individual customers only.",
|
|
885
|
+
},
|
|
886
|
+
signed_agreement_id: {
|
|
887
|
+
type: "string",
|
|
888
|
+
description: "Bridge signed agreement ID from the terms redirect, used to finish KYC-backed customer creation.",
|
|
889
|
+
},
|
|
890
|
+
},
|
|
891
|
+
required: [],
|
|
892
|
+
},
|
|
893
|
+
cli_output: fieldsOutput([
|
|
894
|
+
{ key: "kyc_url", label: "Verification URL" },
|
|
895
|
+
{ key: ["customer", "kycStatus"], label: "KYC status" },
|
|
896
|
+
{ key: ["customer", "tosStatus"], label: "TOS status" },
|
|
897
|
+
{ key: "message", label: "Message" },
|
|
898
|
+
], "Bank onboarding"),
|
|
899
|
+
},
|
|
900
|
+
{
|
|
901
|
+
name: "bank_status",
|
|
902
|
+
description: "Check Bridge banking onboarding, KYC, terms, and capability status.",
|
|
903
|
+
input_schema: {
|
|
904
|
+
type: "object",
|
|
905
|
+
properties: {},
|
|
906
|
+
required: [],
|
|
907
|
+
},
|
|
908
|
+
cli_output: fieldsOutput([
|
|
909
|
+
{ key: "onboarded", label: "Onboarded" },
|
|
910
|
+
{ key: ["customer", "status"], label: "Status" },
|
|
911
|
+
{ key: ["customer", "kycStatus"], label: "KYC status" },
|
|
912
|
+
{ key: ["customer", "tosStatus"], label: "TOS status" },
|
|
913
|
+
{ key: ["customer", "hostedLinkUrl"], label: "Hosted link" },
|
|
914
|
+
{ key: "message", label: "Message" },
|
|
915
|
+
], "Bank status"),
|
|
916
|
+
},
|
|
917
|
+
{
|
|
918
|
+
name: "bank_create_virtual_account",
|
|
919
|
+
description: "Create or retrieve a virtual bank account for a wallet to receive USD deposits as USDC.",
|
|
920
|
+
input_schema: {
|
|
921
|
+
type: "object",
|
|
922
|
+
properties: {
|
|
923
|
+
wallet_id: {
|
|
924
|
+
type: "string",
|
|
925
|
+
description: "Wallet ID to create a virtual account for.",
|
|
926
|
+
},
|
|
927
|
+
},
|
|
928
|
+
required: ["wallet_id"],
|
|
929
|
+
},
|
|
930
|
+
cli_output: fieldsOutput([
|
|
931
|
+
{ key: ["virtual_account", "id"], label: "ID" },
|
|
932
|
+
{ key: ["virtual_account", "status"], label: "Status" },
|
|
933
|
+
{ key: ["virtual_account", "walletId"], label: "Wallet" },
|
|
934
|
+
{ key: ["virtual_account", "destinationPaymentRail"], label: "Rail" },
|
|
935
|
+
{ key: ["virtual_account", "destinationAddress"], label: "Destination" },
|
|
936
|
+
{ key: ["virtual_account", "depositInstructions"], label: "Deposit instructions" },
|
|
937
|
+
{ key: "message", label: "Message" },
|
|
938
|
+
], "Virtual bank account"),
|
|
939
|
+
},
|
|
940
|
+
{
|
|
941
|
+
name: "bank_get_virtual_account",
|
|
942
|
+
description: "Get virtual bank account deposit instructions for one wallet, or list all virtual bank accounts.",
|
|
943
|
+
input_schema: {
|
|
944
|
+
type: "object",
|
|
945
|
+
properties: {
|
|
946
|
+
wallet_id: {
|
|
947
|
+
type: "string",
|
|
948
|
+
description: "Wallet ID to get. Omit to list all virtual accounts.",
|
|
949
|
+
},
|
|
950
|
+
},
|
|
951
|
+
required: [],
|
|
952
|
+
},
|
|
953
|
+
cli_output: fieldsOutput([
|
|
954
|
+
{ key: "found", label: "Found" },
|
|
955
|
+
{ key: "count", label: "Count" },
|
|
956
|
+
{ key: "accounts", label: "Accounts" },
|
|
957
|
+
{ key: ["virtual_account", "id"], label: "ID" },
|
|
958
|
+
{ key: ["virtual_account", "status"], label: "Status" },
|
|
959
|
+
{ key: ["virtual_account", "depositInstructions"], label: "Deposit instructions" },
|
|
960
|
+
{ key: "message", label: "Message" },
|
|
961
|
+
], "Virtual bank account"),
|
|
962
|
+
},
|
|
963
|
+
{
|
|
964
|
+
name: "bank_list_external_accounts",
|
|
965
|
+
description: "List linked external US bank accounts for ACH or wire payouts.",
|
|
966
|
+
input_schema: {
|
|
967
|
+
type: "object",
|
|
968
|
+
properties: {},
|
|
969
|
+
required: [],
|
|
970
|
+
},
|
|
971
|
+
cli_output: tableOutput([
|
|
972
|
+
{ key: "id", label: "ID" },
|
|
973
|
+
{ key: "bankName", label: "Bank" },
|
|
974
|
+
{ key: "last4", label: "Last 4" },
|
|
975
|
+
{ key: "accountType", label: "Type" },
|
|
976
|
+
{ key: "active", label: "Active" },
|
|
977
|
+
], "External bank accounts", "accounts", "No linked bank accounts found."),
|
|
978
|
+
},
|
|
979
|
+
{
|
|
980
|
+
name: "bank_add_external_account",
|
|
981
|
+
description: "Link an external US bank account for receiving USD ACH or wire payouts.",
|
|
982
|
+
input_schema: {
|
|
983
|
+
type: "object",
|
|
984
|
+
properties: {
|
|
985
|
+
bank_name: { type: "string", description: "Bank name." },
|
|
986
|
+
account_owner_name: { type: "string", description: "Full name of the account holder." },
|
|
987
|
+
routing_number: { type: "string", description: "9-digit ABA routing number." },
|
|
988
|
+
account_number: { type: "string", description: "Bank account number." },
|
|
989
|
+
checking_or_savings: {
|
|
990
|
+
type: "string",
|
|
991
|
+
enum: ["checking", "savings"],
|
|
992
|
+
description: "Bank account type.",
|
|
993
|
+
},
|
|
994
|
+
street_line_1: { type: "string", description: "Account holder street address line 1." },
|
|
995
|
+
street_line_2: { type: "string", description: "Street address line 2." },
|
|
996
|
+
city: { type: "string", description: "City." },
|
|
997
|
+
state: { type: "string", description: "US state, e.g. CA." },
|
|
998
|
+
postal_code: { type: "string", description: "ZIP code." },
|
|
999
|
+
},
|
|
1000
|
+
required: [
|
|
1001
|
+
"bank_name",
|
|
1002
|
+
"account_owner_name",
|
|
1003
|
+
"routing_number",
|
|
1004
|
+
"account_number",
|
|
1005
|
+
"checking_or_savings",
|
|
1006
|
+
"street_line_1",
|
|
1007
|
+
"city",
|
|
1008
|
+
"state",
|
|
1009
|
+
"postal_code",
|
|
1010
|
+
],
|
|
1011
|
+
},
|
|
1012
|
+
cli_output: fieldsOutput([
|
|
1013
|
+
{ key: ["account", "id"], label: "ID" },
|
|
1014
|
+
{ key: ["account", "bankName"], label: "Bank" },
|
|
1015
|
+
{ key: ["account", "last4"], label: "Last 4" },
|
|
1016
|
+
{ key: ["account", "accountType"], label: "Type" },
|
|
1017
|
+
{ key: "message", label: "Message" },
|
|
1018
|
+
], "External bank account"),
|
|
1019
|
+
},
|
|
1020
|
+
{
|
|
1021
|
+
name: "bank_send",
|
|
1022
|
+
description: "Send USD from a crypto wallet to a linked external bank account by funding a Bridge payout with USDC.",
|
|
1023
|
+
input_schema: {
|
|
1024
|
+
type: "object",
|
|
1025
|
+
properties: {
|
|
1026
|
+
wallet_id: { type: "string", description: "Wallet ID to send USDC from." },
|
|
1027
|
+
external_account_id: {
|
|
1028
|
+
type: "string",
|
|
1029
|
+
description: "External bank account ID from bank_list_external_accounts.",
|
|
1030
|
+
},
|
|
1031
|
+
amount: { type: "string", description: "USD amount, e.g. '100.00'." },
|
|
1032
|
+
payment_rail: {
|
|
1033
|
+
type: "string",
|
|
1034
|
+
enum: ["ach", "wire"],
|
|
1035
|
+
description: "Payout rail. Defaults to ach.",
|
|
1036
|
+
},
|
|
1037
|
+
},
|
|
1038
|
+
required: ["wallet_id", "external_account_id", "amount"],
|
|
1039
|
+
},
|
|
1040
|
+
cli_output: fieldsOutput([
|
|
1041
|
+
{ key: ["transfer", "id"], label: "ID" },
|
|
1042
|
+
{ key: ["transfer", "status"], label: "Status" },
|
|
1043
|
+
{ key: ["transfer", "amount"], label: "Amount" },
|
|
1044
|
+
{ key: ["transfer", "destinationPaymentRail"], label: "Rail" },
|
|
1045
|
+
{ key: ["transfer", "fundingTxHash"], label: "Funding tx" },
|
|
1046
|
+
{ key: ["transfer", "fundingExplorerUrl"], label: "Explorer" },
|
|
1047
|
+
{ key: "message", label: "Message" },
|
|
1048
|
+
], "Bank transfer"),
|
|
1049
|
+
},
|
|
1050
|
+
{
|
|
1051
|
+
name: "bank_list_transfers",
|
|
1052
|
+
description: "List bank transfer history, optionally filtered by transfer ID.",
|
|
1053
|
+
input_schema: {
|
|
1054
|
+
type: "object",
|
|
1055
|
+
properties: {
|
|
1056
|
+
transfer_id: {
|
|
1057
|
+
type: "string",
|
|
1058
|
+
description: "Optional transfer ID to filter by.",
|
|
1059
|
+
},
|
|
1060
|
+
},
|
|
1061
|
+
required: [],
|
|
1062
|
+
},
|
|
1063
|
+
cli_output: tableOutput([
|
|
1064
|
+
{ key: "id", label: "ID" },
|
|
1065
|
+
{ key: "status", label: "Status" },
|
|
1066
|
+
{ key: "amount", label: "Amount" },
|
|
1067
|
+
{ key: "destinationPaymentRail", label: "Rail" },
|
|
1068
|
+
{ key: "fundingTxHash", label: "Funding tx" },
|
|
1069
|
+
{ key: "createdAt", label: "Created" },
|
|
1070
|
+
], "Bank transfers", "transfers", "No bank transfers found."),
|
|
1071
|
+
},
|
|
857
1072
|
{
|
|
858
1073
|
name: "store_credit_card",
|
|
859
1074
|
description: "Store credit card details in encrypted secret storage for this agent. " +
|
|
@@ -1036,11 +1251,233 @@ export const TOOL_DEFINITIONS = [
|
|
|
1036
1251
|
required: [],
|
|
1037
1252
|
},
|
|
1038
1253
|
},
|
|
1254
|
+
{
|
|
1255
|
+
name: "report_card_usage",
|
|
1256
|
+
description: "Report the outcome of a purchase attempt that used a stored or vaulted card. " +
|
|
1257
|
+
"Use this after checkout to log success/failure and update spending usage.",
|
|
1258
|
+
input_schema: {
|
|
1259
|
+
type: "object",
|
|
1260
|
+
properties: {
|
|
1261
|
+
payment_method_id: { type: "string", description: "Payment method ID used for the purchase." },
|
|
1262
|
+
merchant_name: { type: "string", description: "Merchant name." },
|
|
1263
|
+
merchant_domain: { type: "string", description: "Merchant domain." },
|
|
1264
|
+
amount: { type: "string", description: "Amount charged or attempted." },
|
|
1265
|
+
currency: { type: "string", description: "Currency for the amount, e.g. USD." },
|
|
1266
|
+
status: {
|
|
1267
|
+
type: "string",
|
|
1268
|
+
enum: ["success", "failed", "cancelled"],
|
|
1269
|
+
description: "Outcome of the purchase attempt.",
|
|
1270
|
+
},
|
|
1271
|
+
failure_reason: { type: "string", description: "Failure reason when status is failed." },
|
|
1272
|
+
},
|
|
1273
|
+
required: ["payment_method_id", "status"],
|
|
1274
|
+
},
|
|
1275
|
+
cli_output: fieldsOutput([
|
|
1276
|
+
{ key: "status", label: "Status" },
|
|
1277
|
+
{ key: "message", label: "Message" },
|
|
1278
|
+
{ key: "payment_method_id", label: "Payment method" },
|
|
1279
|
+
], "Card usage"),
|
|
1280
|
+
},
|
|
1281
|
+
{
|
|
1282
|
+
name: "get_sponge_card_status",
|
|
1283
|
+
description: "Get the user's Sponge Card onboarding, consent, card, and balance status. " +
|
|
1284
|
+
"Use this before onboarding, terms acceptance, card creation, funding, withdrawal, or card-detail retrieval. " +
|
|
1285
|
+
"Card balance amounts include explicit cent fields and formatted USD display fields, e.g. spending_power_cents=250 means spending_power_display='$2.50'.",
|
|
1286
|
+
input_schema: {
|
|
1287
|
+
type: "object",
|
|
1288
|
+
properties: {
|
|
1289
|
+
refresh: {
|
|
1290
|
+
type: "boolean",
|
|
1291
|
+
description: "Force-refresh issuer application status before returning. Defaults to true.",
|
|
1292
|
+
},
|
|
1293
|
+
},
|
|
1294
|
+
required: [],
|
|
1295
|
+
},
|
|
1296
|
+
cli_output: fieldsOutput([
|
|
1297
|
+
{ key: "onboarded", label: "Onboarded" },
|
|
1298
|
+
{ key: "environment", label: "Environment" },
|
|
1299
|
+
{ key: "ready_for_card_creation", label: "Ready for card creation" },
|
|
1300
|
+
{ key: ["customer", "application_status"], label: "Application status" },
|
|
1301
|
+
{ key: ["balances", "spending_power_display"], label: "Spending power" },
|
|
1302
|
+
{ key: ["balances", "credit_limit_display"], label: "Credit limit" },
|
|
1303
|
+
{ key: ["balances", "pending_charges_display"], label: "Pending charges" },
|
|
1304
|
+
{ key: ["balances", "posted_charges_display"], label: "Posted charges" },
|
|
1305
|
+
{ key: ["balances", "balance_due_display"], label: "Balance due" },
|
|
1306
|
+
{ key: "completion_link_url", label: "Completion link" },
|
|
1307
|
+
{ key: "message", label: "Message" },
|
|
1308
|
+
], "Sponge Card status"),
|
|
1309
|
+
},
|
|
1310
|
+
{
|
|
1311
|
+
name: "onboard_sponge_card",
|
|
1312
|
+
description: "Start Sponge Card onboarding for the authenticated user, returning a KYC verification link first when internal KYC is missing, and record Sponge consent acknowledgements. " +
|
|
1313
|
+
"The issuer environment is determined by API key mode. Call get_sponge_card_status afterwards to check approval.",
|
|
1314
|
+
input_schema: {
|
|
1315
|
+
type: "object",
|
|
1316
|
+
properties: {
|
|
1317
|
+
redirect_uri: {
|
|
1318
|
+
type: "string",
|
|
1319
|
+
description: "URL to redirect to after KYC completion.",
|
|
1320
|
+
},
|
|
1321
|
+
occupation: { type: "string", description: "Occupation or SOC code." },
|
|
1322
|
+
e_sign_consent: { type: "boolean", description: "Must be true: user accepts the E-Sign Consent." },
|
|
1323
|
+
account_opening_privacy_notice: {
|
|
1324
|
+
type: "boolean",
|
|
1325
|
+
description: "Required for US KYC: user accepts the Account Opening Privacy Notice.",
|
|
1326
|
+
},
|
|
1327
|
+
sponge_card_terms: {
|
|
1328
|
+
type: "boolean",
|
|
1329
|
+
description: "Must be true: user accepts Sponge Card terms and issuer privacy policy.",
|
|
1330
|
+
},
|
|
1331
|
+
information_certification: {
|
|
1332
|
+
type: "boolean",
|
|
1333
|
+
description: "Must be true: user certifies KYC information is accurate.",
|
|
1334
|
+
},
|
|
1335
|
+
unauthorized_solicitation_acknowledgement: {
|
|
1336
|
+
type: "boolean",
|
|
1337
|
+
description: "Must be true: user acknowledges applying is not unauthorized solicitation.",
|
|
1338
|
+
},
|
|
1339
|
+
},
|
|
1340
|
+
required: [],
|
|
1341
|
+
},
|
|
1342
|
+
cli_output: fieldsOutput([
|
|
1343
|
+
{ key: "submitted_application", label: "Submitted application" },
|
|
1344
|
+
{ key: "environment", label: "Environment" },
|
|
1345
|
+
{ key: "ready_for_card_creation", label: "Ready for card creation" },
|
|
1346
|
+
{ key: "kyc_url", label: "KYC URL" },
|
|
1347
|
+
{ key: "message", label: "Message" },
|
|
1348
|
+
], "Sponge Card onboarding"),
|
|
1349
|
+
},
|
|
1350
|
+
{
|
|
1351
|
+
name: "accept_sponge_card_terms",
|
|
1352
|
+
description: "Record Sponge Card consent acknowledgements for an existing application. " +
|
|
1353
|
+
"Use this when get_sponge_card_status says the application is approved but Sponge consent is missing.",
|
|
1354
|
+
input_schema: {
|
|
1355
|
+
type: "object",
|
|
1356
|
+
properties: {
|
|
1357
|
+
e_sign_consent: { type: "boolean", description: "Must be true: user accepts the E-Sign Consent." },
|
|
1358
|
+
account_opening_privacy_notice: {
|
|
1359
|
+
type: "boolean",
|
|
1360
|
+
description: "Required for US KYC: user accepts the Account Opening Privacy Notice.",
|
|
1361
|
+
},
|
|
1362
|
+
sponge_card_terms: {
|
|
1363
|
+
type: "boolean",
|
|
1364
|
+
description: "Must be true: user accepts Sponge Card terms and issuer privacy policy.",
|
|
1365
|
+
},
|
|
1366
|
+
information_certification: {
|
|
1367
|
+
type: "boolean",
|
|
1368
|
+
description: "Must be true: user certifies KYC information is accurate.",
|
|
1369
|
+
},
|
|
1370
|
+
unauthorized_solicitation_acknowledgement: {
|
|
1371
|
+
type: "boolean",
|
|
1372
|
+
description: "Must be true: user acknowledges applying is not unauthorized solicitation.",
|
|
1373
|
+
},
|
|
1374
|
+
},
|
|
1375
|
+
required: [
|
|
1376
|
+
"e_sign_consent",
|
|
1377
|
+
"sponge_card_terms",
|
|
1378
|
+
"information_certification",
|
|
1379
|
+
"unauthorized_solicitation_acknowledgement",
|
|
1380
|
+
],
|
|
1381
|
+
},
|
|
1382
|
+
cli_output: fieldsOutput([
|
|
1383
|
+
{ key: "environment", label: "Environment" },
|
|
1384
|
+
{ key: "ready_for_card_creation", label: "Ready for card creation" },
|
|
1385
|
+
{ key: "message", label: "Message" },
|
|
1386
|
+
], "Sponge Card terms"),
|
|
1387
|
+
},
|
|
1388
|
+
{
|
|
1389
|
+
name: "create_sponge_card",
|
|
1390
|
+
description: "Create the user's Sponge Card after issuer approval and Sponge consent. " +
|
|
1391
|
+
"If a card already exists for the environment, the API returns the existing card instead of issuing a duplicate.",
|
|
1392
|
+
input_schema: {
|
|
1393
|
+
type: "object",
|
|
1394
|
+
properties: {
|
|
1395
|
+
billing: {
|
|
1396
|
+
type: "object",
|
|
1397
|
+
description: "Billing address: line1, optional line2, city, region, postal_code, country_code.",
|
|
1398
|
+
},
|
|
1399
|
+
email: { type: "string", description: "Contact email to store with the card." },
|
|
1400
|
+
phone: { type: "string", description: "Contact phone to store with the card." },
|
|
1401
|
+
shipping: {
|
|
1402
|
+
type: "object",
|
|
1403
|
+
description: "Optional shipping address. Same address fields as billing, plus optional first_name and last_name.",
|
|
1404
|
+
},
|
|
1405
|
+
},
|
|
1406
|
+
required: ["billing", "email", "phone"],
|
|
1407
|
+
},
|
|
1408
|
+
cli_output: fieldsOutput([
|
|
1409
|
+
{ key: "created", label: "Created" },
|
|
1410
|
+
{ key: "environment", label: "Environment" },
|
|
1411
|
+
{ key: ["card", "id"], label: "Card ID" },
|
|
1412
|
+
{ key: ["card", "status"], label: "Status" },
|
|
1413
|
+
{ key: ["card", "last4"], label: "Last 4" },
|
|
1414
|
+
{ key: "message", label: "Message" },
|
|
1415
|
+
], "Sponge Card"),
|
|
1416
|
+
},
|
|
1417
|
+
{
|
|
1418
|
+
name: "get_sponge_card_details",
|
|
1419
|
+
description: "Fetch encrypted PAN/CVC for the user's Sponge Card plus a per-call secret_key for local AES-128-GCM decryption and current spending power. " +
|
|
1420
|
+
"Use spending_power_display for user-facing output; spending_power_cents is an integer in cents, so 250 means $2.50. " +
|
|
1421
|
+
"Treat the response and decrypted values as highly sensitive; do not log or persist them.",
|
|
1422
|
+
input_schema: {
|
|
1423
|
+
type: "object",
|
|
1424
|
+
properties: {},
|
|
1425
|
+
required: [],
|
|
1426
|
+
},
|
|
1427
|
+
cli_output: fieldsOutput([
|
|
1428
|
+
{ key: "last4", label: "Last 4" },
|
|
1429
|
+
{ key: "expiration_month", label: "Expiry month" },
|
|
1430
|
+
{ key: "expiration_year", label: "Expiry year" },
|
|
1431
|
+
{ key: "status", label: "Status" },
|
|
1432
|
+
{ key: "spending_power_display", label: "Spending power" },
|
|
1433
|
+
{ key: "spending_power_cents", label: "Spending power cents" },
|
|
1434
|
+
{ key: "secret_key", label: "Secret key" },
|
|
1435
|
+
], "Sponge Card details"),
|
|
1436
|
+
},
|
|
1437
|
+
{
|
|
1438
|
+
name: "fund_sponge_card",
|
|
1439
|
+
description: "Top up the user's Sponge Card collateral by sending USDC from the wallet to the card collateral contract deposit address.",
|
|
1440
|
+
input_schema: {
|
|
1441
|
+
type: "object",
|
|
1442
|
+
properties: {
|
|
1443
|
+
amount: { type: "string", description: "USDC amount in human-readable units, e.g. '100.50'." },
|
|
1444
|
+
chain: { type: "string", description: "Optional collateral chain, e.g. base or solana." },
|
|
1445
|
+
},
|
|
1446
|
+
required: ["amount"],
|
|
1447
|
+
},
|
|
1448
|
+
cli_output: fieldsOutput([
|
|
1449
|
+
{ key: "tx_hash", label: "Transaction" },
|
|
1450
|
+
{ key: "transaction_id", label: "Transaction ID" },
|
|
1451
|
+
{ key: "chain_id", label: "Chain ID" },
|
|
1452
|
+
{ key: "to_address", label: "To" },
|
|
1453
|
+
{ key: "token_address", label: "Token" },
|
|
1454
|
+
{ key: "amount", label: "Amount" },
|
|
1455
|
+
], "Sponge Card funding"),
|
|
1456
|
+
},
|
|
1457
|
+
{
|
|
1458
|
+
name: "withdraw_sponge_card",
|
|
1459
|
+
description: "Withdraw USDC from Sponge Card collateral back to the user's wallet, reducing card spending power.",
|
|
1460
|
+
input_schema: {
|
|
1461
|
+
type: "object",
|
|
1462
|
+
properties: {
|
|
1463
|
+
amount: { type: "string", description: "USDC amount in human-readable units, max 2 decimal places." },
|
|
1464
|
+
chain: { type: "string", description: "Optional collateral chain, e.g. base or solana." },
|
|
1465
|
+
},
|
|
1466
|
+
required: ["amount"],
|
|
1467
|
+
},
|
|
1468
|
+
cli_output: fieldsOutput([
|
|
1469
|
+
{ key: "tx_hash", label: "Transaction" },
|
|
1470
|
+
{ key: "chain_id", label: "Chain ID" },
|
|
1471
|
+
{ key: "amount", label: "Amount" },
|
|
1472
|
+
{ key: "recipient_address", label: "Recipient" },
|
|
1473
|
+
], "Sponge Card withdrawal"),
|
|
1474
|
+
},
|
|
1039
1475
|
{
|
|
1040
1476
|
name: "get_card",
|
|
1041
1477
|
description: "Fetch the user's card details. Routes to the right card source automatically:\n\n" +
|
|
1042
1478
|
"- **Sponge Card (Rain)** — credit card backed by on-chain collateral. Returns encrypted PAN/CVC plus a per-call symmetric key for client-side AES-128-GCM decryption.\n" +
|
|
1043
1479
|
"- **Basis Theory vaulted card** — a card the user vaulted via the dashboard. Returns a short-lived BT session (`session_key` + `retrieve_url`) that you must immediately fetch over HTTP.\n\n" +
|
|
1480
|
+
"For the Sponge Card branch, use `spending_power_display` for user-facing output; `spending_power_cents` is an integer in cents, so 250 means $2.50.\n\n" +
|
|
1044
1481
|
"If the user has only one source enrolled, returns that card directly. If both sources are enrolled and `card_type` is omitted, returns `{ status: \"selection_required\", available_cards: [...] }` so you can ask the user which to use, then re-call with `card_type` set.\n\n" +
|
|
1045
1482
|
"For per-transaction virtual cards (issued on demand for a specific merchant + amount), use `issue_virtual_card` instead.",
|
|
1046
1483
|
input_schema: {
|
|
@@ -1070,7 +1507,8 @@ export const TOOL_DEFINITIONS = [
|
|
|
1070
1507
|
{ key: "card_type", label: "Card type" },
|
|
1071
1508
|
{ key: "card_last4", label: "Card last 4" },
|
|
1072
1509
|
{ key: "last4", label: "Sponge Card last 4" },
|
|
1073
|
-
{ key: "
|
|
1510
|
+
{ key: "spending_power_display", label: "Spending power" },
|
|
1511
|
+
{ key: "spending_power_cents", label: "Spending power cents" },
|
|
1074
1512
|
{ key: "email", label: "Email" },
|
|
1075
1513
|
{ key: "phone", label: "Phone" },
|
|
1076
1514
|
{ key: "retrieve_url", label: "Retrieve URL" },
|
|
@@ -1095,6 +1533,8 @@ export const TOOL_DEFINITIONS = [
|
|
|
1095
1533
|
merchant_url: { type: "string", description: "Merchant URL" },
|
|
1096
1534
|
merchant_country_code: { type: "string", description: "Merchant country code (default: US)" },
|
|
1097
1535
|
description: { type: "string", description: "Description of the purchase" },
|
|
1536
|
+
products: { type: "array", description: "Optional products being purchased." },
|
|
1537
|
+
shipping_address: { type: "object", description: "Optional shipping address for the purchase." },
|
|
1098
1538
|
enrollment_id: { type: "string", description: "Specific enrollment ID (uses default if omitted)" },
|
|
1099
1539
|
},
|
|
1100
1540
|
required: ["amount", "merchant_name", "merchant_url"],
|