@oobe-protocol-labs/synapse-sap-sdk 0.15.0 → 0.16.0
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/dist/cjs/client.js +1 -1
- package/dist/cjs/client.js.map +1 -1
- package/dist/cjs/idl/synapse_agent_sap.json +2475 -898
- package/dist/esm/client.js +1 -1
- package/dist/esm/client.js.map +1 -1
- package/dist/esm/idl/synapse_agent_sap.json +2475 -898
- package/package.json +1 -1
- package/dist/esm/instructions/memory.d.ts +0 -8
- package/dist/esm/instructions/memory.d.ts.map +0 -1
- package/dist/esm/instructions/memory.js +0 -234
- package/dist/esm/instructions/memory.js.map +0 -1
- package/dist/types/constants/addresses.d.ts +0 -117
- package/dist/types/constants/addresses.d.ts.map +0 -1
- package/dist/types/constants/index.d.ts +0 -31
- package/dist/types/constants/index.d.ts.map +0 -1
- package/dist/types/constants/limits.d.ts +0 -149
- package/dist/types/constants/limits.d.ts.map +0 -1
- package/dist/types/constants/network.d.ts +0 -81
- package/dist/types/constants/network.d.ts.map +0 -1
- package/dist/types/constants/payments.d.ts +0 -121
- package/dist/types/constants/payments.d.ts.map +0 -1
- package/dist/types/constants/programs.d.ts +0 -69
- package/dist/types/constants/programs.d.ts.map +0 -1
- package/dist/types/constants/seeds.d.ts +0 -82
- package/dist/types/constants/seeds.d.ts.map +0 -1
- package/dist/types/core/client.d.ts +0 -467
- package/dist/types/core/client.d.ts.map +0 -1
- package/dist/types/core/connection.d.ts +0 -305
- package/dist/types/core/connection.d.ts.map +0 -1
- package/dist/types/core/index.d.ts +0 -20
- package/dist/types/core/index.d.ts.map +0 -1
- package/dist/types/errors/index.d.ts +0 -335
- package/dist/types/errors/index.d.ts.map +0 -1
- package/dist/types/events/geyser.d.ts +0 -150
- package/dist/types/events/geyser.d.ts.map +0 -1
- package/dist/types/events/index.d.ts +0 -248
- package/dist/types/events/index.d.ts.map +0 -1
- package/dist/types/idl/index.d.ts +0 -70
- package/dist/types/idl/index.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -86
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/modules/agent.d.ts +0 -156
- package/dist/types/modules/agent.d.ts.map +0 -1
- package/dist/types/modules/attestation.d.ts +0 -96
- package/dist/types/modules/attestation.d.ts.map +0 -1
- package/dist/types/modules/base.d.ts +0 -215
- package/dist/types/modules/base.d.ts.map +0 -1
- package/dist/types/modules/escrow-v2.d.ts +0 -285
- package/dist/types/modules/escrow-v2.d.ts.map +0 -1
- package/dist/types/modules/feedback.d.ts +0 -105
- package/dist/types/modules/feedback.d.ts.map +0 -1
- package/dist/types/modules/index.d.ts +0 -27
- package/dist/types/modules/index.d.ts.map +0 -1
- package/dist/types/modules/indexing.d.ts +0 -200
- package/dist/types/modules/indexing.d.ts.map +0 -1
- package/dist/types/modules/ledger.d.ts +0 -150
- package/dist/types/modules/ledger.d.ts.map +0 -1
- package/dist/types/modules/receipt.d.ts +0 -91
- package/dist/types/modules/receipt.d.ts.map +0 -1
- package/dist/types/modules/staking.d.ts +0 -51
- package/dist/types/modules/staking.d.ts.map +0 -1
- package/dist/types/modules/subscription.d.ts +0 -33
- package/dist/types/modules/subscription.d.ts.map +0 -1
- package/dist/types/modules/tools.d.ts +0 -172
- package/dist/types/modules/tools.d.ts.map +0 -1
- package/dist/types/modules/vault.d.ts +0 -240
- package/dist/types/modules/vault.d.ts.map +0 -1
- package/dist/types/parser/client.d.ts +0 -123
- package/dist/types/parser/client.d.ts.map +0 -1
- package/dist/types/parser/complete.d.ts +0 -90
- package/dist/types/parser/complete.d.ts.map +0 -1
- package/dist/types/parser/index.d.ts +0 -40
- package/dist/types/parser/index.d.ts.map +0 -1
- package/dist/types/parser/inner.d.ts +0 -114
- package/dist/types/parser/inner.d.ts.map +0 -1
- package/dist/types/parser/instructions.d.ts +0 -76
- package/dist/types/parser/instructions.d.ts.map +0 -1
- package/dist/types/parser/transaction.d.ts +0 -77
- package/dist/types/parser/transaction.d.ts.map +0 -1
- package/dist/types/parser/types.d.ts +0 -154
- package/dist/types/parser/types.d.ts.map +0 -1
- package/dist/types/pda/index.d.ts +0 -527
- package/dist/types/pda/index.d.ts.map +0 -1
- package/dist/types/plugin/index.d.ts +0 -171
- package/dist/types/plugin/index.d.ts.map +0 -1
- package/dist/types/plugin/protocols.d.ts +0 -152
- package/dist/types/plugin/protocols.d.ts.map +0 -1
- package/dist/types/plugin/schemas.d.ts +0 -829
- package/dist/types/plugin/schemas.d.ts.map +0 -1
- package/dist/types/postgres/adapter.d.ts +0 -355
- package/dist/types/postgres/adapter.d.ts.map +0 -1
- package/dist/types/postgres/index.d.ts +0 -24
- package/dist/types/postgres/index.d.ts.map +0 -1
- package/dist/types/postgres/serializers.d.ts +0 -30
- package/dist/types/postgres/serializers.d.ts.map +0 -1
- package/dist/types/postgres/sync.d.ts +0 -156
- package/dist/types/postgres/sync.d.ts.map +0 -1
- package/dist/types/postgres/types.d.ts +0 -167
- package/dist/types/postgres/types.d.ts.map +0 -1
- package/dist/types/registries/builder.d.ts +0 -333
- package/dist/types/registries/builder.d.ts.map +0 -1
- package/dist/types/registries/discovery.d.ts +0 -333
- package/dist/types/registries/discovery.d.ts.map +0 -1
- package/dist/types/registries/fairscale.d.ts +0 -680
- package/dist/types/registries/fairscale.d.ts.map +0 -1
- package/dist/types/registries/index.d.ts +0 -52
- package/dist/types/registries/index.d.ts.map +0 -1
- package/dist/types/registries/metaplex-bridge.d.ts +0 -488
- package/dist/types/registries/metaplex-bridge.d.ts.map +0 -1
- package/dist/types/registries/session.d.ts +0 -317
- package/dist/types/registries/session.d.ts.map +0 -1
- package/dist/types/registries/x402.d.ts +0 -523
- package/dist/types/registries/x402.d.ts.map +0 -1
- package/dist/types/types/accounts.d.ts +0 -817
- package/dist/types/types/accounts.d.ts.map +0 -1
- package/dist/types/types/common.d.ts +0 -166
- package/dist/types/types/common.d.ts.map +0 -1
- package/dist/types/types/endpoint.d.ts +0 -161
- package/dist/types/types/endpoint.d.ts.map +0 -1
- package/dist/types/types/enums.d.ts +0 -353
- package/dist/types/types/enums.d.ts.map +0 -1
- package/dist/types/types/index.d.ts +0 -29
- package/dist/types/types/index.d.ts.map +0 -1
- package/dist/types/types/instructions.d.ts +0 -400
- package/dist/types/types/instructions.d.ts.map +0 -1
- package/dist/types/utils/anchor-errors.d.ts +0 -61
- package/dist/types/utils/anchor-errors.d.ts.map +0 -1
- package/dist/types/utils/endpoint-validator.d.ts +0 -110
- package/dist/types/utils/endpoint-validator.d.ts.map +0 -1
- package/dist/types/utils/escrow-validation.d.ts +0 -145
- package/dist/types/utils/escrow-validation.d.ts.map +0 -1
- package/dist/types/utils/hash.d.ts +0 -75
- package/dist/types/utils/hash.d.ts.map +0 -1
- package/dist/types/utils/index.d.ts +0 -36
- package/dist/types/utils/index.d.ts.map +0 -1
- package/dist/types/utils/merchant-validator.d.ts +0 -176
- package/dist/types/utils/merchant-validator.d.ts.map +0 -1
- package/dist/types/utils/network-normalizer.d.ts +0 -120
- package/dist/types/utils/network-normalizer.d.ts.map +0 -1
- package/dist/types/utils/priority-fee.d.ts +0 -205
- package/dist/types/utils/priority-fee.d.ts.map +0 -1
- package/dist/types/utils/rpc-strategy.d.ts +0 -179
- package/dist/types/utils/rpc-strategy.d.ts.map +0 -1
- package/dist/types/utils/schemas.d.ts +0 -351
- package/dist/types/utils/schemas.d.ts.map +0 -1
- package/dist/types/utils/serialization.d.ts +0 -69
- package/dist/types/utils/serialization.d.ts.map +0 -1
- package/dist/types/utils/validation.d.ts +0 -29
- package/dist/types/utils/validation.d.ts.map +0 -1
- package/dist/types/utils/volume-curve.d.ts +0 -60
- package/dist/types/utils/volume-curve.d.ts.map +0 -1
- package/dist/types/utils/x402-direct.d.ts +0 -114
- package/dist/types/utils/x402-direct.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oobe-protocol-labs/synapse-sap-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "TypeScript SDK for Synapse SAP Protocol — x402 agentic escrow, dispute, staking, subscription & vault layers on Solana",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Program } from '@coral-xyz/anchor';
|
|
2
|
-
export declare class MemoryModule {
|
|
3
|
-
private program;
|
|
4
|
-
constructor(program: Program);
|
|
5
|
-
/** close_session (4 accounts, 0 args) */
|
|
6
|
-
closeSession({ signer: Signer, wallet: PublicKey, agent: PublicKey, vault: PublicKey, session: PublicKey, remainingAccounts }?: any[]): any;
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=memory.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../../src/instructions/memory.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAM,MAAM,mBAAmB,CAAC;AAEhD,qBAAa,YAAY;IACX,OAAO,CAAC,OAAO;gBAAP,OAAO,EAAE,OAAO;IAEpC,yCAAyC;IACnC,YAAY,CAAC,EACjB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,SAAS,EAChB,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,SAAS,EAClB,iBAAiB,EAAA,CAAC,EAAE,GAAG,EAAE;CAC1B"}
|
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
// ═══════════════════════════════════════════════════════════════
|
|
2
|
-
// Memory Module — generated from IDL v0.25.0
|
|
3
|
-
// 6 instructions
|
|
4
|
-
// ═══════════════════════════════════════════════════════════════
|
|
5
|
-
import { PublicKey, TransactionInstruction, SystemProgram } from '@solana/web3.js';
|
|
6
|
-
export class MemoryModule {
|
|
7
|
-
constructor(program) {
|
|
8
|
-
this.program = program;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
{
|
|
12
|
-
signer: Signer;
|
|
13
|
-
wallet: PublicKey;
|
|
14
|
-
agent: PublicKey;
|
|
15
|
-
vault: PublicKey;
|
|
16
|
-
session: PublicKey;
|
|
17
|
-
remainingAccounts ? : any[];
|
|
18
|
-
}
|
|
19
|
-
Promise < TransactionInstruction > {
|
|
20
|
-
return: await this.program
|
|
21
|
-
.methods.closeSession()
|
|
22
|
-
.accounts({
|
|
23
|
-
wallet: wallet,
|
|
24
|
-
agent: agent,
|
|
25
|
-
vault: vault,
|
|
26
|
-
session: session,
|
|
27
|
-
})
|
|
28
|
-
.remainingAccounts(remainingAccounts ?? [[]])
|
|
29
|
-
.signers([signer])
|
|
30
|
-
.instruction()
|
|
31
|
-
};
|
|
32
|
-
/** close_session_pda (4 accounts, 0 args) */
|
|
33
|
-
async;
|
|
34
|
-
closeSessionPda({
|
|
35
|
-
signer: Signer,
|
|
36
|
-
wallet: PublicKey,
|
|
37
|
-
agent: PublicKey,
|
|
38
|
-
vault: PublicKey,
|
|
39
|
-
session: PublicKey,
|
|
40
|
-
remainingAccounts: any[],
|
|
41
|
-
}, {
|
|
42
|
-
signer: Signer,
|
|
43
|
-
wallet: PublicKey,
|
|
44
|
-
agent: PublicKey,
|
|
45
|
-
vault: PublicKey,
|
|
46
|
-
session: PublicKey,
|
|
47
|
-
remainingAccounts: any[]
|
|
48
|
-
});
|
|
49
|
-
Promise < TransactionInstruction > {
|
|
50
|
-
return: await this.program
|
|
51
|
-
.methods.closeSessionPda()
|
|
52
|
-
.accounts({
|
|
53
|
-
wallet: wallet,
|
|
54
|
-
agent: agent,
|
|
55
|
-
vault: vault,
|
|
56
|
-
session: session,
|
|
57
|
-
})
|
|
58
|
-
.remainingAccounts(remainingAccounts ?? [[]])
|
|
59
|
-
.signers([signer])
|
|
60
|
-
.instruction()
|
|
61
|
-
};
|
|
62
|
-
/** create_session_checkpoint (6 accounts, 1 args) */
|
|
63
|
-
async;
|
|
64
|
-
createSessionCheckpoint({
|
|
65
|
-
signer: Signer,
|
|
66
|
-
wallet: PublicKey,
|
|
67
|
-
agent: PublicKey,
|
|
68
|
-
vault: PublicKey,
|
|
69
|
-
session: PublicKey,
|
|
70
|
-
checkpoint: PublicKey,
|
|
71
|
-
checkpoint_index: number,
|
|
72
|
-
remainingAccounts: any[],
|
|
73
|
-
}, {
|
|
74
|
-
signer: Signer,
|
|
75
|
-
wallet: PublicKey,
|
|
76
|
-
agent: PublicKey,
|
|
77
|
-
vault: PublicKey,
|
|
78
|
-
session: PublicKey,
|
|
79
|
-
checkpoint: PublicKey,
|
|
80
|
-
checkpoint_index: number,
|
|
81
|
-
remainingAccounts: any[]
|
|
82
|
-
});
|
|
83
|
-
Promise < TransactionInstruction > {
|
|
84
|
-
return: await this.program
|
|
85
|
-
.methods.createSessionCheckpoint(checkpoint_index)
|
|
86
|
-
.accounts({
|
|
87
|
-
wallet: wallet,
|
|
88
|
-
agent: agent,
|
|
89
|
-
vault: vault,
|
|
90
|
-
session: session,
|
|
91
|
-
checkpoint: checkpoint,
|
|
92
|
-
systemProgram: SystemProgram.programId,
|
|
93
|
-
})
|
|
94
|
-
.remainingAccounts(remainingAccounts ?? [[]])
|
|
95
|
-
.signers([signer])
|
|
96
|
-
.instruction()
|
|
97
|
-
};
|
|
98
|
-
/** inscribe_memory (6 accounts, 8 args) */
|
|
99
|
-
async;
|
|
100
|
-
inscribeMemory({
|
|
101
|
-
signer: Signer,
|
|
102
|
-
wallet: PublicKey,
|
|
103
|
-
agent: PublicKey,
|
|
104
|
-
vault: PublicKey,
|
|
105
|
-
session: PublicKey,
|
|
106
|
-
epochPage: PublicKey,
|
|
107
|
-
sequence: number,
|
|
108
|
-
encrypted_data: Buffer,
|
|
109
|
-
nonce: [number, number, number, number, number, number, number, number, number, number, number, number],
|
|
110
|
-
content_hash: [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number],
|
|
111
|
-
total_fragments: number,
|
|
112
|
-
fragment_index: number,
|
|
113
|
-
compression: number,
|
|
114
|
-
epoch_index: number,
|
|
115
|
-
remainingAccounts: any[],
|
|
116
|
-
}, {
|
|
117
|
-
signer: Signer,
|
|
118
|
-
wallet: PublicKey,
|
|
119
|
-
agent: PublicKey,
|
|
120
|
-
vault: PublicKey,
|
|
121
|
-
session: PublicKey,
|
|
122
|
-
epochPage: PublicKey,
|
|
123
|
-
sequence: number,
|
|
124
|
-
encrypted_data: Buffer,
|
|
125
|
-
nonce: [number, number, number, number, number, number, number, number, number, number, number, number],
|
|
126
|
-
content_hash: [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number],
|
|
127
|
-
total_fragments: number,
|
|
128
|
-
fragment_index: number,
|
|
129
|
-
compression: number,
|
|
130
|
-
epoch_index: number,
|
|
131
|
-
remainingAccounts: any[]
|
|
132
|
-
});
|
|
133
|
-
Promise < TransactionInstruction > {
|
|
134
|
-
return: await this.program
|
|
135
|
-
.methods.inscribeMemory(sequence, encrypted_data, nonce, content_hash, total_fragments, fragment_index, compression, epoch_index)
|
|
136
|
-
.accounts({
|
|
137
|
-
wallet: wallet,
|
|
138
|
-
agent: agent,
|
|
139
|
-
vault: vault,
|
|
140
|
-
session: session,
|
|
141
|
-
epochPage: epochPage,
|
|
142
|
-
systemProgram: SystemProgram.programId,
|
|
143
|
-
})
|
|
144
|
-
.remainingAccounts(remainingAccounts ?? [[]])
|
|
145
|
-
.signers([signer])
|
|
146
|
-
.instruction()
|
|
147
|
-
};
|
|
148
|
-
/** inscribe_memory_delegated (7 accounts, 8 args) */
|
|
149
|
-
async;
|
|
150
|
-
inscribeMemoryDelegated({
|
|
151
|
-
signer: Signer,
|
|
152
|
-
delegateSigner: PublicKey,
|
|
153
|
-
agent: PublicKey,
|
|
154
|
-
vault: PublicKey,
|
|
155
|
-
vaultDelegate: PublicKey,
|
|
156
|
-
session: PublicKey,
|
|
157
|
-
epochPage: PublicKey,
|
|
158
|
-
sequence: number,
|
|
159
|
-
encrypted_data: Buffer,
|
|
160
|
-
nonce: [number, number, number, number, number, number, number, number, number, number, number, number],
|
|
161
|
-
content_hash: [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number],
|
|
162
|
-
total_fragments: number,
|
|
163
|
-
fragment_index: number,
|
|
164
|
-
compression: number,
|
|
165
|
-
epoch_index: number,
|
|
166
|
-
remainingAccounts: any[],
|
|
167
|
-
}, {
|
|
168
|
-
signer: Signer,
|
|
169
|
-
delegateSigner: PublicKey,
|
|
170
|
-
agent: PublicKey,
|
|
171
|
-
vault: PublicKey,
|
|
172
|
-
vaultDelegate: PublicKey,
|
|
173
|
-
session: PublicKey,
|
|
174
|
-
epochPage: PublicKey,
|
|
175
|
-
sequence: number,
|
|
176
|
-
encrypted_data: Buffer,
|
|
177
|
-
nonce: [number, number, number, number, number, number, number, number, number, number, number, number],
|
|
178
|
-
content_hash: [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number],
|
|
179
|
-
total_fragments: number,
|
|
180
|
-
fragment_index: number,
|
|
181
|
-
compression: number,
|
|
182
|
-
epoch_index: number,
|
|
183
|
-
remainingAccounts: any[]
|
|
184
|
-
});
|
|
185
|
-
Promise < TransactionInstruction > {
|
|
186
|
-
return: await this.program
|
|
187
|
-
.methods.inscribeMemoryDelegated(sequence, encrypted_data, nonce, content_hash, total_fragments, fragment_index, compression, epoch_index)
|
|
188
|
-
.accounts({
|
|
189
|
-
delegateSigner: delegateSigner,
|
|
190
|
-
agent: agent,
|
|
191
|
-
vault: vault,
|
|
192
|
-
vaultDelegate: vaultDelegate,
|
|
193
|
-
session: session,
|
|
194
|
-
epochPage: epochPage,
|
|
195
|
-
systemProgram: SystemProgram.programId,
|
|
196
|
-
})
|
|
197
|
-
.remainingAccounts(remainingAccounts ?? [[]])
|
|
198
|
-
.signers([signer])
|
|
199
|
-
.instruction()
|
|
200
|
-
};
|
|
201
|
-
/** open_session (5 accounts, 1 args) */
|
|
202
|
-
async;
|
|
203
|
-
openSession({
|
|
204
|
-
signer: Signer,
|
|
205
|
-
wallet: PublicKey,
|
|
206
|
-
agent: PublicKey,
|
|
207
|
-
vault: PublicKey,
|
|
208
|
-
session: PublicKey,
|
|
209
|
-
session_hash: [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number],
|
|
210
|
-
remainingAccounts: any[],
|
|
211
|
-
}, {
|
|
212
|
-
signer: Signer,
|
|
213
|
-
wallet: PublicKey,
|
|
214
|
-
agent: PublicKey,
|
|
215
|
-
vault: PublicKey,
|
|
216
|
-
session: PublicKey,
|
|
217
|
-
session_hash: [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number],
|
|
218
|
-
remainingAccounts: any[]
|
|
219
|
-
});
|
|
220
|
-
Promise < TransactionInstruction > {
|
|
221
|
-
return: await this.program
|
|
222
|
-
.methods.openSession(session_hash)
|
|
223
|
-
.accounts({
|
|
224
|
-
wallet: wallet,
|
|
225
|
-
agent: agent,
|
|
226
|
-
vault: vault,
|
|
227
|
-
session: session,
|
|
228
|
-
systemProgram: SystemProgram.programId,
|
|
229
|
-
})
|
|
230
|
-
.remainingAccounts(remainingAccounts ?? [[]])
|
|
231
|
-
.signers([signer])
|
|
232
|
-
.instruction()
|
|
233
|
-
};
|
|
234
|
-
//# sourceMappingURL=memory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"memory.js","sourceRoot":"","sources":["../../../src/instructions/memory.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,8CAA8C;AAC9C,kBAAkB;AAClB,kEAAkE;AAElE,OAAO,EAAE,SAAS,EAAU,sBAAsB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAG3F,MAAM,OAAO,YAAY;IACvB,YAAoB,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Q,CAAC;QACR,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,KAAK;QACZ,KAAK,EAAE,KAAK;QACZ,OAAO,EAAE,OAAO;QAChB,aAAa,EAAE,aAAa,CAAC,SAAS;KACvC,CAAC;SACD,iBAAiB,CAAC,iBAAiB,IAAI,CAAC,EAAE,CAAC,CAAC;SAC5C,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;SACjB,WAAW,EAAqC;CACpD,CAAA"}
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module constants/addresses
|
|
3
|
-
* @description Pre-computed mainnet addresses for singleton PDAs and protocol infrastructure.
|
|
4
|
-
*
|
|
5
|
-
* These addresses are deterministic — derived from the canonical program ID
|
|
6
|
-
* and fixed seeds. They are provided for convenience so consumers can
|
|
7
|
-
* reference well-known accounts without re-deriving them.
|
|
8
|
-
*
|
|
9
|
-
* @category Constants
|
|
10
|
-
* @since v0.3.1
|
|
11
|
-
*/
|
|
12
|
-
import { PublicKey } from "@solana/web3.js";
|
|
13
|
-
/**
|
|
14
|
-
* SAP v2 program ID on mainnet-beta (base58).
|
|
15
|
-
*
|
|
16
|
-
* @name SAP_PROGRAM
|
|
17
|
-
* @description The deployed and verified SAP v2 program address.
|
|
18
|
-
* @category Constants
|
|
19
|
-
* @since v0.3.1
|
|
20
|
-
*/
|
|
21
|
-
export declare const SAP_PROGRAM: PublicKey;
|
|
22
|
-
/**
|
|
23
|
-
* Upgrade authority for the SAP v2 program.
|
|
24
|
-
*
|
|
25
|
-
* @name SAP_UPGRADE_AUTHORITY
|
|
26
|
-
* @description The wallet that holds upgrade authority over the deployed program.
|
|
27
|
-
* @category Constants
|
|
28
|
-
* @since v0.3.1
|
|
29
|
-
*/
|
|
30
|
-
export declare const SAP_UPGRADE_AUTHORITY: PublicKey;
|
|
31
|
-
/**
|
|
32
|
-
* **GlobalRegistry** PDA — the protocol singleton.
|
|
33
|
-
*
|
|
34
|
-
* Seeds: `["sap_global"]` · Bump: `255`
|
|
35
|
-
*
|
|
36
|
-
* Tracks total agent count, active agent count, and protocol-level
|
|
37
|
-
* counters. Must be initialized once before any agent can register.
|
|
38
|
-
*
|
|
39
|
-
* @name GLOBAL_REGISTRY_ADDRESS
|
|
40
|
-
* @category Constants
|
|
41
|
-
* @since v0.3.1
|
|
42
|
-
*/
|
|
43
|
-
export declare const GLOBAL_REGISTRY_ADDRESS: PublicKey;
|
|
44
|
-
/**
|
|
45
|
-
* Bump seed for the GlobalRegistry PDA.
|
|
46
|
-
* @name GLOBAL_REGISTRY_BUMP
|
|
47
|
-
* @category Constants
|
|
48
|
-
* @since v0.3.1
|
|
49
|
-
*/
|
|
50
|
-
export declare const GLOBAL_REGISTRY_BUMP = 255;
|
|
51
|
-
/**
|
|
52
|
-
* IDL metadata account derived via the `program-metadata` standard.
|
|
53
|
-
*
|
|
54
|
-
* Seeds: `["idl", program_id]` under `pmetaypqG6SiB47xMigYVMAkuHDWeSDXcv3zzDrJJvA`.
|
|
55
|
-
*
|
|
56
|
-
* Contains the Anchor IDL JSON, queryable by explorers like Solscan.
|
|
57
|
-
*
|
|
58
|
-
* @name IDL_ACCOUNT_ADDRESS
|
|
59
|
-
* @category Constants
|
|
60
|
-
* @since v0.3.1
|
|
61
|
-
*/
|
|
62
|
-
export declare const IDL_ACCOUNT_ADDRESS: PublicKey;
|
|
63
|
-
/**
|
|
64
|
-
* The `program-metadata` program used to store the IDL.
|
|
65
|
-
*
|
|
66
|
-
* @name PROGRAM_METADATA_PROGRAM
|
|
67
|
-
* @category Constants
|
|
68
|
-
* @since v0.3.1
|
|
69
|
-
*/
|
|
70
|
-
export declare const PROGRAM_METADATA_PROGRAM: PublicKey;
|
|
71
|
-
/**
|
|
72
|
-
* Pre-computed Tool Category Index PDAs for each `ToolCategory` variant.
|
|
73
|
-
*
|
|
74
|
-
* Seeds: `["sap_tool_cat", category_byte]`
|
|
75
|
-
*
|
|
76
|
-
* Each entry corresponds to a `ToolCategory` enum discriminant:
|
|
77
|
-
*
|
|
78
|
-
* | Index | Category | Address |
|
|
79
|
-
* |-------|------------|----------------------------------------------------|
|
|
80
|
-
* | 0 | Swap | `5H8yn9RuRgZWqkDiWbKNaCHzTMjqSpwbNQKMPLtUXx2G` |
|
|
81
|
-
* | 1 | Lend | `5Lqqk6VtFWnYq3h4Ae4FuUAKnFzw1Nm1DaSdt2cjcTDj` |
|
|
82
|
-
* | 2 | Stake | `kC8oAiVUcFMXEnmMNu1h2sdAc3dWKcwV5qVKRFYMmQD` |
|
|
83
|
-
* | 3 | Nft | `2zNWR9J3znvGQ5J6xDfJyZkd12Gi66mjErRDkgPeKbyF` |
|
|
84
|
-
* | 4 | Payment | `Eh7MwxJYWRN8bzAmY3ZPTRXYjWpWypokBf1STixu2dy9` |
|
|
85
|
-
* | 5 | Data | `AwpVxehQUZCVTAJ9icZfS6oRbF66jNo32duXaL11B5df` |
|
|
86
|
-
* | 6 | Governance | `2573WjZzV9QtbqtM6Z86YGivkk1kdvJa4gK3tZRQ2jkN` |
|
|
87
|
-
* | 7 | Bridge | `664nyr6kBeeFiE1ij5gtdncNCVHrXqrk2uBhnKmUREvK` |
|
|
88
|
-
* | 8 | Analytics | `4DFsiTZ6h6RoCZuUeMTpaoQguepnPUMJBLJuwwjKg5GL` |
|
|
89
|
-
* | 9 | Custom | `3Nk5dvFWEyWPEArdG9cCdab6C6ym36mSWUSB8HzN35ZM` |
|
|
90
|
-
*
|
|
91
|
-
* @name TOOL_CATEGORY_ADDRESSES
|
|
92
|
-
* @category Constants
|
|
93
|
-
* @since v0.3.1
|
|
94
|
-
*/
|
|
95
|
-
export declare const TOOL_CATEGORY_ADDRESSES: {
|
|
96
|
-
readonly Swap: PublicKey;
|
|
97
|
-
readonly Lend: PublicKey;
|
|
98
|
-
readonly Stake: PublicKey;
|
|
99
|
-
readonly Nft: PublicKey;
|
|
100
|
-
readonly Payment: PublicKey;
|
|
101
|
-
readonly Data: PublicKey;
|
|
102
|
-
readonly Governance: PublicKey;
|
|
103
|
-
readonly Bridge: PublicKey;
|
|
104
|
-
readonly Analytics: PublicKey;
|
|
105
|
-
readonly Custom: PublicKey;
|
|
106
|
-
};
|
|
107
|
-
/**
|
|
108
|
-
* Array-indexed version of {@link TOOL_CATEGORY_ADDRESSES}.
|
|
109
|
-
*
|
|
110
|
-
* `TOOL_CATEGORY_ADDRESS_LIST[0]` = Swap, `[1]` = Lend, etc.
|
|
111
|
-
*
|
|
112
|
-
* @name TOOL_CATEGORY_ADDRESS_LIST
|
|
113
|
-
* @category Constants
|
|
114
|
-
* @since v0.3.1
|
|
115
|
-
*/
|
|
116
|
-
export declare const TOOL_CATEGORY_ADDRESS_LIST: readonly PublicKey[];
|
|
117
|
-
//# sourceMappingURL=addresses.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"addresses.d.ts","sourceRoot":"","sources":["../../../src/constants/addresses.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAM5C;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,WAEvB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,WAEjC,CAAC;AAMF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,uBAAuB,WAEnC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAMxC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB,WAE/B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,WAEpC,CAAC;AAMF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;CAW1B,CAAC;AAEX;;;;;;;;GAQG;AACH,eAAO,MAAM,0BAA0B,EAAE,SAAS,SAAS,EAWjD,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module constants
|
|
3
|
-
* @description Protocol constants mirroring the on-chain Rust program.
|
|
4
|
-
*
|
|
5
|
-
* Organized into:
|
|
6
|
-
* - **programs** — Network-specific program IDs
|
|
7
|
-
* - **seeds** — PDA seed prefix strings
|
|
8
|
-
* - **limits** — Size constraints, versions, enum numeric values
|
|
9
|
-
*
|
|
10
|
-
* @category Constants
|
|
11
|
-
* @since v0.1.0
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```ts
|
|
15
|
-
* import {
|
|
16
|
-
* MAINNET_SAP_PROGRAM_ID,
|
|
17
|
-
* DEVNET_SAP_PROGRAM_ID,
|
|
18
|
-
* SEEDS,
|
|
19
|
-
* LIMITS,
|
|
20
|
-
* } from "@synapse-sap/sdk/constants";
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
|
-
export { SAP_PROGRAM_ADDRESS, MAINNET_SAP_PROGRAM_ID, DEVNET_SAP_PROGRAM_ID, LOCALNET_SAP_PROGRAM_ID, SAP_PROGRAM_ID, } from "./programs";
|
|
24
|
-
export { SEEDS } from "./seeds";
|
|
25
|
-
export type { SeedKey } from "./seeds";
|
|
26
|
-
export { LIMITS, AGENT_VERSION, VAULT_PROTOCOL_VERSION, TOOL_CATEGORY_VALUES, HTTP_METHOD_VALUES, } from "./limits";
|
|
27
|
-
export { SapNetwork } from "./network";
|
|
28
|
-
export type { SapNetworkId } from "./network";
|
|
29
|
-
export { SAP_PROGRAM, SAP_UPGRADE_AUTHORITY, GLOBAL_REGISTRY_ADDRESS, GLOBAL_REGISTRY_BUMP, IDL_ACCOUNT_ADDRESS, PROGRAM_METADATA_PROGRAM, TOOL_CATEGORY_ADDRESSES, TOOL_CATEGORY_ADDRESS_LIST, } from "./addresses";
|
|
30
|
-
export { USDC_MINT_MAINNET, USDC_MINT_DEVNET, MIN_AGENT_STAKE_LAMPORTS, MAX_DELEGATE_DURATION_SECS, isAcceptedUsdcMint, isAcceptedPaymentToken, } from "./payments";
|
|
31
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,cAAc,GACf,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,YAAY,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAGvC,OAAO,EACL,MAAM,EACN,aAAa,EACb,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAG9C,OAAO,EACL,WAAW,EACX,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,wBAAwB,EACxB,0BAA0B,EAC1B,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,YAAY,CAAC"}
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module constants/limits
|
|
3
|
-
* @description Protocol size limits, version constants, and enum numeric values.
|
|
4
|
-
*
|
|
5
|
-
* All values mirror the on-chain Rust constraints exactly.
|
|
6
|
-
* Used for client-side validation before sending transactions.
|
|
7
|
-
*
|
|
8
|
-
* @category Constants
|
|
9
|
-
* @since v0.1.0
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
12
|
-
* Protocol size constraints mirroring the Rust `impl` blocks.
|
|
13
|
-
*
|
|
14
|
-
* Use these values for client-side validation before submitting
|
|
15
|
-
* transactions — exceeding any limit will cause an on-chain error.
|
|
16
|
-
*
|
|
17
|
-
* @name LIMITS
|
|
18
|
-
* @description A frozen object containing all protocol-enforced size and length bounds.
|
|
19
|
-
* @category Constants
|
|
20
|
-
* @since v0.1.0
|
|
21
|
-
* @example
|
|
22
|
-
* ```ts
|
|
23
|
-
* import { LIMITS } from "@synapse-sap/sdk/constants";
|
|
24
|
-
*
|
|
25
|
-
* if (name.length > LIMITS.MAX_NAME_LEN) {
|
|
26
|
-
* throw new Error("Agent name too long");
|
|
27
|
-
* }
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
export declare const LIMITS: {
|
|
31
|
-
/** Max agent name length in bytes. */
|
|
32
|
-
readonly MAX_NAME_LEN: 64;
|
|
33
|
-
/** Max agent description length in bytes. */
|
|
34
|
-
readonly MAX_DESC_LEN: 256;
|
|
35
|
-
/** Max URI length (agent_uri, x402_endpoint). */
|
|
36
|
-
readonly MAX_URI_LEN: 256;
|
|
37
|
-
/** Max agent DID-style identifier length. */
|
|
38
|
-
readonly MAX_AGENT_ID_LEN: 128;
|
|
39
|
-
/** Max capabilities per agent. */
|
|
40
|
-
readonly MAX_CAPABILITIES: 10;
|
|
41
|
-
/** Max pricing tiers per agent. */
|
|
42
|
-
readonly MAX_PRICING_TIERS: 5;
|
|
43
|
-
/** Max protocol strings per agent. */
|
|
44
|
-
readonly MAX_PROTOCOLS: 5;
|
|
45
|
-
/** Max active plugins per agent. */
|
|
46
|
-
readonly MAX_PLUGINS: 5;
|
|
47
|
-
/** Max volume curve breakpoints per tier. */
|
|
48
|
-
readonly MAX_VOLUME_CURVE_POINTS: 5;
|
|
49
|
-
/** Max feedback tag length. */
|
|
50
|
-
readonly MAX_TAG_LEN: 32;
|
|
51
|
-
/** Max agents in a capability/protocol index. */
|
|
52
|
-
readonly MAX_AGENTS_PER_INDEX: 100;
|
|
53
|
-
/** Max tool name length. */
|
|
54
|
-
readonly MAX_TOOL_NAME_LEN: 32;
|
|
55
|
-
/** Max tools in a category index. */
|
|
56
|
-
readonly MAX_TOOLS_PER_CATEGORY: 100;
|
|
57
|
-
/** Max attestation type length. */
|
|
58
|
-
readonly MAX_ATTESTATION_TYPE_LEN: 32;
|
|
59
|
-
/** Max inscription size (encrypted_data per fragment). */
|
|
60
|
-
readonly MAX_INSCRIPTION_SIZE: 750;
|
|
61
|
-
/** Inscriptions per epoch page. */
|
|
62
|
-
readonly INSCRIPTIONS_PER_EPOCH: 1000;
|
|
63
|
-
/** Max memory chunk size (legacy). */
|
|
64
|
-
readonly MAX_CHUNK_SIZE: 900;
|
|
65
|
-
/** Max write size per buffer append (legacy). */
|
|
66
|
-
readonly MAX_BUFFER_WRITE_SIZE: 750;
|
|
67
|
-
/** Max total buffer page size (legacy). */
|
|
68
|
-
readonly MAX_BUFFER_TOTAL_SIZE: 10000;
|
|
69
|
-
/** Ring buffer capacity for MemoryLedger. */
|
|
70
|
-
readonly RING_CAPACITY: 4096;
|
|
71
|
-
/** Max ledger write size per call. */
|
|
72
|
-
readonly MAX_LEDGER_WRITE_SIZE: 750;
|
|
73
|
-
/** Max settlements in a batch. */
|
|
74
|
-
readonly MAX_BATCH_SETTLEMENTS: 10;
|
|
75
|
-
/** Feedback score range: 0–1000. */
|
|
76
|
-
readonly MAX_FEEDBACK_SCORE: 1000;
|
|
77
|
-
};
|
|
78
|
-
/**
|
|
79
|
-
* Current on-chain protocol version for `AgentAccount`.
|
|
80
|
-
*
|
|
81
|
-
* @name AGENT_VERSION
|
|
82
|
-
* @description Integer version stamped into every agent account on registration.
|
|
83
|
-
* @category Constants
|
|
84
|
-
* @since v0.1.0
|
|
85
|
-
*/
|
|
86
|
-
export declare const AGENT_VERSION = 1;
|
|
87
|
-
/**
|
|
88
|
-
* Current on-chain protocol version for `MemoryVault`.
|
|
89
|
-
*
|
|
90
|
-
* @name VAULT_PROTOCOL_VERSION
|
|
91
|
-
* @description Integer version stamped into every vault account on initialisation.
|
|
92
|
-
* @category Constants
|
|
93
|
-
* @since v0.1.0
|
|
94
|
-
*/
|
|
95
|
-
export declare const VAULT_PROTOCOL_VERSION = 1;
|
|
96
|
-
/**
|
|
97
|
-
* Tool category to `u8` discriminant mapping.
|
|
98
|
-
*
|
|
99
|
-
* Mirrors the Rust `ToolCategory` enum ordinals. Use these values
|
|
100
|
-
* when constructing or filtering tool-related instructions.
|
|
101
|
-
*
|
|
102
|
-
* @name TOOL_CATEGORY_VALUES
|
|
103
|
-
* @description Frozen mapping of tool category names to their on-chain `u8` discriminants.
|
|
104
|
-
* @category Constants
|
|
105
|
-
* @since v0.1.0
|
|
106
|
-
* @example
|
|
107
|
-
* ```ts
|
|
108
|
-
* import { TOOL_CATEGORY_VALUES } from "@synapse-sap/sdk/constants";
|
|
109
|
-
*
|
|
110
|
-
* const categoryByte = TOOL_CATEGORY_VALUES.Swap; // 0
|
|
111
|
-
* ```
|
|
112
|
-
*/
|
|
113
|
-
export declare const TOOL_CATEGORY_VALUES: {
|
|
114
|
-
readonly Swap: 0;
|
|
115
|
-
readonly Lend: 1;
|
|
116
|
-
readonly Stake: 2;
|
|
117
|
-
readonly Nft: 3;
|
|
118
|
-
readonly Payment: 4;
|
|
119
|
-
readonly Data: 5;
|
|
120
|
-
readonly Governance: 6;
|
|
121
|
-
readonly Bridge: 7;
|
|
122
|
-
readonly Analytics: 8;
|
|
123
|
-
readonly Custom: 9;
|
|
124
|
-
};
|
|
125
|
-
/**
|
|
126
|
-
* HTTP method to `u8` discriminant mapping.
|
|
127
|
-
*
|
|
128
|
-
* Mirrors the Rust `HttpMethod` enum ordinals. Used when publishing
|
|
129
|
-
* or filtering tool endpoints.
|
|
130
|
-
*
|
|
131
|
-
* @name HTTP_METHOD_VALUES
|
|
132
|
-
* @description Frozen mapping of HTTP method names to their on-chain `u8` discriminants.
|
|
133
|
-
* @category Constants
|
|
134
|
-
* @since v0.1.0
|
|
135
|
-
* @example
|
|
136
|
-
* ```ts
|
|
137
|
-
* import { HTTP_METHOD_VALUES } from "@synapse-sap/sdk/constants";
|
|
138
|
-
*
|
|
139
|
-
* const method = HTTP_METHOD_VALUES.Post; // 1
|
|
140
|
-
* ```
|
|
141
|
-
*/
|
|
142
|
-
export declare const HTTP_METHOD_VALUES: {
|
|
143
|
-
readonly Get: 0;
|
|
144
|
-
readonly Post: 1;
|
|
145
|
-
readonly Put: 2;
|
|
146
|
-
readonly Delete: 3;
|
|
147
|
-
readonly Compound: 4;
|
|
148
|
-
};
|
|
149
|
-
//# sourceMappingURL=limits.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"limits.d.ts","sourceRoot":"","sources":["../../../src/constants/limits.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,MAAM;IACjB,sCAAsC;;IAEtC,6CAA6C;;IAE7C,iDAAiD;;IAEjD,6CAA6C;;IAE7C,kCAAkC;;IAElC,mCAAmC;;IAEnC,sCAAsC;;IAEtC,oCAAoC;;IAEpC,6CAA6C;;IAE7C,+BAA+B;;IAE/B,iDAAiD;;IAEjD,4BAA4B;;IAE5B,qCAAqC;;IAErC,mCAAmC;;IAEnC,0DAA0D;;IAE1D,mCAAmC;;IAEnC,sCAAsC;;IAEtC,iDAAiD;;IAEjD,2CAA2C;;IAE3C,6CAA6C;;IAE7C,sCAAsC;;IAEtC,kCAAkC;;IAElC,oCAAoC;;CAE5B,CAAC;AAMX;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,IAAI,CAAC;AAE/B;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,IAAI,CAAC;AAMxC;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;CAWvB,CAAC;AAEX;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,kBAAkB;;;;;;CAMrB,CAAC"}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module constants/network
|
|
3
|
-
* @description Solana network identifiers for x402 payment headers.
|
|
4
|
-
*
|
|
5
|
-
* x402 providers validate the `X-Payment-Network` header against their
|
|
6
|
-
* own network identifier. Some providers (e.g. Coinbase, Phantom) accept
|
|
7
|
-
* the human-readable cluster name (`solana:mainnet-beta`), while others
|
|
8
|
-
* (e.g. Kamiyo, Helius x402) require the Solana genesis-hash form
|
|
9
|
-
* (`solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp`).
|
|
10
|
-
*
|
|
11
|
-
* Use {@link SapNetwork} to select the correct format, or pass any
|
|
12
|
-
* custom string where needed.
|
|
13
|
-
*
|
|
14
|
-
* @category Constants
|
|
15
|
-
* @since v0.4.3
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```ts
|
|
19
|
-
* import { SapNetwork } from "@synapse-sap/sdk";
|
|
20
|
-
*
|
|
21
|
-
* // Standard cluster name (default)
|
|
22
|
-
* const ctx = await x402.preparePayment(agentWallet, {
|
|
23
|
-
* pricePerCall: 1000, deposit: 100_000,
|
|
24
|
-
* networkIdentifier: SapNetwork.SOLANA_MAINNET,
|
|
25
|
-
* });
|
|
26
|
-
*
|
|
27
|
-
* // Genesis-hash form for providers that require it
|
|
28
|
-
* const ctx2 = await x402.preparePayment(agentWallet, {
|
|
29
|
-
* pricePerCall: 1000, deposit: 100_000,
|
|
30
|
-
* networkIdentifier: SapNetwork.SOLANA_MAINNET_GENESIS,
|
|
31
|
-
* });
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
/**
|
|
35
|
-
* @name SapNetwork
|
|
36
|
-
* @description Network identifier strings for x402 `X-Payment-Network` headers.
|
|
37
|
-
*
|
|
38
|
-
* Two mainnet forms exist because x402 providers disagree on the canonical
|
|
39
|
-
* identifier:
|
|
40
|
-
*
|
|
41
|
-
* | Constant | Value | Accepted by |
|
|
42
|
-
* |-------------------------|----------------------------------------------|----------------------|
|
|
43
|
-
* | `SOLANA_MAINNET` | `solana:mainnet-beta` | Coinbase, Phantom |
|
|
44
|
-
* | `SOLANA_MAINNET_GENESIS`| `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp` | Kamiyo, Helius x402 |
|
|
45
|
-
* | `SOLANA_DEVNET` | `solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1` | Devnet providers |
|
|
46
|
-
* | `SOLANA_DEVNET_NAMED` | `solana:devnet` | Local / test flows |
|
|
47
|
-
*
|
|
48
|
-
* If your provider requires a different format, pass a raw string instead.
|
|
49
|
-
*
|
|
50
|
-
* @category Constants
|
|
51
|
-
* @since v0.4.3
|
|
52
|
-
*/
|
|
53
|
-
export declare const SapNetwork: {
|
|
54
|
-
/**
|
|
55
|
-
* Mainnet-beta, human-readable cluster name.
|
|
56
|
-
* Default value used by the SDK prior to v0.4.3.
|
|
57
|
-
*/
|
|
58
|
-
readonly SOLANA_MAINNET: "solana:mainnet-beta";
|
|
59
|
-
/**
|
|
60
|
-
* Mainnet-beta, genesis-hash form (CAIP-2 compliant).
|
|
61
|
-
* Required by Kamiyo, Helius x402, and other providers that validate
|
|
62
|
-
* against the Solana genesis hash.
|
|
63
|
-
*/
|
|
64
|
-
readonly SOLANA_MAINNET_GENESIS: "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp";
|
|
65
|
-
/**
|
|
66
|
-
* Devnet, genesis-hash form (CAIP-2 compliant).
|
|
67
|
-
*/
|
|
68
|
-
readonly SOLANA_DEVNET: "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1";
|
|
69
|
-
/**
|
|
70
|
-
* Devnet, human-readable cluster name.
|
|
71
|
-
* Useful for local development and test validators.
|
|
72
|
-
*/
|
|
73
|
-
readonly SOLANA_DEVNET_NAMED: "solana:devnet";
|
|
74
|
-
};
|
|
75
|
-
/**
|
|
76
|
-
* @name SapNetworkId
|
|
77
|
-
* @description Union type of all known {@link SapNetwork} values.
|
|
78
|
-
* Accept `SapNetworkId | string` where custom identifiers are allowed.
|
|
79
|
-
*/
|
|
80
|
-
export type SapNetworkId = (typeof SapNetwork)[keyof typeof SapNetwork];
|
|
81
|
-
//# sourceMappingURL=network.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../../src/constants/network.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAMH;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,UAAU;IACrB;;;OAGG;;IAGH;;;;OAIG;;IAGH;;OAEG;;IAGH;;;OAGG;;CAEK,CAAC;AAEX;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC"}
|