clanker-sdk 4.1.14 → 4.1.16
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/{clankerTokenV4-DT-meked.d.ts → clankerTokenV4-3X9r2Us0.d.ts} +43 -1
- package/dist/cli/cli.js +2 -2
- package/dist/cli/create-clanker.js +1 -1
- package/dist/index.d.ts +5 -6
- package/dist/index.js +2 -2
- package/dist/v3/index.d.ts +2 -3
- package/dist/v4/extensions/index.d.ts +2 -3
- package/dist/v4/index.d.ts +65 -9
- package/dist/v4/index.js +1 -1
- package/dist/{write-clanker-contracts-P4x1JFPX.d.ts → write-clanker-contracts-Cr1eAw0k.d.ts} +4711 -2837
- package/package.json +2 -2
- package/dist/ClankerToken-Dra5lppJ.d.ts +0 -1876
|
@@ -2206,6 +2206,13 @@ declare const CLANKERS: {
|
|
|
2206
2206
|
readonly name: "";
|
|
2207
2207
|
readonly type: "address";
|
|
2208
2208
|
}];
|
|
2209
|
+
/**
|
|
2210
|
+
* Get a specific clanker deployment.
|
|
2211
|
+
*
|
|
2212
|
+
* @param chainId Chain id of the deployment.
|
|
2213
|
+
* @param type Version of the deployment.
|
|
2214
|
+
* @returns The deployment if it exists.
|
|
2215
|
+
*/
|
|
2209
2216
|
readonly name: "admins";
|
|
2210
2217
|
readonly outputs: readonly [{
|
|
2211
2218
|
readonly internalType: "bool";
|
|
@@ -3060,6 +3067,13 @@ declare const CLANKERS: {
|
|
|
3060
3067
|
readonly name: "";
|
|
3061
3068
|
readonly type: "address";
|
|
3062
3069
|
}];
|
|
3070
|
+
/**
|
|
3071
|
+
* Get a specific clanker deployment.
|
|
3072
|
+
*
|
|
3073
|
+
* @param chainId Chain id of the deployment.
|
|
3074
|
+
* @param type Version of the deployment.
|
|
3075
|
+
* @returns The deployment if it exists.
|
|
3076
|
+
*/
|
|
3063
3077
|
readonly name: "admins";
|
|
3064
3078
|
readonly outputs: readonly [{
|
|
3065
3079
|
readonly internalType: "bool";
|
|
@@ -3971,6 +3985,13 @@ declare const CLANKERS: {
|
|
|
3971
3985
|
readonly name: "";
|
|
3972
3986
|
readonly type: "uint256";
|
|
3973
3987
|
}];
|
|
3988
|
+
/**
|
|
3989
|
+
* Get a specific clanker deployment.
|
|
3990
|
+
*
|
|
3991
|
+
* @param chainId Chain id of the deployment.
|
|
3992
|
+
* @param type Version of the deployment.
|
|
3993
|
+
* @returns The deployment if it exists.
|
|
3994
|
+
*/
|
|
3974
3995
|
readonly stateMutability: "view";
|
|
3975
3996
|
readonly type: "function";
|
|
3976
3997
|
}, {
|
|
@@ -4804,6 +4825,13 @@ declare const CLANKERS: {
|
|
|
4804
4825
|
readonly name: "";
|
|
4805
4826
|
readonly type: "uint256";
|
|
4806
4827
|
}];
|
|
4828
|
+
/**
|
|
4829
|
+
* Get a specific clanker deployment.
|
|
4830
|
+
*
|
|
4831
|
+
* @param chainId Chain id of the deployment.
|
|
4832
|
+
* @param type Version of the deployment.
|
|
4833
|
+
* @returns The deployment if it exists.
|
|
4834
|
+
*/
|
|
4807
4835
|
readonly stateMutability: "view";
|
|
4808
4836
|
readonly type: "function";
|
|
4809
4837
|
}, {
|
|
@@ -5637,6 +5665,13 @@ declare const CLANKERS: {
|
|
|
5637
5665
|
readonly name: "";
|
|
5638
5666
|
readonly type: "uint256";
|
|
5639
5667
|
}];
|
|
5668
|
+
/**
|
|
5669
|
+
* Get a specific clanker deployment.
|
|
5670
|
+
*
|
|
5671
|
+
* @param chainId Chain id of the deployment.
|
|
5672
|
+
* @param type Version of the deployment.
|
|
5673
|
+
* @returns The deployment if it exists.
|
|
5674
|
+
*/
|
|
5640
5675
|
readonly stateMutability: "view";
|
|
5641
5676
|
readonly type: "function";
|
|
5642
5677
|
}, {
|
|
@@ -6470,6 +6505,13 @@ declare const CLANKERS: {
|
|
|
6470
6505
|
readonly name: "";
|
|
6471
6506
|
readonly type: "uint256";
|
|
6472
6507
|
}];
|
|
6508
|
+
/**
|
|
6509
|
+
* Get a specific clanker deployment.
|
|
6510
|
+
*
|
|
6511
|
+
* @param chainId Chain id of the deployment.
|
|
6512
|
+
* @param type Version of the deployment.
|
|
6513
|
+
* @returns The deployment if it exists.
|
|
6514
|
+
*/
|
|
6473
6515
|
readonly stateMutability: "view";
|
|
6474
6516
|
readonly type: "function";
|
|
6475
6517
|
}, {
|
|
@@ -6961,7 +7003,7 @@ declare const ClankerDeployments: Record<8453 | 10143 | 84532 | 42161 | 130, Par
|
|
|
6961
7003
|
* @param type Version of the deployment.
|
|
6962
7004
|
* @returns The deployment if it exists.
|
|
6963
7005
|
*/
|
|
6964
|
-
declare const clankerConfigFor: <T extends ClankerDeployment = ClankerDeployment
|
|
7006
|
+
declare const clankerConfigFor: <T extends ClankerDeployment<RelatedAddresses> = ClankerDeployment<RelatedAddresses>>(chainId: Chain, type: Type) => T | undefined;
|
|
6965
7007
|
|
|
6966
7008
|
/** Clanker v4 token definition. */
|
|
6967
7009
|
declare const clankerTokenV4: z.ZodObject<{
|
package/dist/cli/cli.js
CHANGED
|
@@ -9,12 +9,12 @@ var __export = (target, all) => {
|
|
|
9
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
-
// node_modules/tsup/assets/esm_shims.js
|
|
12
|
+
// node_modules/.pnpm/tsup@8.4.0_typescript@5.3.3/node_modules/tsup/assets/esm_shims.js
|
|
13
13
|
import { fileURLToPath } from "url";
|
|
14
14
|
import path from "path";
|
|
15
15
|
var getFilename, getDirname, __dirname;
|
|
16
16
|
var init_esm_shims = __esm({
|
|
17
|
-
"node_modules/tsup/assets/esm_shims.js"() {
|
|
17
|
+
"node_modules/.pnpm/tsup@8.4.0_typescript@5.3.3/node_modules/tsup/assets/esm_shims.js"() {
|
|
18
18
|
"use strict";
|
|
19
19
|
getFilename = () => fileURLToPath(import.meta.url);
|
|
20
20
|
getDirname = () => path.dirname(getFilename());
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
// node_modules/tsup/assets/esm_shims.js
|
|
3
|
+
// node_modules/.pnpm/tsup@8.4.0_typescript@5.3.3/node_modules/tsup/assets/esm_shims.js
|
|
4
4
|
import { fileURLToPath } from "url";
|
|
5
5
|
import path from "path";
|
|
6
6
|
var getFilename = () => fileURLToPath(import.meta.url);
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
export { C as ClankerTokenV3 } from './clankerTokenV3-B-1LF6gg.js';
|
|
2
|
-
import { C as Chain, a as ClankerTokenV4, b as ClankerDeployment } from './clankerTokenV4-
|
|
3
|
-
export { c as CLANKERS, f as Chains, g as ClankerDeployments, d as Clankers, R as RelatedV4, T as Type, h as clankerConfigFor } from './clankerTokenV4-
|
|
4
|
-
import { ContractConstructorArgs } from 'viem';
|
|
5
|
-
import { C as ClankerToken_v3_1_abi, a as ClankerToken_v4_abi } from './ClankerToken-Dra5lppJ.js';
|
|
2
|
+
import { C as Chain, a as ClankerTokenV4, b as ClankerDeployment } from './clankerTokenV4-3X9r2Us0.js';
|
|
3
|
+
export { c as CLANKERS, f as Chains, g as ClankerDeployments, d as Clankers, R as RelatedV4, T as Type, h as clankerConfigFor } from './clankerTokenV4-3X9r2Us0.js';
|
|
6
4
|
import { StandardMerkleTree } from '@openzeppelin/merkle-tree';
|
|
7
5
|
import 'zod/v4';
|
|
6
|
+
import 'viem';
|
|
8
7
|
|
|
9
8
|
declare const DEGEN_ADDRESS: `0x${string}`;
|
|
10
9
|
declare const NATIVE_ADDRESS: `0x${string}`;
|
|
@@ -30,13 +29,13 @@ declare enum FeeConfigs {
|
|
|
30
29
|
}
|
|
31
30
|
declare const FEE_CONFIGS: Record<FeeConfigs, Required<ClankerTokenV4['fees']>>;
|
|
32
31
|
|
|
33
|
-
declare const findVanityAddress: (args:
|
|
32
|
+
declare const findVanityAddress: (args: readonly [string, string, bigint, `0x${string}`, string, string, string, bigint], admin: `0x${string}`, suffix?: `0x${string}`, options?: {
|
|
34
33
|
chainId?: number;
|
|
35
34
|
}) => Promise<{
|
|
36
35
|
salt: `0x${string}`;
|
|
37
36
|
token: `0x${string}`;
|
|
38
37
|
}>;
|
|
39
|
-
declare const findVanityAddressV4: (args:
|
|
38
|
+
declare const findVanityAddressV4: (args: readonly [string, string, bigint, `0x${string}`, string, string, string, bigint], admin: `0x${string}`, suffix: `0x${string}` | undefined, config: ClankerDeployment) => Promise<{
|
|
40
39
|
salt: `0x${string}`;
|
|
41
40
|
token: `0x${string}`;
|
|
42
41
|
}>;
|
package/dist/index.js
CHANGED
|
@@ -82,8 +82,8 @@ var FeeConfigs = /* @__PURE__ */ ((FeeConfigs2) => {
|
|
|
82
82
|
var FEE_CONFIGS = {
|
|
83
83
|
DynamicBasic: {
|
|
84
84
|
type: "dynamic",
|
|
85
|
-
baseFee:
|
|
86
|
-
//
|
|
85
|
+
baseFee: 100,
|
|
86
|
+
// 1% minimum fee
|
|
87
87
|
maxFee: 500,
|
|
88
88
|
// 5% maximum fee
|
|
89
89
|
referenceTickFilterPeriod: 30,
|
package/dist/v3/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { C as ClankerTransactionConfig, a as Clanker_v3_1_abi, b as ClankerError, c as ClankerFactory, d as ClankerResult } from '../write-clanker-contracts-
|
|
1
|
+
import { C as ClankerTransactionConfig, a as Clanker_v3_1_abi, b as ClankerError, c as ClankerFactory, d as ClankerResult } from '../write-clanker-contracts-Cr1eAw0k.js';
|
|
2
2
|
import * as viem from 'viem';
|
|
3
3
|
import { WalletClient, Transport, Chain, Account, PublicClient } from 'viem';
|
|
4
4
|
import { C as ClankerTokenV3 } from '../clankerTokenV3-B-1LF6gg.js';
|
|
5
|
-
import '../ClankerToken-Dra5lppJ.js';
|
|
6
5
|
import 'zod/v4';
|
|
7
6
|
|
|
8
7
|
type ClankerConfig = {
|
|
@@ -1748,7 +1747,7 @@ declare class Clanker {
|
|
|
1748
1747
|
readonly stateMutability: "view";
|
|
1749
1748
|
readonly type: "function";
|
|
1750
1749
|
}], "deployToken"> & {
|
|
1751
|
-
expectedAddress?: `0x${string}
|
|
1750
|
+
expectedAddress?: `0x${string}` | undefined;
|
|
1752
1751
|
}>;
|
|
1753
1752
|
/**
|
|
1754
1753
|
* Simulate a token deployment
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { C as ClankerTransactionConfig, e as ClankerAirdrop_v4_abi, d as ClankerResult } from '../../write-clanker-contracts-
|
|
1
|
+
import { C as ClankerTransactionConfig, e as ClankerAirdrop_v4_abi, d as ClankerResult } from '../../write-clanker-contracts-Cr1eAw0k.js';
|
|
2
2
|
import { MerkleTree } from '@openzeppelin/merkle-tree/dist/merkletree.js';
|
|
3
3
|
import * as z from 'zod/v4';
|
|
4
|
-
import { C as Chain } from '../../clankerTokenV4-
|
|
4
|
+
import { C as Chain } from '../../clankerTokenV4-3X9r2Us0.js';
|
|
5
5
|
import { Clanker } from '../index.js';
|
|
6
6
|
import 'viem';
|
|
7
|
-
import '../../ClankerToken-Dra5lppJ.js';
|
|
8
7
|
|
|
9
8
|
declare const AirdropEntrySchema: z.ZodArray<z.ZodObject<{
|
|
10
9
|
account: z.ZodCustom<`0x${string}`, `0x${string}`>;
|
package/dist/v4/index.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { C as ClankerTransactionConfig, f as ClankerFeeLocker_abi, b as ClankerError, c as ClankerFactory, d as ClankerResult } from '../write-clanker-contracts-
|
|
1
|
+
import { C as ClankerTransactionConfig, f as ClankerFeeLocker_abi, b as ClankerError, c as ClankerFactory, d as ClankerResult } from '../write-clanker-contracts-Cr1eAw0k.js';
|
|
2
2
|
import * as viem from 'viem';
|
|
3
3
|
import { WalletClient, Transport, Chain, Account, PublicClient } from 'viem';
|
|
4
|
-
import { a as ClankerTokenV4 } from '../clankerTokenV4-
|
|
5
|
-
export { e as encodeFeeConfig } from '../clankerTokenV4-
|
|
6
|
-
import '../ClankerToken-Dra5lppJ.js';
|
|
4
|
+
import { a as ClankerTokenV4 } from '../clankerTokenV4-3X9r2Us0.js';
|
|
5
|
+
export { e as encodeFeeConfig } from '../clankerTokenV4-3X9r2Us0.js';
|
|
7
6
|
import 'zod/v4';
|
|
8
7
|
|
|
9
8
|
type ClankerConfig = {
|
|
@@ -294,6 +293,13 @@ declare class Clanker {
|
|
|
294
293
|
readonly name: "feeOwner";
|
|
295
294
|
readonly type: "address";
|
|
296
295
|
}, {
|
|
296
|
+
/**
|
|
297
|
+
* Check available rewards for a token and recipient.
|
|
298
|
+
*
|
|
299
|
+
* @param token Token to check rewards for
|
|
300
|
+
* @param rewardRecipient The recipient to check rewards for
|
|
301
|
+
* @returns Amount of rewards for the `token` and `rewardRecipient`
|
|
302
|
+
*/
|
|
297
303
|
readonly internalType: "address";
|
|
298
304
|
readonly name: "token";
|
|
299
305
|
readonly type: "address";
|
|
@@ -621,6 +627,13 @@ declare class Clanker {
|
|
|
621
627
|
readonly name: "feeOwner";
|
|
622
628
|
readonly type: "address";
|
|
623
629
|
}, {
|
|
630
|
+
/**
|
|
631
|
+
* Check available rewards for a token and recipient.
|
|
632
|
+
*
|
|
633
|
+
* @param token Token to check rewards for
|
|
634
|
+
* @param rewardRecipient The recipient to check rewards for
|
|
635
|
+
* @returns Amount of rewards for the `token` and `rewardRecipient`
|
|
636
|
+
*/
|
|
624
637
|
readonly internalType: "address";
|
|
625
638
|
readonly name: "token";
|
|
626
639
|
readonly type: "address";
|
|
@@ -845,7 +858,13 @@ declare class Clanker {
|
|
|
845
858
|
readonly inputs: readonly [{
|
|
846
859
|
readonly indexed: false;
|
|
847
860
|
readonly internalType: "bool";
|
|
848
|
-
readonly name: "deprecated";
|
|
861
|
+
readonly name: "deprecated"; /**
|
|
862
|
+
* Claim rewards for a clanker token.
|
|
863
|
+
*
|
|
864
|
+
* @param token Token to claim rewards for
|
|
865
|
+
* @param rewardRecipient The recipient to claim for
|
|
866
|
+
* @returns Transaction hash of the claim or error
|
|
867
|
+
*/
|
|
849
868
|
readonly type: "bool";
|
|
850
869
|
}];
|
|
851
870
|
readonly name: "SetDeprecated";
|
|
@@ -935,7 +954,13 @@ declare class Clanker {
|
|
|
935
954
|
readonly inputs: readonly [{
|
|
936
955
|
readonly indexed: false;
|
|
937
956
|
readonly internalType: "address";
|
|
938
|
-
readonly name: "msgSender";
|
|
957
|
+
readonly name: "msgSender"; /**
|
|
958
|
+
* Check available rewards for a token and recipient.
|
|
959
|
+
*
|
|
960
|
+
* @param token Token to check rewards for
|
|
961
|
+
* @param rewardRecipient The recipient to check rewards for
|
|
962
|
+
* @returns Amount of rewards for the `token` and `rewardRecipient`
|
|
963
|
+
*/
|
|
939
964
|
readonly type: "address";
|
|
940
965
|
}, {
|
|
941
966
|
readonly indexed: true;
|
|
@@ -989,7 +1014,13 @@ declare class Clanker {
|
|
|
989
1014
|
readonly type: "bytes32";
|
|
990
1015
|
}, {
|
|
991
1016
|
readonly indexed: false;
|
|
992
|
-
readonly internalType: "address";
|
|
1017
|
+
readonly internalType: "address"; /**
|
|
1018
|
+
* Simulate a token deployment
|
|
1019
|
+
*
|
|
1020
|
+
* @param token The token to deploy
|
|
1021
|
+
* @param account Optional account for the deployer
|
|
1022
|
+
* @returns Abi transaction
|
|
1023
|
+
*/
|
|
993
1024
|
readonly name: "pairedToken";
|
|
994
1025
|
readonly type: "address";
|
|
995
1026
|
}, {
|
|
@@ -1051,6 +1082,12 @@ declare class Clanker {
|
|
|
1051
1082
|
readonly outputs: readonly [{
|
|
1052
1083
|
readonly internalType: "uint256";
|
|
1053
1084
|
readonly name: "";
|
|
1085
|
+
/**
|
|
1086
|
+
* Get an abi-typed transaction for claiming vaulted tokens.
|
|
1087
|
+
*
|
|
1088
|
+
* @param token The token to claim for
|
|
1089
|
+
* @returns Abi transaction
|
|
1090
|
+
*/
|
|
1054
1091
|
readonly type: "uint256";
|
|
1055
1092
|
}];
|
|
1056
1093
|
readonly stateMutability: "view";
|
|
@@ -1120,6 +1157,12 @@ declare class Clanker {
|
|
|
1120
1157
|
readonly type: "tuple";
|
|
1121
1158
|
}, {
|
|
1122
1159
|
readonly components: readonly [{
|
|
1160
|
+
/**
|
|
1161
|
+
* Get the amount of vaulted tokens available to claim.
|
|
1162
|
+
*
|
|
1163
|
+
* @param token Token to check claimable vault amount for
|
|
1164
|
+
* @returns Amount of tokens available to claim
|
|
1165
|
+
*/
|
|
1123
1166
|
readonly internalType: "address";
|
|
1124
1167
|
readonly name: "hook";
|
|
1125
1168
|
readonly type: "address";
|
|
@@ -1178,6 +1221,13 @@ declare class Clanker {
|
|
|
1178
1221
|
readonly type: "bytes";
|
|
1179
1222
|
}];
|
|
1180
1223
|
readonly internalType: "struct IClanker.LockerConfig";
|
|
1224
|
+
/**
|
|
1225
|
+
* Get the transaction object for claiming vaulted tokens (for offline signing or inspection).
|
|
1226
|
+
*
|
|
1227
|
+
* @param token The token to claim for
|
|
1228
|
+
* @param chainId Optional chain ID to override default
|
|
1229
|
+
* @returns Transaction object for claiming vaulted tokens
|
|
1230
|
+
*/
|
|
1181
1231
|
readonly name: "lockerConfig";
|
|
1182
1232
|
readonly type: "tuple";
|
|
1183
1233
|
}, {
|
|
@@ -1496,7 +1546,7 @@ declare class Clanker {
|
|
|
1496
1546
|
readonly stateMutability: "nonpayable";
|
|
1497
1547
|
readonly type: "function";
|
|
1498
1548
|
}], "deployToken"> & {
|
|
1499
|
-
expectedAddress?: `0x${string}
|
|
1549
|
+
expectedAddress?: `0x${string}` | undefined;
|
|
1500
1550
|
}>;
|
|
1501
1551
|
/**
|
|
1502
1552
|
* Simulate a token deployment
|
|
@@ -1643,7 +1693,13 @@ declare class Clanker {
|
|
|
1643
1693
|
readonly internalType: "address";
|
|
1644
1694
|
}];
|
|
1645
1695
|
readonly outputs: readonly [{
|
|
1646
|
-
readonly name: "";
|
|
1696
|
+
readonly name: ""; /**
|
|
1697
|
+
* Get an abi-typed transaction for claiming rewards on a token.
|
|
1698
|
+
*
|
|
1699
|
+
* @param token The token to claim for
|
|
1700
|
+
* @param rewardRecipient The recipient to claim for
|
|
1701
|
+
* @returns Abi transaction
|
|
1702
|
+
*/
|
|
1647
1703
|
readonly type: "uint256";
|
|
1648
1704
|
readonly internalType: "uint256";
|
|
1649
1705
|
}];
|
package/dist/v4/index.js
CHANGED
|
@@ -4333,7 +4333,7 @@ var Clanker = class {
|
|
|
4333
4333
|
args: [token]
|
|
4334
4334
|
});
|
|
4335
4335
|
} catch (err) {
|
|
4336
|
-
if ((err
|
|
4336
|
+
if (err && typeof err === "object" && "name" in err && (err.name === "ContractFunctionExecutionError" || err.name === "ContractFunctionZeroDataError") && "message" in err && typeof err.message === "string" && err.message.includes("returned no data")) {
|
|
4337
4337
|
return 0n;
|
|
4338
4338
|
}
|
|
4339
4339
|
throw err;
|