@aboutcircles/sdk 0.1.10 → 0.1.12
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/Sdk.d.ts +5 -8
- package/dist/Sdk.d.ts.map +1 -1
- package/dist/Sdk.js +10 -35
- package/dist/avatars/HumanAvatar.d.ts +40 -146
- package/dist/avatars/HumanAvatar.d.ts.map +1 -1
- package/dist/avatars/HumanAvatar.js +55 -228
- package/dist/index.js +6059 -7352
- package/package.json +2 -1
package/dist/Sdk.d.ts
CHANGED
|
@@ -63,18 +63,15 @@ export declare class Sdk {
|
|
|
63
63
|
* Register as a human in the Circles ecosystem
|
|
64
64
|
*
|
|
65
65
|
* This function:
|
|
66
|
-
* 1.
|
|
67
|
-
* 2.
|
|
68
|
-
* 3.
|
|
69
|
-
* 4. Creates and uploads profile data to IPFS
|
|
70
|
-
* 5. Registers the human with the profile CID
|
|
71
|
-
* 6. Returns a HumanAvatar instance for the registered account
|
|
66
|
+
* 1. Creates and uploads profile data to IPFS
|
|
67
|
+
* 2. Registers the human with the profile CID
|
|
68
|
+
* 3. Returns a HumanAvatar instance for the registered account
|
|
72
69
|
*
|
|
73
70
|
* Requirements:
|
|
74
71
|
* - Contract runner must be configured to execute transactions
|
|
75
|
-
* -
|
|
72
|
+
* - An inviter address must be provided
|
|
76
73
|
*
|
|
77
|
-
* @param inviter Address of the inviting avatar
|
|
74
|
+
* @param inviter Address of the inviting avatar
|
|
78
75
|
* @param profile Profile data with name, description, etc.
|
|
79
76
|
* @returns HumanAvatar instance for the newly registered human
|
|
80
77
|
*
|
package/dist/Sdk.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sdk.d.ts","sourceRoot":"","sources":["../src/Sdk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,aAAa,EACb,cAAc,EACd,OAAO,EAEP,YAAY,EACZ,SAAS,EAEV,MAAM,yBAAyB,CAA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AAO,CAAC,eAAe,CAAC;MAsF3B;IAEF;;OAEG;IACH,SAAgB,QAAQ;QACtB;;;;WAIG;0BACqB,OAAO,KAAG,OAAO,CAAC,MAAM,CAAC;QAIjD;;;;WAIG;mBACc,MAAM,KAAG,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC;MAGtD;IAEF;;OAEG;IACH,SAAgB,MAAM;QACpB;;;;WAIG;0CACqC,OAAO,KAAG,OAAO,CAAC,OAAO,CAAC;QAIlE;;;;WAIG;wCACmC,OAAO,KAAG,OAAO,CAAC,OAAO,CAAC;QAIhE;;;;;;;;;;;;;;;;;;;WAmBG;mCAEa,OAAO,UACd,MAAM,cACF,SAAS;MAItB;IAEF;;OAEG;IACH,SAAgB,MAAM;QACpB;;;;WAIG;0BACqB,OAAO,KAAG,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC;QAIhE;;;;;;;;;;;;;;;;;;;;;;;;;;;WA2BG;mCAEa,OAAO,UACd,MAAM,cACF,KAAK,GAAG,MAAM;QAK3B;;;;;;;;;;;;;;;;;;;WAmBG;sCACiC,OAAO,KAAG,OAAO,CAAC,YAAY,EAAE,CAAC;QAcrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA6BG;mCACwB,OAAO,UAAS,MAAM,KAAS,UAAU,CAAC,mBAAmB,CAAC;MAGzF;CACH"}
|
package/dist/Sdk.js
CHANGED
|
@@ -120,18 +120,15 @@ export class Sdk {
|
|
|
120
120
|
* Register as a human in the Circles ecosystem
|
|
121
121
|
*
|
|
122
122
|
* This function:
|
|
123
|
-
* 1.
|
|
124
|
-
* 2.
|
|
125
|
-
* 3.
|
|
126
|
-
* 4. Creates and uploads profile data to IPFS
|
|
127
|
-
* 5. Registers the human with the profile CID
|
|
128
|
-
* 6. Returns a HumanAvatar instance for the registered account
|
|
123
|
+
* 1. Creates and uploads profile data to IPFS
|
|
124
|
+
* 2. Registers the human with the profile CID
|
|
125
|
+
* 3. Returns a HumanAvatar instance for the registered account
|
|
129
126
|
*
|
|
130
127
|
* Requirements:
|
|
131
128
|
* - Contract runner must be configured to execute transactions
|
|
132
|
-
* -
|
|
129
|
+
* - An inviter address must be provided
|
|
133
130
|
*
|
|
134
|
-
* @param inviter Address of the inviting avatar
|
|
131
|
+
* @param inviter Address of the inviting avatar
|
|
135
132
|
* @param profile Profile data with name, description, etc.
|
|
136
133
|
* @returns HumanAvatar instance for the newly registered human
|
|
137
134
|
*
|
|
@@ -149,28 +146,7 @@ export class Sdk {
|
|
|
149
146
|
}
|
|
150
147
|
const contractRunner = this.contractRunner;
|
|
151
148
|
const senderAddress = this.senderAddress;
|
|
152
|
-
//
|
|
153
|
-
const transactions = [];
|
|
154
|
-
// Step 1: Check for pending invitations in the InvitationEscrow
|
|
155
|
-
const inviters = await this.core.invitationEscrow.getInviters(senderAddress);
|
|
156
|
-
if (inviters.length > 0) {
|
|
157
|
-
// Redeem the invitation from the first available inviter
|
|
158
|
-
const redeemTx = this.core.invitationEscrow.redeemInvitation(inviters[0]);
|
|
159
|
-
transactions.push(redeemTx);
|
|
160
|
-
}
|
|
161
|
-
else {
|
|
162
|
-
// No invitations found, check if inviter has enough unwrapped CRC
|
|
163
|
-
// Minimum required: 96 CRC (after demurrage it becomes valid amount)
|
|
164
|
-
const minRequiredCRC = BigInt(96e18); // 96 CRC in atto-circles
|
|
165
|
-
// Get the token ID for the inviter's personal token
|
|
166
|
-
const tokenId = await this.core.hubV2.toTokenId(inviter);
|
|
167
|
-
// Check balance at the Inviter address
|
|
168
|
-
const balance = await this.core.hubV2.balanceOf(inviter, tokenId);
|
|
169
|
-
if (balance < minRequiredCRC) {
|
|
170
|
-
throw SdkError.insufficientBalance('96 CRC', `${Number(balance) / 1e18} CRC`, 'unwrapped CRC');
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
// Step 2: Create and upload profile to IPFS
|
|
149
|
+
// Step 1: Create and upload profile to IPFS
|
|
174
150
|
let profileCid;
|
|
175
151
|
if (typeof profile === 'string') {
|
|
176
152
|
// Profile is already a CID
|
|
@@ -182,12 +158,11 @@ export class Sdk {
|
|
|
182
158
|
}
|
|
183
159
|
// Convert CID to metadata digest hex (format expected by registerHuman)
|
|
184
160
|
const metadataDigest = cidV0ToHex(profileCid);
|
|
185
|
-
// Step
|
|
161
|
+
// Step 2: Call registerHuman with profile data
|
|
186
162
|
const registerTx = this.core.hubV2.registerHuman(inviter, metadataDigest);
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
// Step 5: Return a HumanAvatar instance for the newly registered account
|
|
163
|
+
// Step 3: Execute the transaction
|
|
164
|
+
await contractRunner.sendTransaction([registerTx]);
|
|
165
|
+
// Step 4: Return a HumanAvatar instance for the newly registered account
|
|
191
166
|
const avatarInfo = await this.rpc.avatar.getAvatarInfo(senderAddress);
|
|
192
167
|
return new HumanAvatar(senderAddress, this.core, contractRunner, avatarInfo // @todo remove any
|
|
193
168
|
);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { Address, AvatarRow, ContractRunner, TokenBalanceRow, GroupMembershipRow, GroupRow } from '@aboutcircles/sdk-types';
|
|
1
|
+
import type { Address, AvatarRow, ContractRunner, TokenBalanceRow, GroupMembershipRow, GroupRow, TransactionRequest } from '@aboutcircles/sdk-types';
|
|
2
2
|
import type { TransactionReceipt, Hex } from 'viem';
|
|
3
3
|
import type { Core } from '@aboutcircles/sdk-core';
|
|
4
4
|
import { CommonAvatar, type PathfindingOptions } from './CommonAvatar';
|
|
5
|
+
import { type ProxyInviter, type ReferralPreviewList } from '@aboutcircles/sdk-invitations';
|
|
5
6
|
/**
|
|
6
7
|
* HumanAvatar class implementation
|
|
7
8
|
* Provides a simplified, user-friendly wrapper around Circles protocol for human avatars
|
|
@@ -51,167 +52,60 @@ export declare class HumanAvatar extends CommonAvatar {
|
|
|
51
52
|
*/
|
|
52
53
|
replenish: (options?: PathfindingOptions) => Promise<TransactionReceipt>;
|
|
53
54
|
};
|
|
54
|
-
readonly
|
|
55
|
+
private readonly _invitations;
|
|
56
|
+
private readonly _inviteFarm;
|
|
57
|
+
readonly invitation: {
|
|
55
58
|
/**
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* 1. Establishes trust with the invitee (with indefinite expiry)
|
|
60
|
-
* 2. Transfers 100 of your personal CRC tokens to the InvitationEscrow contract
|
|
61
|
-
*
|
|
62
|
-
* The tokens are held in escrow until the invitee redeems the invitation by registering.
|
|
63
|
-
*
|
|
64
|
-
* Requirements:
|
|
65
|
-
* - You must have at least 100 CRC available
|
|
66
|
-
* - Invitee must not be already registered in Circles
|
|
67
|
-
* - You can only have one active invitation per invitee
|
|
68
|
-
*
|
|
69
|
-
* @param invitee The address to invite
|
|
70
|
-
* @returns Transaction response
|
|
71
|
-
*
|
|
72
|
-
* @example
|
|
73
|
-
* ```typescript
|
|
74
|
-
* // Invite someone with 100 CRC (automatically establishes trust)
|
|
75
|
-
* await avatar.invite.send('0x123...');
|
|
76
|
-
* ```
|
|
59
|
+
* Get a referral code for inviting a new user who doesn't have a Safe wallet yet.
|
|
60
|
+
* Generates private key, finds proxy inviters, builds tx batch, saves referral data.
|
|
61
|
+
* @returns Transactions to execute and the private key to share with invitee
|
|
77
62
|
*/
|
|
78
|
-
|
|
63
|
+
getReferralCode: () => Promise<{
|
|
64
|
+
transactions: TransactionRequest[];
|
|
65
|
+
privateKey: Hex;
|
|
66
|
+
}>;
|
|
79
67
|
/**
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
* This returns the escrowed tokens (with demurrage applied) back to you
|
|
83
|
-
* as wrapped ERC20 tokens.
|
|
84
|
-
*
|
|
85
|
-
* @param invitee The address whose invitation to revoke
|
|
86
|
-
* @returns Transaction response
|
|
87
|
-
*
|
|
88
|
-
* @example
|
|
89
|
-
* ```typescript
|
|
90
|
-
* await avatar.invite.revoke('0x123...');
|
|
91
|
-
* ```
|
|
68
|
+
* Invite a user who already has a Safe wallet but is not yet registered in Circles.
|
|
69
|
+
* @param invitee Address of the invitee (must have existing Safe, NOT registered in Circles)
|
|
92
70
|
*/
|
|
93
|
-
|
|
71
|
+
invite: (invitee: Address) => Promise<TransactionRequest[]>;
|
|
94
72
|
/**
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
* as wrapped ERC20 tokens in a single transaction.
|
|
99
|
-
*
|
|
100
|
-
* @returns Transaction response
|
|
101
|
-
*
|
|
102
|
-
* @example
|
|
103
|
-
* ```typescript
|
|
104
|
-
* await avatar.invite.revokeAll();
|
|
105
|
-
* ```
|
|
73
|
+
* Get proxy inviters who can facilitate invitations.
|
|
74
|
+
* These are addresses that trust this avatar, are trusted by the invitation module,
|
|
75
|
+
* and have sufficient balance (96 CRC per invite).
|
|
106
76
|
*/
|
|
107
|
-
|
|
77
|
+
getProxyInviters: () => Promise<ProxyInviter[]>;
|
|
108
78
|
/**
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
* This claims the escrowed tokens from a specific inviter and refunds
|
|
112
|
-
* all other inviters' escrows back to them.
|
|
113
|
-
*
|
|
114
|
-
* @param inviter The address of the inviter whose invitation to redeem
|
|
115
|
-
* @returns Transaction response
|
|
116
|
-
*
|
|
117
|
-
* @example
|
|
118
|
-
* ```typescript
|
|
119
|
-
* // Get all inviters first
|
|
120
|
-
* const inviters = await avatar.invite.getInviters();
|
|
121
|
-
*
|
|
122
|
-
* // Redeem invitation from the first inviter
|
|
123
|
-
* await avatar.invite.redeem(inviters[0]);
|
|
124
|
-
* ```
|
|
79
|
+
* Find a path from this avatar to the invitation module.
|
|
80
|
+
* @param proxyInviterAddress Optional specific proxy inviter to route through
|
|
125
81
|
*/
|
|
126
|
-
|
|
82
|
+
findInvitePath: (proxyInviterAddress?: Address) => Promise<import("@aboutcircles/sdk-types").PathfindingResult>;
|
|
127
83
|
/**
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
* @returns Array of inviter addresses
|
|
131
|
-
*
|
|
132
|
-
* @example
|
|
133
|
-
* ```typescript
|
|
134
|
-
* const inviters = await avatar.invite.getInviters();
|
|
135
|
-
* console.log(`You have ${inviters.length} pending invitations`);
|
|
136
|
-
* ```
|
|
137
|
-
*/
|
|
138
|
-
getInviters: () => Promise<Address[]>;
|
|
139
|
-
/**
|
|
140
|
-
* Get all addresses you have invited
|
|
141
|
-
*
|
|
142
|
-
* @returns Array of invitee addresses
|
|
143
|
-
*
|
|
144
|
-
* @example
|
|
145
|
-
* ```typescript
|
|
146
|
-
* const invitees = await avatar.invite.getInvitees();
|
|
147
|
-
* console.log(`You have invited ${invitees.length} people`);
|
|
148
|
-
* ```
|
|
149
|
-
*/
|
|
150
|
-
getInvitees: () => Promise<Address[]>;
|
|
151
|
-
/**
|
|
152
|
-
* Get the escrowed amount and days since escrow for a specific invitation
|
|
153
|
-
*
|
|
154
|
-
* The amount returned has demurrage applied, so it decreases over time.
|
|
155
|
-
*
|
|
156
|
-
* @param inviter The inviter address (when checking invitations you received)
|
|
157
|
-
* @param invitee The invitee address (when checking invitations you sent)
|
|
158
|
-
* @returns Object with escrowedAmount (in atto-circles) and days since escrow
|
|
159
|
-
*
|
|
160
|
-
* @example
|
|
161
|
-
* ```typescript
|
|
162
|
-
* // Check an invitation you sent
|
|
163
|
-
* const { escrowedAmount, days_ } = await avatar.invite.getEscrowedAmount(
|
|
164
|
-
* avatar.address,
|
|
165
|
-
* '0xinvitee...'
|
|
166
|
-
* );
|
|
167
|
-
* console.log(`Escrowed: ${CirclesConverter.attoCirclesToCircles(escrowedAmount)} CRC`);
|
|
168
|
-
* console.log(`Days since escrow: ${days_}`);
|
|
169
|
-
*
|
|
170
|
-
* // Check an invitation you received
|
|
171
|
-
* const { escrowedAmount, days_ } = await avatar.invite.getEscrowedAmount(
|
|
172
|
-
* '0xinviter...',
|
|
173
|
-
* avatar.address
|
|
174
|
-
* );
|
|
175
|
-
* ```
|
|
84
|
+
* Compute the deterministic Safe address for a given signer using CREATE2.
|
|
85
|
+
* @param signer The signer public address
|
|
176
86
|
*/
|
|
177
|
-
|
|
87
|
+
computeAddress: (signer: Address) => Address;
|
|
178
88
|
/**
|
|
179
|
-
* Generate
|
|
180
|
-
*
|
|
181
|
-
* This function:
|
|
182
|
-
* 1. Calls invitationFarm.claimInvites() to get invitation IDs via eth_call
|
|
183
|
-
* 2. Generates random secrets for each invitation
|
|
184
|
-
* 3. Derives signer addresses from the secrets using ECDSA
|
|
185
|
-
* 4. Batches the claimInvites write call with safeBatchTransferFrom to transfer
|
|
186
|
-
* invitation tokens (96 CRC each) to the invitation module
|
|
187
|
-
* 5. Returns the list of secrets and corresponding signers
|
|
188
|
-
*
|
|
189
|
-
* The data field in the batch transfer contains the count of generated secrets,
|
|
190
|
-
* which the contract uses to validate the transfer.
|
|
191
|
-
*
|
|
192
|
-
* @param numberOfInvites The number of invitations to generate
|
|
193
|
-
* @returns Promise containing arrays of secrets and signers for each generated invitation
|
|
194
|
-
*
|
|
195
|
-
* @throws {SdkError} If the transaction fails or invitations cannot be claimed
|
|
196
|
-
*
|
|
197
|
-
* @example
|
|
198
|
-
* ```typescript
|
|
199
|
-
* // Generate 5 invitations
|
|
200
|
-
* const result = await avatar.invite.generateInvites(5n);
|
|
201
|
-
*
|
|
202
|
-
* console.log('Generated invitations:');
|
|
203
|
-
* result.secrets.forEach((secret, index) => {
|
|
204
|
-
* console.log(`Invitation ${index + 1}:`);
|
|
205
|
-
* console.log(` Secret: ${secret}`);
|
|
206
|
-
* console.log(` Signer: ${result.signers[index]}`);
|
|
207
|
-
* });
|
|
208
|
-
* ```
|
|
89
|
+
* Generate batch invitations using the InvitationFarm.
|
|
90
|
+
* @param count Number of invitations to generate
|
|
209
91
|
*/
|
|
210
|
-
generateInvites: (
|
|
92
|
+
generateInvites: (count: number) => Promise<{
|
|
211
93
|
secrets: Hex[];
|
|
212
94
|
signers: Address[];
|
|
213
95
|
transactionReceipt: TransactionReceipt;
|
|
214
96
|
}>;
|
|
97
|
+
/** Get the remaining invite quota for this avatar */
|
|
98
|
+
getQuota: () => Promise<bigint>;
|
|
99
|
+
/** Get the invitation fee (96 CRC) */
|
|
100
|
+
getInvitationFee: () => Promise<bigint>;
|
|
101
|
+
/** Get the invitation module address from the farm */
|
|
102
|
+
getInvitationModule: () => Promise<Address>;
|
|
103
|
+
/**
|
|
104
|
+
* List referrals for this avatar with key previews.
|
|
105
|
+
* @param limit Max referrals to return (default 10)
|
|
106
|
+
* @param offset Pagination offset (default 0)
|
|
107
|
+
*/
|
|
108
|
+
listReferrals: (limit?: number, offset?: number) => Promise<ReferralPreviewList>;
|
|
215
109
|
};
|
|
216
110
|
readonly personalToken: {
|
|
217
111
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HumanAvatar.d.ts","sourceRoot":"","sources":["../../src/avatars/HumanAvatar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,SAAS,EACT,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,QAAQ,
|
|
1
|
+
{"version":3,"file":"HumanAvatar.d.ts","sourceRoot":"","sources":["../../src/avatars/HumanAvatar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,SAAS,EACT,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,QAAQ,EAER,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,kBAAkB,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AACpD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAInD,OAAO,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAA2B,KAAK,YAAY,EAAwB,KAAK,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAE3I;;;;;;GAMG;AACH,qBAAa,WAAY,SAAQ,YAAY;gBAEzC,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAI,EACV,cAAc,CAAC,EAAE,cAAc,EAC/B,UA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