@artblocks/abx-sdk 0.1.0-alpha.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/LICENSE +21 -0
- package/dist/abi/generated.d.ts +6185 -0
- package/dist/abi/generated.d.ts.map +1 -0
- package/dist/abi/generated.js +28 -0
- package/dist/abi/generated.js.map +1 -0
- package/dist/abi/index.d.ts +3227 -0
- package/dist/abi/index.d.ts.map +1 -0
- package/dist/abi/index.js +38 -0
- package/dist/abi/index.js.map +1 -0
- package/dist/chains.d.ts +27 -0
- package/dist/chains.d.ts.map +1 -0
- package/dist/chains.js +71 -0
- package/dist/chains.js.map +1 -0
- package/dist/chunks.d.ts +168 -0
- package/dist/chunks.d.ts.map +1 -0
- package/dist/chunks.js +232 -0
- package/dist/chunks.js.map +1 -0
- package/dist/clients.d.ts +42 -0
- package/dist/clients.d.ts.map +1 -0
- package/dist/clients.js +90 -0
- package/dist/clients.js.map +1 -0
- package/dist/create2.d.ts +42 -0
- package/dist/create2.d.ts.map +1 -0
- package/dist/create2.js +47 -0
- package/dist/create2.js.map +1 -0
- package/dist/deploy.d.ts +192 -0
- package/dist/deploy.d.ts.map +1 -0
- package/dist/deploy.js +231 -0
- package/dist/deploy.js.map +1 -0
- package/dist/deployments.d.ts +60 -0
- package/dist/deployments.d.ts.map +1 -0
- package/dist/deployments.js +81 -0
- package/dist/deployments.js.map +1 -0
- package/dist/deps.d.ts +109 -0
- package/dist/deps.d.ts.map +1 -0
- package/dist/deps.js +103 -0
- package/dist/deps.js.map +1 -0
- package/dist/env.d.ts +2 -0
- package/dist/env.d.ts.map +1 -0
- package/dist/env.js +45 -0
- package/dist/env.js.map +1 -0
- package/dist/fastlz.d.ts +20 -0
- package/dist/fastlz.d.ts.map +1 -0
- package/dist/fastlz.js +123 -0
- package/dist/fastlz.js.map +1 -0
- package/dist/generator.d.ts +129 -0
- package/dist/generator.d.ts.map +1 -0
- package/dist/generator.js +81 -0
- package/dist/generator.js.map +1 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/dist/ops.d.ts +379 -0
- package/dist/ops.d.ts.map +1 -0
- package/dist/ops.js +811 -0
- package/dist/ops.js.map +1 -0
- package/dist/probe.d.ts +30 -0
- package/dist/probe.d.ts.map +1 -0
- package/dist/probe.js +74 -0
- package/dist/probe.js.map +1 -0
- package/dist/reconstruct.d.ts +97 -0
- package/dist/reconstruct.d.ts.map +1 -0
- package/dist/reconstruct.js +597 -0
- package/dist/reconstruct.js.map +1 -0
- package/dist/spine.d.ts +110 -0
- package/dist/spine.d.ts.map +1 -0
- package/dist/spine.js +0 -0
- package/dist/spine.js.map +1 -0
- package/dist/token.d.ts +33 -0
- package/dist/token.d.ts.map +1 -0
- package/dist/token.js +66 -0
- package/dist/token.js.map +1 -0
- package/dist/tokendata.d.ts +50 -0
- package/dist/tokendata.d.ts.map +1 -0
- package/dist/tokendata.js +178 -0
- package/dist/tokendata.js.map +1 -0
- package/dist/traits.d.ts +38 -0
- package/dist/traits.d.ts.map +1 -0
- package/dist/traits.js +92 -0
- package/dist/traits.js.map +1 -0
- package/dist/types.d.ts +145 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +53 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The canonical on-chain generator — `AbxGenerator` (specs/protocol/code-projects.md →
|
|
3
|
+
* "The canonical generator"). One field renderer for the `animation_url` field serving both
|
|
4
|
+
* code custody modes: **template** (script chunks → the full HTML document, chain-complete
|
|
5
|
+
* when every dependency resolves to on-chain bytes) and **directory** (`code` field → a
|
|
6
|
+
* parameterized gateway URL, `text/uri-list` → landed verbatim by the metadata renderer).
|
|
7
|
+
*
|
|
8
|
+
* The view surface here is hand-written (the generator isn't a factory-synced artifact —
|
|
9
|
+
* it's a per-chain singleton recorded in the deployments manifest; see `resolveGenerator`).
|
|
10
|
+
* `onChainStatus` is the honesty read `abx verify` consumes.
|
|
11
|
+
*/
|
|
12
|
+
import type { Address } from 'viem';
|
|
13
|
+
/** The generator's view surface (IAbxFieldRenderer + the honesty/piecewise reads). */
|
|
14
|
+
export declare const abxGeneratorAbi: readonly [{
|
|
15
|
+
readonly type: "function";
|
|
16
|
+
readonly name: "render";
|
|
17
|
+
readonly stateMutability: "view";
|
|
18
|
+
readonly inputs: readonly [{
|
|
19
|
+
readonly name: "token";
|
|
20
|
+
readonly type: "address";
|
|
21
|
+
}, {
|
|
22
|
+
readonly name: "tokenId";
|
|
23
|
+
readonly type: "uint256";
|
|
24
|
+
}, {
|
|
25
|
+
readonly name: "field";
|
|
26
|
+
readonly type: "bytes32";
|
|
27
|
+
}];
|
|
28
|
+
readonly outputs: readonly [{
|
|
29
|
+
readonly name: "contentType";
|
|
30
|
+
readonly type: "string";
|
|
31
|
+
}, {
|
|
32
|
+
readonly name: "data";
|
|
33
|
+
readonly type: "bytes";
|
|
34
|
+
}];
|
|
35
|
+
}, {
|
|
36
|
+
readonly type: "function";
|
|
37
|
+
readonly name: "onChainStatus";
|
|
38
|
+
readonly stateMutability: "view";
|
|
39
|
+
readonly inputs: readonly [{
|
|
40
|
+
readonly name: "token";
|
|
41
|
+
readonly type: "address";
|
|
42
|
+
}];
|
|
43
|
+
readonly outputs: readonly [{
|
|
44
|
+
readonly name: "branch";
|
|
45
|
+
readonly type: "uint8";
|
|
46
|
+
}, {
|
|
47
|
+
readonly name: "chainComplete";
|
|
48
|
+
readonly type: "bool";
|
|
49
|
+
}, {
|
|
50
|
+
readonly name: "unresolvedRefs";
|
|
51
|
+
readonly type: "bytes32[]";
|
|
52
|
+
}, {
|
|
53
|
+
readonly name: "urlOverBudget";
|
|
54
|
+
readonly type: "bool";
|
|
55
|
+
}];
|
|
56
|
+
}, {
|
|
57
|
+
readonly type: "function";
|
|
58
|
+
readonly name: "document";
|
|
59
|
+
readonly stateMutability: "view";
|
|
60
|
+
readonly inputs: readonly [{
|
|
61
|
+
readonly name: "token";
|
|
62
|
+
readonly type: "address";
|
|
63
|
+
}, {
|
|
64
|
+
readonly name: "tokenId";
|
|
65
|
+
readonly type: "uint256";
|
|
66
|
+
}];
|
|
67
|
+
readonly outputs: readonly [{
|
|
68
|
+
readonly name: "";
|
|
69
|
+
readonly type: "string";
|
|
70
|
+
}];
|
|
71
|
+
}, {
|
|
72
|
+
readonly type: "function";
|
|
73
|
+
readonly name: "tokenDataJson";
|
|
74
|
+
readonly stateMutability: "view";
|
|
75
|
+
readonly inputs: readonly [{
|
|
76
|
+
readonly name: "token";
|
|
77
|
+
readonly type: "address";
|
|
78
|
+
}, {
|
|
79
|
+
readonly name: "tokenId";
|
|
80
|
+
readonly type: "uint256";
|
|
81
|
+
}];
|
|
82
|
+
readonly outputs: readonly [{
|
|
83
|
+
readonly name: "";
|
|
84
|
+
readonly type: "string";
|
|
85
|
+
}];
|
|
86
|
+
}, {
|
|
87
|
+
readonly type: "function";
|
|
88
|
+
readonly name: "dependencyTag";
|
|
89
|
+
readonly stateMutability: "view";
|
|
90
|
+
readonly inputs: readonly [{
|
|
91
|
+
readonly name: "token";
|
|
92
|
+
readonly type: "address";
|
|
93
|
+
}, {
|
|
94
|
+
readonly name: "index";
|
|
95
|
+
readonly type: "uint256";
|
|
96
|
+
}];
|
|
97
|
+
readonly outputs: readonly [{
|
|
98
|
+
readonly name: "";
|
|
99
|
+
readonly type: "string";
|
|
100
|
+
}];
|
|
101
|
+
}];
|
|
102
|
+
/** `AbxGenerator`'s branch constants, by index: 0 = none, 1 = template, 2 = directory. */
|
|
103
|
+
export declare const GENERATOR_BRANCHES: readonly ["none", "template", "directory"];
|
|
104
|
+
export type GeneratorBranch = (typeof GENERATOR_BRANCHES)[number];
|
|
105
|
+
/** The generator's URL size budget for the directory branch (gateway request-line cap). */
|
|
106
|
+
export declare const GENERATOR_URL_BUDGET_BYTES = 8192;
|
|
107
|
+
/** The decoded `onChainStatus` read — the `abx verify` / marketplace-tooling surface. */
|
|
108
|
+
export interface GeneratorStatus {
|
|
109
|
+
branch: number;
|
|
110
|
+
branchName: GeneratorBranch;
|
|
111
|
+
/** Template branch with EVERY dependency resolved to proven on-chain bytes. Always false off it. */
|
|
112
|
+
chainComplete: boolean;
|
|
113
|
+
/** Refs that emit `<!-- abx:unresolved … -->` markers, decoded to their readable tags. */
|
|
114
|
+
unresolvedRefs: string[];
|
|
115
|
+
/** Directory branch: the emitted URL exceeds the 8KB budget. Always false off it. */
|
|
116
|
+
urlOverBudget: boolean;
|
|
117
|
+
}
|
|
118
|
+
/** The one read this module needs — structurally satisfied by a viem `PublicClient` or a test mock. */
|
|
119
|
+
export interface GeneratorReadClient {
|
|
120
|
+
readContract(args: {
|
|
121
|
+
address: Address;
|
|
122
|
+
abi: readonly unknown[];
|
|
123
|
+
functionName: string;
|
|
124
|
+
args: readonly unknown[];
|
|
125
|
+
}): Promise<unknown>;
|
|
126
|
+
}
|
|
127
|
+
/** eth_call `generator.onChainStatus(token)` and decode it (branch name + readable refs). */
|
|
128
|
+
export declare function readGeneratorStatus(client: GeneratorReadClient, generator: Address, token: Address): Promise<GeneratorStatus>;
|
|
129
|
+
//# sourceMappingURL=generator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../src/generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAC,OAAO,EAAM,MAAM,MAAM,CAAC;AAGvC,sFAAsF;AACtF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyDlB,CAAC;AAEX,0FAA0F;AAC1F,eAAO,MAAM,kBAAkB,4CAA6C,CAAC;AAC7E,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAElE,2FAA2F;AAC3F,eAAO,MAAM,0BAA0B,OAAO,CAAC;AAE/C,yFAAyF;AACzF,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,eAAe,CAAC;IAC5B,oGAAoG;IACpG,aAAa,EAAE,OAAO,CAAC;IACvB,0FAA0F;IAC1F,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,qFAAqF;IACrF,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,uGAAuG;AACvG,MAAM,WAAW,mBAAmB;IAClC,YAAY,CAAC,IAAI,EAAE;QACjB,OAAO,EAAE,OAAO,CAAC;QACjB,GAAG,EAAE,SAAS,OAAO,EAAE,CAAC;QACxB,YAAY,EAAE,MAAM,CAAC;QACrB,IAAI,EAAE,SAAS,OAAO,EAAE,CAAC;KAC1B,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACtB;AAED,6FAA6F;AAC7F,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,mBAAmB,EAC3B,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,eAAe,CAAC,CAc1B"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { decodeTag } from './spine.js';
|
|
2
|
+
/** The generator's view surface (IAbxFieldRenderer + the honesty/piecewise reads). */
|
|
3
|
+
export const abxGeneratorAbi = [
|
|
4
|
+
{
|
|
5
|
+
type: 'function',
|
|
6
|
+
name: 'render',
|
|
7
|
+
stateMutability: 'view',
|
|
8
|
+
inputs: [
|
|
9
|
+
{ name: 'token', type: 'address' },
|
|
10
|
+
{ name: 'tokenId', type: 'uint256' },
|
|
11
|
+
{ name: 'field', type: 'bytes32' },
|
|
12
|
+
],
|
|
13
|
+
outputs: [
|
|
14
|
+
{ name: 'contentType', type: 'string' },
|
|
15
|
+
{ name: 'data', type: 'bytes' },
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
type: 'function',
|
|
20
|
+
name: 'onChainStatus',
|
|
21
|
+
stateMutability: 'view',
|
|
22
|
+
inputs: [{ name: 'token', type: 'address' }],
|
|
23
|
+
outputs: [
|
|
24
|
+
{ name: 'branch', type: 'uint8' },
|
|
25
|
+
{ name: 'chainComplete', type: 'bool' },
|
|
26
|
+
{ name: 'unresolvedRefs', type: 'bytes32[]' },
|
|
27
|
+
{ name: 'urlOverBudget', type: 'bool' },
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
type: 'function',
|
|
32
|
+
name: 'document',
|
|
33
|
+
stateMutability: 'view',
|
|
34
|
+
inputs: [
|
|
35
|
+
{ name: 'token', type: 'address' },
|
|
36
|
+
{ name: 'tokenId', type: 'uint256' },
|
|
37
|
+
],
|
|
38
|
+
outputs: [{ name: '', type: 'string' }],
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
type: 'function',
|
|
42
|
+
name: 'tokenDataJson',
|
|
43
|
+
stateMutability: 'view',
|
|
44
|
+
inputs: [
|
|
45
|
+
{ name: 'token', type: 'address' },
|
|
46
|
+
{ name: 'tokenId', type: 'uint256' },
|
|
47
|
+
],
|
|
48
|
+
outputs: [{ name: '', type: 'string' }],
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
type: 'function',
|
|
52
|
+
name: 'dependencyTag',
|
|
53
|
+
stateMutability: 'view',
|
|
54
|
+
inputs: [
|
|
55
|
+
{ name: 'token', type: 'address' },
|
|
56
|
+
{ name: 'index', type: 'uint256' },
|
|
57
|
+
],
|
|
58
|
+
outputs: [{ name: '', type: 'string' }],
|
|
59
|
+
},
|
|
60
|
+
];
|
|
61
|
+
/** `AbxGenerator`'s branch constants, by index: 0 = none, 1 = template, 2 = directory. */
|
|
62
|
+
export const GENERATOR_BRANCHES = ['none', 'template', 'directory'];
|
|
63
|
+
/** The generator's URL size budget for the directory branch (gateway request-line cap). */
|
|
64
|
+
export const GENERATOR_URL_BUDGET_BYTES = 8192;
|
|
65
|
+
/** eth_call `generator.onChainStatus(token)` and decode it (branch name + readable refs). */
|
|
66
|
+
export async function readGeneratorStatus(client, generator, token) {
|
|
67
|
+
const [branch, chainComplete, unresolvedRefs, urlOverBudget] = (await client.readContract({
|
|
68
|
+
address: generator,
|
|
69
|
+
abi: abxGeneratorAbi,
|
|
70
|
+
functionName: 'onChainStatus',
|
|
71
|
+
args: [token],
|
|
72
|
+
}));
|
|
73
|
+
return {
|
|
74
|
+
branch: Number(branch),
|
|
75
|
+
branchName: GENERATOR_BRANCHES[Number(branch)] ?? 'none',
|
|
76
|
+
chainComplete,
|
|
77
|
+
unresolvedRefs: unresolvedRefs.map((ref) => decodeTag(ref)),
|
|
78
|
+
urlOverBudget,
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../src/generator.ts"],"names":[],"mappings":"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"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @artblocks/abx-sdk — Layer 2, the neutral low-level library.
|
|
3
|
+
*
|
|
4
|
+
* Turns ABX protocol operations into typed function calls: deploy, reconstruct
|
|
5
|
+
* from chain, resolve a token, verify content. It picks no provider, no UX, and
|
|
6
|
+
* (beyond a default chain target) no chain. Everything here is something a
|
|
7
|
+
* builder could re-derive from the contracts alone — the SDK exists so they
|
|
8
|
+
* don't have to. The Self-Host Toolkit and any competing provider import this
|
|
9
|
+
* same public library.
|
|
10
|
+
*/
|
|
11
|
+
export type { Address, Hex, PublicClient, WalletClient, Account } from 'viem';
|
|
12
|
+
export * from './types.js';
|
|
13
|
+
export * from './spine.js';
|
|
14
|
+
export * from './chains.js';
|
|
15
|
+
export * from './clients.js';
|
|
16
|
+
export * from './deploy.js';
|
|
17
|
+
export * from './ops.js';
|
|
18
|
+
export * from './reconstruct.js';
|
|
19
|
+
export * from './tokendata.js';
|
|
20
|
+
export * from './probe.js';
|
|
21
|
+
export * from './token.js';
|
|
22
|
+
export * from './traits.js';
|
|
23
|
+
export * from './fastlz.js';
|
|
24
|
+
export * from './chunks.js';
|
|
25
|
+
export * from './create2.js';
|
|
26
|
+
export * from './deployments.js';
|
|
27
|
+
export * from './deps.js';
|
|
28
|
+
export * from './generator.js';
|
|
29
|
+
export { loadDotEnv } from './env.js';
|
|
30
|
+
export { oneOfOneImageAbi, oneOfOneImageFactoryAbi, seriesImageAbi, seriesImageFactoryAbi, seriesCodeAbi, seriesCodeFactoryAbi, abxSeedSourceAbi, abxMetadataRendererAbi, abxChunkStoreAbi, abxFixedPriceMinterAbi, spineEventAbi, } from './abi/index.js';
|
|
31
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,YAAY,EAAC,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,YAAY,EAAE,OAAO,EAAC,MAAM,MAAM,CAAC;AAE5E,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AACpC,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,cAAc,EACd,qBAAqB,EACrB,aAAa,EACb,oBAAoB,EACpB,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,EAChB,sBAAsB,EACtB,aAAa,GACd,MAAM,gBAAgB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export * from './types.js';
|
|
2
|
+
export * from './spine.js';
|
|
3
|
+
export * from './chains.js';
|
|
4
|
+
export * from './clients.js';
|
|
5
|
+
export * from './deploy.js';
|
|
6
|
+
export * from './ops.js';
|
|
7
|
+
export * from './reconstruct.js';
|
|
8
|
+
export * from './tokendata.js';
|
|
9
|
+
export * from './probe.js';
|
|
10
|
+
export * from './token.js';
|
|
11
|
+
export * from './traits.js';
|
|
12
|
+
export * from './fastlz.js';
|
|
13
|
+
export * from './chunks.js';
|
|
14
|
+
export * from './create2.js';
|
|
15
|
+
export * from './deployments.js';
|
|
16
|
+
export * from './deps.js';
|
|
17
|
+
export * from './generator.js';
|
|
18
|
+
export { loadDotEnv } from './env.js';
|
|
19
|
+
export { oneOfOneImageAbi, oneOfOneImageFactoryAbi, seriesImageAbi, seriesImageFactoryAbi, seriesCodeAbi, seriesCodeFactoryAbi, abxSeedSourceAbi, abxMetadataRendererAbi, abxChunkStoreAbi, abxFixedPriceMinterAbi, spineEventAbi, } from './abi/index.js';
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AACpC,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,cAAc,EACd,qBAAqB,EACrB,aAAa,EACb,oBAAoB,EACpB,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,EAChB,sBAAsB,EACtB,aAAa,GACd,MAAM,gBAAgB,CAAC"}
|
package/dist/ops.d.ts
ADDED
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
import { type Address, type Hex } from 'viem';
|
|
2
|
+
import type { OneOfOneInitParams, SeriesCodeInitParams, SeriesInitParams } from './deploy.js';
|
|
3
|
+
/**
|
|
4
|
+
* An unsigned, ready-to-sign transaction — the SDK's neutral output for every
|
|
5
|
+
* write. It carries only the data needed to sign (`to`/`data`/`value`/`chainId`)
|
|
6
|
+
* plus a human layer (`summary`/`fields`) so a UX can show the *intention*, not
|
|
7
|
+
* hex. Signing is the caller's job: an env key, a browser wallet, a multisig —
|
|
8
|
+
* the SDK takes no custody and broadcasts nothing.
|
|
9
|
+
*
|
|
10
|
+
* `to` is `null` for a contract-creation tx (the factory deploy).
|
|
11
|
+
*/
|
|
12
|
+
export interface PreparedTx {
|
|
13
|
+
op: string;
|
|
14
|
+
to: Address | null;
|
|
15
|
+
data: Hex;
|
|
16
|
+
value: Hex;
|
|
17
|
+
chainId: number;
|
|
18
|
+
summary: string;
|
|
19
|
+
fields: Record<string, string>;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Batch several ops into ONE atomic transaction via the target's
|
|
23
|
+
* `Multicallable.multicall`. This is how a human applies many owner ops — set several
|
|
24
|
+
* fields, point a renderer, lock — in a single signature instead of N transactions.
|
|
25
|
+
*
|
|
26
|
+
* Security: a multicall is *exactly* equivalent to sending each op individually from
|
|
27
|
+
* the same signer — it grants no extra authority (each subcall re-runs its own
|
|
28
|
+
* `onlyOwner`/lock checks under the preserved `msg.sender`) and it's all-or-nothing
|
|
29
|
+
* (any revert bubbles, so nothing partially applies). Enforced here:
|
|
30
|
+
* - every op MUST target the same contract — `multicall` `delegatecall`s into the
|
|
31
|
+
* contract itself, so it can only batch that contract's own functions (it is NOT a
|
|
32
|
+
* cross-contract call primitive; spanning contracts is the *account's* job — an
|
|
33
|
+
* EIP-7702 EOA, ERC-4337 account, or Safe);
|
|
34
|
+
* - every op MUST be value-free — `multicall` reverts on non-zero `msg.value` (the
|
|
35
|
+
* classic multicall double-spend guard), and no ABX op carries value anyway.
|
|
36
|
+
*/
|
|
37
|
+
export declare function prepareMulticall(args: {
|
|
38
|
+
ops: PreparedTx[];
|
|
39
|
+
chainId?: number;
|
|
40
|
+
summary?: string;
|
|
41
|
+
}): PreparedTx;
|
|
42
|
+
/**
|
|
43
|
+
* Collapse a list of ops into the minimal transaction set: same-target runs of ≥2 ops
|
|
44
|
+
* become one `multicall`, lone ops pass through untouched, and contract-creation txs
|
|
45
|
+
* (`to === null`, e.g. a factory/renderer/store deploy) are never folded. Order is
|
|
46
|
+
* preserved — important when a later op depends on an earlier one's effect — so a run is
|
|
47
|
+
* only merged while the target stays the same. This is what turns "6 owner edits" into
|
|
48
|
+
* "1 transaction" for the UX, while staying honest about what genuinely needs its own tx.
|
|
49
|
+
*/
|
|
50
|
+
export declare function batchOps(ops: PreparedTx[]): PreparedTx[];
|
|
51
|
+
/** Transfer a token to a new holder (a sale/gift settlement). Signer must be `from`. */
|
|
52
|
+
export declare function prepareTransfer(args: {
|
|
53
|
+
contract: Address;
|
|
54
|
+
from: Address;
|
|
55
|
+
to: Address;
|
|
56
|
+
tokenId: bigint | number;
|
|
57
|
+
chainId: number;
|
|
58
|
+
}): PreparedTx;
|
|
59
|
+
/**
|
|
60
|
+
* Mint the single token (id 0) to `to`. Owner-only and one-shot — for deferred
|
|
61
|
+
* issuance: deploy first (warm the resolver at the known address), then mint, or
|
|
62
|
+
* mint straight to a buyer on a primary sale. Signer must be the owner.
|
|
63
|
+
*/
|
|
64
|
+
export declare function prepareMint(args: {
|
|
65
|
+
contract: Address;
|
|
66
|
+
to: Address;
|
|
67
|
+
chainId: number;
|
|
68
|
+
}): PreparedTx;
|
|
69
|
+
/** Re-point a token's resolver BASE (move the resolver). The per-token pointer is derived
|
|
70
|
+
* on-chain as `{base}/{chainId}/{address}/{tokenId}`. Affects every token without an
|
|
71
|
+
* override. Signer must be the owner. */
|
|
72
|
+
export declare function prepareSetTokenURIBase(args: {
|
|
73
|
+
contract: Address;
|
|
74
|
+
base: string;
|
|
75
|
+
chainId: number;
|
|
76
|
+
}): PreparedTx;
|
|
77
|
+
/** Set (or clear, with "") a per-token full-URI override — a fixed locator (e.g. `ipfs://`)
|
|
78
|
+
* that wins over the derived base path for one token. Signer must be the owner. */
|
|
79
|
+
export declare function prepareSetTokenURIOverride(args: {
|
|
80
|
+
contract: Address;
|
|
81
|
+
tokenId: number | bigint;
|
|
82
|
+
uri: string;
|
|
83
|
+
chainId: number;
|
|
84
|
+
}): PreparedTx;
|
|
85
|
+
/** Re-point the collection (ERC-7572) resolver BASE; derived on-chain as
|
|
86
|
+
* `{base}/{chainId}/{address}`. Signer must be the owner. */
|
|
87
|
+
export declare function prepareSetContractURIBase(args: {
|
|
88
|
+
contract: Address;
|
|
89
|
+
base: string;
|
|
90
|
+
chainId: number;
|
|
91
|
+
}): PreparedTx;
|
|
92
|
+
/** Set (or clear, with "") the collection's full-URI override — a fixed locator that wins
|
|
93
|
+
* over the derived base. Signer must be the owner. */
|
|
94
|
+
export declare function prepareSetContractURIOverride(args: {
|
|
95
|
+
contract: Address;
|
|
96
|
+
uri: string;
|
|
97
|
+
chainId: number;
|
|
98
|
+
}): PreparedTx;
|
|
99
|
+
/**
|
|
100
|
+
* Set (or clear) the token's on-chain URI renderer — the toggle between off-chain
|
|
101
|
+
* resolution (`renderer == 0x0`, use the stored `tokenURI`) and on-chain resolution
|
|
102
|
+
* (a non-zero `IAbxMetadataRenderer` that assembles the JSON from on-chain fields).
|
|
103
|
+
* Signer must be the owner; reverts if the URI config is locked.
|
|
104
|
+
*/
|
|
105
|
+
export declare function prepareSetTokenURIRenderer(args: {
|
|
106
|
+
contract: Address;
|
|
107
|
+
renderer: Address;
|
|
108
|
+
chainId: number;
|
|
109
|
+
}): PreparedTx;
|
|
110
|
+
/** Set (or clear) the collection's on-chain URI renderer. Signer must be the owner. */
|
|
111
|
+
export declare function prepareSetContractURIRenderer(args: {
|
|
112
|
+
contract: Address;
|
|
113
|
+
renderer: Address;
|
|
114
|
+
chainId: number;
|
|
115
|
+
}): PreparedTx;
|
|
116
|
+
/** Freeze the token-URI config (pointer + renderer) forever. Irreversible. Signer = owner. */
|
|
117
|
+
export declare function prepareLockTokenURI(args: {
|
|
118
|
+
contract: Address;
|
|
119
|
+
chainId: number;
|
|
120
|
+
}): PreparedTx;
|
|
121
|
+
/** Freeze the collection-URI config forever. Irreversible. Signer = owner. */
|
|
122
|
+
export declare function prepareLockContractURI(args: {
|
|
123
|
+
contract: Address;
|
|
124
|
+
chainId: number;
|
|
125
|
+
}): PreparedTx;
|
|
126
|
+
/** Set the contract-wide default royalty. Signer must be the owner. */
|
|
127
|
+
export declare function prepareSetRoyalty(args: {
|
|
128
|
+
contract: Address;
|
|
129
|
+
receiver: Address;
|
|
130
|
+
bps: number;
|
|
131
|
+
chainId: number;
|
|
132
|
+
}): PreparedTx;
|
|
133
|
+
/**
|
|
134
|
+
* Set/replace an on-chain metadata field for a token. `field` is what (e.g. "image",
|
|
135
|
+
* "description"), `representation` is how it's carried (e.g. "inline", "keccak256",
|
|
136
|
+
* "arweave"), `value` is the bytes. Reverts once the field is locked. Signer = owner.
|
|
137
|
+
*/
|
|
138
|
+
export declare function prepareSetTokenField(args: {
|
|
139
|
+
contract: Address;
|
|
140
|
+
tokenId: bigint | number;
|
|
141
|
+
field: string;
|
|
142
|
+
representation: string;
|
|
143
|
+
value: Hex;
|
|
144
|
+
chainId: number;
|
|
145
|
+
}): PreparedTx;
|
|
146
|
+
/** Freeze a token field forever, across all its representations (irreversible). Signer = owner. */
|
|
147
|
+
export declare function prepareLockTokenField(args: {
|
|
148
|
+
contract: Address;
|
|
149
|
+
tokenId: bigint | number;
|
|
150
|
+
field: string;
|
|
151
|
+
chainId: number;
|
|
152
|
+
}): PreparedTx;
|
|
153
|
+
/** Set/replace a collection (contract-wide) on-chain metadata field. Signer = owner. */
|
|
154
|
+
export declare function prepareSetContractField(args: {
|
|
155
|
+
contract: Address;
|
|
156
|
+
field: string;
|
|
157
|
+
representation: string;
|
|
158
|
+
value: Hex;
|
|
159
|
+
chainId: number;
|
|
160
|
+
}): PreparedTx;
|
|
161
|
+
/** Freeze a collection field forever (irreversible). Signer = owner. */
|
|
162
|
+
export declare function prepareLockContractField(args: {
|
|
163
|
+
contract: Address;
|
|
164
|
+
field: string;
|
|
165
|
+
chainId: number;
|
|
166
|
+
}): PreparedTx;
|
|
167
|
+
/** Transfer contract ownership (admin). Signer must be the current owner. */
|
|
168
|
+
export declare function prepareTransferOwnership(args: {
|
|
169
|
+
contract: Address;
|
|
170
|
+
newOwner: Address;
|
|
171
|
+
chainId: number;
|
|
172
|
+
}): PreparedTx;
|
|
173
|
+
/**
|
|
174
|
+
* The unsigned form of the genesis deploy: a `deployDeterministic(params, salt)`
|
|
175
|
+
* call on the factory. The clone address is deterministic in (factory, salt) — a
|
|
176
|
+
* pure function of the salt, independent of the signer — so the URIs in `params`
|
|
177
|
+
* can be baked to point at the predicted address before anyone connects (see
|
|
178
|
+
* `predictClone`). `params.mintTo` decides whether the token mints in this tx or
|
|
179
|
+
* is deferred to a later `mint`. Building the URIs is the caller's job.
|
|
180
|
+
*/
|
|
181
|
+
export declare function prepareDeployOneOfOne(args: {
|
|
182
|
+
factory: Address;
|
|
183
|
+
params: OneOfOneInitParams;
|
|
184
|
+
salt: Hex;
|
|
185
|
+
chainId: number;
|
|
186
|
+
clone: Address;
|
|
187
|
+
}): PreparedTx;
|
|
188
|
+
/** The unsigned form of the factory (trust-anchor) deploy — a contract creation. */
|
|
189
|
+
export declare function prepareDeployFactory(args: {
|
|
190
|
+
chainId: number;
|
|
191
|
+
}): PreparedTx;
|
|
192
|
+
/** The unsigned form of the canonical metadata-renderer deploy — a contract creation. */
|
|
193
|
+
export declare function prepareDeployRenderer(args: {
|
|
194
|
+
chainId: number;
|
|
195
|
+
}): PreparedTx;
|
|
196
|
+
/**
|
|
197
|
+
* Mint the next sequential token on a Series (its metadata is its token id). Reverts when
|
|
198
|
+
* sold out.
|
|
199
|
+
*/
|
|
200
|
+
export declare function prepareSeriesMint(args: {
|
|
201
|
+
contract: Address;
|
|
202
|
+
to: Address;
|
|
203
|
+
chainId: number;
|
|
204
|
+
}): PreparedTx;
|
|
205
|
+
/** Mint `count` Series tokens in order in one tx — N individual `Transfer`s. */
|
|
206
|
+
export declare function prepareSeriesMintMany(args: {
|
|
207
|
+
contract: Address;
|
|
208
|
+
to: Address;
|
|
209
|
+
count: bigint | number;
|
|
210
|
+
chainId: number;
|
|
211
|
+
}): PreparedTx;
|
|
212
|
+
/**
|
|
213
|
+
* Set (or clear, with `0x0`) the single authorized minter. Setting a new minter atomically
|
|
214
|
+
* replaces any previous one; `0x0` clears it (back to owner-only). Signer must be the owner.
|
|
215
|
+
*/
|
|
216
|
+
export declare function prepareSetMinter(args: {
|
|
217
|
+
contract: Address;
|
|
218
|
+
minter: Address;
|
|
219
|
+
chainId: number;
|
|
220
|
+
}): PreparedTx;
|
|
221
|
+
/** Lower the supply cap (monotonic — never raises, never below the minted count). Signer = owner. */
|
|
222
|
+
export declare function prepareSetMaxInvocations(args: {
|
|
223
|
+
contract: Address;
|
|
224
|
+
maxInvocations: bigint | number;
|
|
225
|
+
chainId: number;
|
|
226
|
+
}): PreparedTx;
|
|
227
|
+
/** Pause or unpause minting. While paused only the owner may mint (reserves/config); unpausing
|
|
228
|
+
* opens it to the authorized minter. Signer must be the owner. */
|
|
229
|
+
export declare function prepareSetPaused(args: {
|
|
230
|
+
contract: Address;
|
|
231
|
+
paused: boolean;
|
|
232
|
+
chainId: number;
|
|
233
|
+
}): PreparedTx;
|
|
234
|
+
/** Set (or clear, with `0x0`) the primary-sale payout destination. Signer = owner. */
|
|
235
|
+
export declare function prepareSetPrimaryPayee(args: {
|
|
236
|
+
contract: Address;
|
|
237
|
+
payee: Address;
|
|
238
|
+
chainId: number;
|
|
239
|
+
}): PreparedTx;
|
|
240
|
+
/** The unsigned form of a Series genesis deploy — `deployDeterministic(params, salt)` on the Series factory. */
|
|
241
|
+
export declare function prepareDeploySeries(args: {
|
|
242
|
+
factory: Address;
|
|
243
|
+
params: SeriesInitParams;
|
|
244
|
+
salt: Hex;
|
|
245
|
+
chainId: number;
|
|
246
|
+
clone: Address;
|
|
247
|
+
}): PreparedTx;
|
|
248
|
+
/** The unsigned form of the Series factory (trust-anchor) deploy — a contract creation. */
|
|
249
|
+
export declare function prepareDeploySeriesFactory(args: {
|
|
250
|
+
chainId: number;
|
|
251
|
+
}): PreparedTx;
|
|
252
|
+
/**
|
|
253
|
+
* Set/update a project's fixed-price sale on the shared minter. Signer must be the ABX
|
|
254
|
+
* token's owner. `paymentToken == 0x0` prices the sale in ETH; otherwise it's that ERC-20.
|
|
255
|
+
* `price` is raw units per token; `allocation` is the max this minter may sell (its budget,
|
|
256
|
+
* distinct from the token's own `maxInvocations` cap). Enabling the sale is separate from
|
|
257
|
+
* granting mint rights — also `prepareSetMinter(token, minter)`.
|
|
258
|
+
*/
|
|
259
|
+
export declare function prepareConfigureSale(args: {
|
|
260
|
+
minter: Address;
|
|
261
|
+
token: Address;
|
|
262
|
+
paymentToken?: Address;
|
|
263
|
+
price: bigint | number;
|
|
264
|
+
allocation: bigint | number;
|
|
265
|
+
chainId: number;
|
|
266
|
+
}): PreparedTx;
|
|
267
|
+
/**
|
|
268
|
+
* Buy one token from the shared minter. `to` omitted → minted to the signer (`purchase`);
|
|
269
|
+
* `to` set → minted to that address (`purchaseTo`). `value` is the ETH to attach (equal to
|
|
270
|
+
* the sale price for an ETH sale; `0` for an ERC-20 sale, where the buyer must have approved
|
|
271
|
+
* the minter to pull `price` beforehand). Public — no owner rights needed.
|
|
272
|
+
*/
|
|
273
|
+
export declare function preparePurchase(args: {
|
|
274
|
+
minter: Address;
|
|
275
|
+
token: Address;
|
|
276
|
+
to?: Address;
|
|
277
|
+
value?: bigint | number;
|
|
278
|
+
chainId: number;
|
|
279
|
+
}): PreparedTx;
|
|
280
|
+
/** The unsigned form of the shared fixed-price minter deploy — a contract creation. */
|
|
281
|
+
export declare function prepareDeployFixedPriceMinter(args: {
|
|
282
|
+
chainId: number;
|
|
283
|
+
}): PreparedTx;
|
|
284
|
+
/** Deterministic deploy of a {SeriesCode} clone — the code-project factory op. */
|
|
285
|
+
export declare function prepareDeploySeriesCode(args: {
|
|
286
|
+
factory: Address;
|
|
287
|
+
params: SeriesCodeInitParams;
|
|
288
|
+
salt: Hex;
|
|
289
|
+
chainId: number;
|
|
290
|
+
clone: Address;
|
|
291
|
+
}): PreparedTx;
|
|
292
|
+
/** The code project's post-deploy setup: script chunks + PostParam schemas (+ dependency
|
|
293
|
+
* declarations, when the project has any; + the on-chain-URI legs under `--onchain-uri`),
|
|
294
|
+
* one atomic multicall. */
|
|
295
|
+
export declare function prepareCodeSetup(args: {
|
|
296
|
+
contract: Address;
|
|
297
|
+
calls: Hex[];
|
|
298
|
+
chainId: number;
|
|
299
|
+
chunkCount: number;
|
|
300
|
+
schemaKeys: string[];
|
|
301
|
+
deps?: string[];
|
|
302
|
+
onchainUri?: boolean;
|
|
303
|
+
}): PreparedTx;
|
|
304
|
+
/** Set/replace the dependency at `index` — `resolution` 0 = Registry (`ref` = readable
|
|
305
|
+
* `name@version` bytes32), 1 = OnChain (`ref` = a data-contract address, left-aligned).
|
|
306
|
+
* Encode the pair with `parseDependencyRef`. Signer must be the owner. */
|
|
307
|
+
export declare function prepareSetDependency(args: {
|
|
308
|
+
contract: Address;
|
|
309
|
+
index: bigint | number;
|
|
310
|
+
resolution: 0 | 1;
|
|
311
|
+
ref: Hex;
|
|
312
|
+
display?: string;
|
|
313
|
+
chainId: number;
|
|
314
|
+
}): PreparedTx;
|
|
315
|
+
/** Remove the LAST dependency (the list stays dense — order is load-bearing). Signer = owner. */
|
|
316
|
+
export declare function prepareRemoveLastDependency(args: {
|
|
317
|
+
contract: Address;
|
|
318
|
+
chainId: number;
|
|
319
|
+
}): PreparedTx;
|
|
320
|
+
/** Set (or clear, with `0x0`) the soft, non-validating dependency registry pointer —
|
|
321
|
+
* what `name@version` refs resolve through. Signer must be the owner. */
|
|
322
|
+
export declare function prepareSetDependencyRegistry(args: {
|
|
323
|
+
contract: Address;
|
|
324
|
+
registry: Address;
|
|
325
|
+
chainId: number;
|
|
326
|
+
}): PreparedTx;
|
|
327
|
+
/** Freeze the dependency set (list + registry pointer) forever. Irreversible. Signer = owner. */
|
|
328
|
+
export declare function prepareLockDependencies(args: {
|
|
329
|
+
contract: Address;
|
|
330
|
+
chainId: number;
|
|
331
|
+
}): PreparedTx;
|
|
332
|
+
/** Set a CONTRACT-scope param to a literal `bytes32` (the raw owner setter — Params base).
|
|
333
|
+
* Only for schema-less keys (a schema'd key closes the raw path: `SchemaGoverned`). This is
|
|
334
|
+
* the write behind well-known contract params like `params.keys` / `display.gateway`.
|
|
335
|
+
* Signer must be the owner. */
|
|
336
|
+
export declare function prepareSetContractParam(args: {
|
|
337
|
+
contract: Address;
|
|
338
|
+
key: string;
|
|
339
|
+
value: Hex;
|
|
340
|
+
display?: string;
|
|
341
|
+
chainId: number;
|
|
342
|
+
}): PreparedTx;
|
|
343
|
+
/** Set a CONTRACT-scope param via the data path (one blob; the evented value is its keccak256).
|
|
344
|
+
* The raw owner setter for schema-less keys — the long-form twin of {@link prepareSetContractParam}. */
|
|
345
|
+
export declare function prepareSetContractParamData(args: {
|
|
346
|
+
contract: Address;
|
|
347
|
+
key: string;
|
|
348
|
+
data: Hex;
|
|
349
|
+
chainId: number;
|
|
350
|
+
}): PreparedTx;
|
|
351
|
+
/** Wire the three param-lifecycle hook addresses (configure/augment/transfer) in ONE owner call.
|
|
352
|
+
* The contract has no per-hook setter — `setParamHooks` writes all three at once — so a caller
|
|
353
|
+
* changing one hook must pass the CURRENT values for the other two (read them via `paramHooks()`),
|
|
354
|
+
* else it silently clears them. `zeroAddress` for any role means "no hook". SeriesCode only. */
|
|
355
|
+
export declare function prepareSetParamHooks(args: {
|
|
356
|
+
contract: Address;
|
|
357
|
+
configureHook: Address;
|
|
358
|
+
augmentHook: Address;
|
|
359
|
+
transferHook: Address;
|
|
360
|
+
chainId: number;
|
|
361
|
+
}): PreparedTx;
|
|
362
|
+
/** Set a schema-governed PostParam (literal scalar) — signer must satisfy the schema's auth. */
|
|
363
|
+
export declare function prepareConfigureTokenParam(args: {
|
|
364
|
+
contract: Address;
|
|
365
|
+
tokenId: bigint;
|
|
366
|
+
key: string;
|
|
367
|
+
value: Hex;
|
|
368
|
+
display: string;
|
|
369
|
+
chainId: number;
|
|
370
|
+
}): PreparedTx;
|
|
371
|
+
/** Set a schema-governed `String`/`Bytes` PostParam (the data path — one blob, hash evented). */
|
|
372
|
+
export declare function prepareConfigureTokenParamData(args: {
|
|
373
|
+
contract: Address;
|
|
374
|
+
tokenId: bigint;
|
|
375
|
+
key: string;
|
|
376
|
+
data: Hex;
|
|
377
|
+
chainId: number;
|
|
378
|
+
}): PreparedTx;
|
|
379
|
+
//# sourceMappingURL=ops.d.ts.map
|