From 374f03c516392a43cf10db2dc145b95c5791437c Mon Sep 17 00:00:00 2001 From: Kristijan Date: Fri, 29 Aug 2025 17:14:22 +0200 Subject: [PATCH] Version 1.3.55 - 2025-08-29 17:14:22 --- package.json | 2 +- .../icpay_canister_backend.did | 10 +++++++++- .../icpay_canister_backend.did.d.ts | 13 ++++++++++++- .../icpay_canister_backend.did.js | 13 ++++++++++++- 4 files changed, 34 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 651e70d..8490028 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@icpay/sdk", - "version": "1.3.54", + "version": "1.3.55", "description": "Official icpay SDK for Internet Computer payments", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/declarations/icpay_canister_backend/icpay_canister_backend.did b/src/declarations/icpay_canister_backend/icpay_canister_backend.did index 044f2d8..dbd75ba 100644 --- a/src/declarations/icpay_canister_backend/icpay_canister_backend.did +++ b/src/declarations/icpay_canister_backend/icpay_canister_backend.did @@ -6,6 +6,7 @@ type Account = record { icp_account_identifier : opt text; platform_fee_fixed : opt nat; is_active : bool; + splits : vec SplitRule; }; type AccountRecord = record { account_canister_id : nat64; account : Account }; type CanisterMetrics = record { @@ -101,6 +102,13 @@ type Result_1 = variant { Ok : NotifyResult; Err : text }; type Result_2 = variant { Ok : Payout; Err : text }; type Result_3 = variant { Ok : nat; Err : text }; type Result_4 = variant { Ok : text; Err : text }; +type Split = record { + account_canister_id : nat64; + index_block : opt nat64; + timestamp : opt nat64; + amount : nat; +}; +type SplitRule = record { account_canister_id : nat64; percentage : nat16 }; type Transaction = record { id : nat; status : TransactionStatus; @@ -108,7 +116,6 @@ type Transaction = record { platform_fee_amount : nat; transfer_fee : nat; memo : opt blob; - index_to_account : opt nat64; timestamp_to_account : opt nat64; notify_processing : bool; timestamp : nat64; @@ -116,6 +123,7 @@ type Transaction = record { sender_principal_id : text; account_amount : nat; ledger_canister_id : text; + splits : vec Split; timestamp_received : opt nat64; amount : nat; }; diff --git a/src/declarations/icpay_canister_backend/icpay_canister_backend.did.d.ts b/src/declarations/icpay_canister_backend/icpay_canister_backend.did.d.ts index 59cbd6a..c272262 100644 --- a/src/declarations/icpay_canister_backend/icpay_canister_backend.did.d.ts +++ b/src/declarations/icpay_canister_backend/icpay_canister_backend.did.d.ts @@ -10,6 +10,7 @@ export interface Account { 'icp_account_identifier' : [] | [string], 'platform_fee_fixed' : [] | [bigint], 'is_active' : boolean, + 'splits' : Array, } export interface AccountRecord { 'account_canister_id' : bigint, @@ -117,6 +118,16 @@ export type Result_3 = { 'Ok' : bigint } | { 'Err' : string }; export type Result_4 = { 'Ok' : string } | { 'Err' : string }; +export interface Split { + 'account_canister_id' : bigint, + 'index_block' : [] | [bigint], + 'timestamp' : [] | [bigint], + 'amount' : bigint, +} +export interface SplitRule { + 'account_canister_id' : bigint, + 'percentage' : number, +} export interface Transaction { 'id' : bigint, 'status' : TransactionStatus, @@ -124,7 +135,6 @@ export interface Transaction { 'platform_fee_amount' : bigint, 'transfer_fee' : bigint, 'memo' : [] | [Uint8Array | number[]], - 'index_to_account' : [] | [bigint], 'timestamp_to_account' : [] | [bigint], 'notify_processing' : boolean, 'timestamp' : bigint, @@ -132,6 +142,7 @@ export interface Transaction { 'sender_principal_id' : string, 'account_amount' : bigint, 'ledger_canister_id' : string, + 'splits' : Array, 'timestamp_received' : [] | [bigint], 'amount' : bigint, } diff --git a/src/declarations/icpay_canister_backend/icpay_canister_backend.did.js b/src/declarations/icpay_canister_backend/icpay_canister_backend.did.js index 27ef438..904c960 100644 --- a/src/declarations/icpay_canister_backend/icpay_canister_backend.did.js +++ b/src/declarations/icpay_canister_backend/icpay_canister_backend.did.js @@ -1,4 +1,8 @@ export const idlFactory = ({ IDL }) => { + const SplitRule = IDL.Record({ + 'account_canister_id' : IDL.Nat64, + 'percentage' : IDL.Nat16, + }); const Account = IDL.Record({ 'account_canister_id' : IDL.Nat64, 'platform_fee_percentage' : IDL.Nat16, @@ -7,6 +11,7 @@ export const idlFactory = ({ IDL }) => { 'icp_account_identifier' : IDL.Opt(IDL.Text), 'platform_fee_fixed' : IDL.Opt(IDL.Nat), 'is_active' : IDL.Bool, + 'splits' : IDL.Vec(SplitRule), }); const Result = IDL.Variant({ 'Ok' : IDL.Null, 'Err' : IDL.Text }); const TransactionStatus = IDL.Variant({ @@ -16,6 +21,12 @@ export const idlFactory = ({ IDL }) => { 'Completed' : IDL.Null, 'Pending' : IDL.Null, }); + const Split = IDL.Record({ + 'account_canister_id' : IDL.Nat64, + 'index_block' : IDL.Opt(IDL.Nat64), + 'timestamp' : IDL.Opt(IDL.Nat64), + 'amount' : IDL.Nat, + }); const Transaction = IDL.Record({ 'id' : IDL.Nat, 'status' : TransactionStatus, @@ -23,7 +34,6 @@ export const idlFactory = ({ IDL }) => { 'platform_fee_amount' : IDL.Nat, 'transfer_fee' : IDL.Nat, 'memo' : IDL.Opt(IDL.Vec(IDL.Nat8)), - 'index_to_account' : IDL.Opt(IDL.Nat64), 'timestamp_to_account' : IDL.Opt(IDL.Nat64), 'notify_processing' : IDL.Bool, 'timestamp' : IDL.Nat64, @@ -31,6 +41,7 @@ export const idlFactory = ({ IDL }) => { 'sender_principal_id' : IDL.Text, 'account_amount' : IDL.Nat, 'ledger_canister_id' : IDL.Text, + 'splits' : IDL.Vec(Split), 'timestamp_received' : IDL.Opt(IDL.Nat64), 'amount' : IDL.Nat, });